92
87
@bash ./utilities/lint.sh -v
95
${PYTHON} -t ./utilities/xxxreport.py -f csv -o xxx-report.csv ./
90
${PY} -t ./utilities/xxxreport.py -f csv -o xxx-report.csv ./
98
${PYTHON} utilities/check-configs.py
93
${PY} utilities/check-configs.py
101
env PYTHONPATH=$(PYTHONPATH) ${PYTHON} test.py test_pages
96
env PYTHONPATH=$(PYTHONPATH) bin/test test_pages
105
100
build: $(BZR_VERSION_INFO) compile apidoc
103
$(PYTHON) bootstrap.py
104
./bin/buildout configuration:instance_name=${LPCONFIG}
108
105
${SHHH} $(MAKE) -C sourcecode build PYTHON=${PYTHON} \
109
106
PYTHON_VERSION=${PYTHON_VERSION} LPCONFIG=${LPCONFIG}
110
${SHHH} LPCONFIG=${LPCONFIG} PYTHONPATH=$(PYTHONPATH) \
111
$(PYTHON) -t buildmailman.py
107
${SHHH} LPCONFIG=${LPCONFIG} $(PY) -t buildmailman.py
112
108
${SHHH} sourcecode/lazr-js/tools/build.py \
113
109
-n launchpad -s lib/canonical/launchpad/javascript \
114
110
-b lib/canonical/launchpad/icing/build $(EXTRA_JS_FILES)
117
echo "#!/bin/sh" > bin/runzope;
118
echo "exec $(PYTHON) $(STARTSCRIPT) -C $(CONFFILE)" >> bin/runzope;
120
echo "#!/bin/sh" > bin/zopectl;
121
echo "$(PYTHON) $(PWD)/src/zdaemon/zdctl.py \
123
-C zdaemon.conf -d \$$*" >> bin/zopectl
126
112
test_build: build
127
$(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
113
bin/test $(TESTFLAGS) $(TESTOPTS)
129
115
test_inplace: inplace
130
$(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
116
bin/test $(TESTFLAGS) $(TESTOPTS)
132
118
ftest_build: build
133
env PYTHONPATH=$(PYTHONPATH) \
134
$(PYTHON) test.py -f $(TESTFLAGS) $(TESTOPTS)
119
bin/test -f $(TESTFLAGS) $(TESTOPTS)
136
121
ftest_inplace: inplace
137
env PYTHONPATH=$(PYTHONPATH) \
138
$(PYTHON) test.py -f $(TESTFLAGS) $(TESTOPTS)
122
bin/test -f $(TESTFLAGS) $(TESTOPTS)
140
124
run: inplace stop
141
125
$(RM) thread*.request
142
$(APPSERVER_ENV) $(PYTHON) -t $(STARTSCRIPT) \
143
-r librarian,google-webservice -C $(CONFFILE)
126
bin/run -r librarian,google-webservice -C $(CONFFILE)
145
128
start-gdb: inplace stop support_files
146
129
$(RM) thread*.request
147
$(APPSERVER_ENV) nohup gdb -x run.gdb --args $(PYTHON) -t $(STARTSCRIPT) \
130
nohup gdb -x run.gdb --args bin/run \
148
131
-r librarian,google-webservice -C $(CONFFILE) \
149
132
> ${LPCONFIG}-nohup.out 2>&1 &
151
134
run_all: inplace stop hosted_branches
152
135
$(RM) thread*.request
153
$(APPSERVER_ENV) $(PYTHON) -t $(STARTSCRIPT) \
154
-r librarian,buildsequencer,sftp,mailman,codebrowse,google-webservice \
136
bin/run -r librarian,buildsequencer,sftp,mailman,codebrowse,google-webservice \
157
139
run_codebrowse: build
158
BZR_PLUGIN_PATH=bzrplugins PYTHONPATH=lib $(PYTHON) sourcecode/launchpad-loggerhead/start-loggerhead.py -f
140
BZR_PLUGIN_PATH=bzrplugins $(PY) sourcecode/launchpad-loggerhead/start-loggerhead.py -f
160
142
start_codebrowse: build
161
BZR_PLUGIN_PATH=$(shell pwd)/bzrplugins PYTHONPATH=lib $(PYTHON) sourcecode/launchpad-loggerhead/start-loggerhead.py
143
BZR_PLUGIN_PATH=$(shell pwd)/bzrplugins $(PY) sourcecode/launchpad-loggerhead/start-loggerhead.py
164
PYTHONPATH=lib $(PYTHON) sourcecode/launchpad-loggerhead/stop-loggerhead.py
146
$(PY) sourcecode/launchpad-loggerhead/stop-loggerhead.py
166
148
pull_branches: support_files
167
149
# Mirror the hosted branches in the development upload area to the
169
$(PYTHON) cronscripts/supermirror-pull.py upload
151
$(PY) cronscripts/supermirror-pull.py upload
172
154
# Scan branches from the filesystem into the database.
173
$(PYTHON) cronscripts/branch-scanner.py
155
$(PY) cronscripts/branch-scanner.py
175
157
sync_branches: pull_branches scan_branches
183
165
# properly. We also should really wait until services are running before
184
166
# exiting, as running 'make stop' too soon after running 'make start'
185
167
# will not work as expected.
186
169
start: inplace stop support_files
187
$(APPSERVER_ENV) nohup $(PYTHON) -t $(STARTSCRIPT) -C $(CONFFILE) \
188
> ${LPCONFIG}-nohup.out 2>&1 &
170
nohup bin/run -C $(CONFFILE) > ${LPCONFIG}-nohup.out 2>&1 &
190
172
# This is a stripped down version of the "start" target for use on
191
173
# production servers - removes running 'make build' because we already
193
175
# don't want to run 'make stop' because it takes unnecessary time
194
176
# even if the service is already stopped, and bzr_version_info is not
195
177
# needed either because it's run as part of 'make build'.
196
179
initscript-start:
197
$(APPSERVER_ENV) nohup $(PYTHON) -t $(STARTSCRIPT) -C $(CONFFILE) \
198
> ${LPCONFIG}-nohup.out 2>&1 &
180
nohup bin/run -C $(CONFFILE) > ${LPCONFIG}-nohup.out 2>&1 &
200
182
# Kill launchpad last - other services will probably shutdown with it,
201
183
# so killing them after is a race condition.
203
@ $(APPSERVER_ENV) ${PYTHON} \
204
utilities/killservice.py librarian buildsequencer launchpad mailman
185
bin/killservice librarian buildsequencer launchpad mailman
206
187
shutdown: scheduleoutage stop
207
188
$(RM) +maintenancetime.txt