~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Steve Kowalik
  • Date: 2011-08-07 04:05:52 UTC
  • mto: This revision was merged to the branch mainline in revision 13626.
  • Revision ID: stevenk@ubuntu.com-20110807040552-mwnxo0flmhvl35e8
Correct the notification based on review comments, and remove request{,ed}
from the function names, switching to create{,d}.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
endef
33
33
 
34
34
JS_YUI := $(shell utilities/yui-deps.py $(JS_BUILD:raw=))
35
 
JS_LP := $(shell find -L $(JS_LP_PATHS) -name '*.js' ! -name '.*.js')
36
 
JS_ALL := $(JS_YUI) $(JS_LP)
 
35
JS_OTHER := $(wildcard lib/canonical/launchpad/javascript/*/*.js)
 
36
JS_LP := $(shell find $(JS_LP_PATHS) -name '*.js' ! -name '.*.js')
 
37
JS_ALL := $(JS_YUI) $(JS_OTHER) $(JS_LP)
37
38
JS_OUT := $(LP_BUILT_JS_ROOT)/launchpad.js
38
39
 
39
40
MINS_TO_SHUTDOWN=15
59
60
    bin/i18ncompile bin/i18nextract bin/i18nmergeall bin/i18nstats \
60
61
    bin/harness bin/iharness bin/ipy bin/jsbuild \
61
62
    bin/killservice bin/kill-test-services bin/lint.sh bin/retest \
62
 
    bin/run bin/run-testapp bin/sprite-util bin/start_librarian bin/stxdocs \
63
 
    bin/tags bin/test bin/tracereport bin/twistd bin/update-download-cache
 
63
    bin/run bin/sprite-util bin/start_librarian bin/stxdocs bin/tags \
 
64
    bin/test bin/tracereport bin/twistd bin/update-download-cache
64
65
 
65
66
BUILDOUT_TEMPLATES = buildout-templates/_pythonpath.py.in
66
67
 
78
79
        $(PY) ./utilities/make-dummy-hosted-branches
79
80
 
80
81
$(API_INDEX): $(BZR_VERSION_INFO) $(PY)
81
 
        $(RM) -r $(APIDOC_DIR) $(APIDOC_DIR).tmp
 
82
        rm -rf $(APIDOC_DIR) $(APIDOC_DIR).tmp
82
83
        mkdir -p $(APIDOC_DIR).tmp
83
84
        LPCONFIG=$(LPCONFIG) $(PY) ./utilities/create-lp-wadl-and-apidoc.py \
84
85
            --force "$(APIDOC_TMPDIR)"
92
93
 
93
94
# Run by PQM.
94
95
check_config: build
95
 
        bin/test -m lp.services.config.tests -vvt test_config
 
96
        bin/test -m canonical.config.tests -vvt test_config
 
97
 
 
98
check_schema: build
 
99
        ${PY} utilities/check-db-revision.py
96
100
 
97
101
# Clean before running the test suite, since the build might fail depending
98
102
# what source changes happened. (e.g. apidoc depends on interfaces)
100
104
        # Run all tests. test_on_merge.py takes care of setting up the
101
105
        # database.
102
106
        ${PY} -t ./test_on_merge.py $(VERBOSITY) $(TESTOPTS)
103
 
        bzr status --no-pending
104
107
 
105
108
check_mailman: build
106
109
        # Run all tests, including the Mailman integration
230
233
$(subst $(PY),,$(BUILDOUT_BIN)): $(PY)
231
234
 
232
235
compile: $(PY) $(BZR_VERSION_INFO)
 
236
        mkdir -p /var/tmp/vostok-archive
233
237
        ${SHHH} $(MAKE) -C sourcecode build PYTHON=${PYTHON} \
234
238
            LPCONFIG=${LPCONFIG}
235
239
        ${SHHH} LPCONFIG=${LPCONFIG} ${PY} -t buildmailman.py
250
254
        # Handle merge proposal email jobs.
251
255
        $(PY) cronscripts/merge-proposal-jobs.py -v
252
256
 
253
 
run: build inplace stop
254
 
        bin/run -r librarian,google-webservice,memcached,rabbitmq,txlongpoll -i $(LPCONFIG)
255
 
 
256
 
run-testapp: LPCONFIG=testrunner-appserver
257
 
run-testapp: build inplace stop
258
 
        LPCONFIG=$(LPCONFIG) INTERACTIVE_TESTS=1 bin/run-testapp \
259
 
        -r memcached -i $(LPCONFIG)
 
257
run: check_schema inplace stop
 
258
        bin/run -r librarian,google-webservice,memcached -i $(LPCONFIG)
260
259
 
261
260
run.gdb:
262
261
        echo 'run' > run.gdb
263
262
 
264
 
start-gdb: build inplace stop support_files run.gdb
 
263
start-gdb: check_schema inplace stop support_files run.gdb
265
264
        nohup gdb -x run.gdb --args bin/run -i $(LPCONFIG) \
266
265
                -r librarian,google-webservice
267
266
                > ${LPCONFIG}-nohup.out 2>&1 &
268
267
 
269
 
run_all: build inplace stop
 
268
run_all: check_schema inplace stop
270
269
        bin/run \
271
 
         -r librarian,sftp,forker,mailman,codebrowse,google-webservice,memcached,rabbitmq,txlongpoll \
 
270
         -r librarian,sftp,forker,mailman,codebrowse,google-webservice,memcached \
272
271
         -i $(LPCONFIG)
273
272
 
274
273
run_codebrowse: build
280
279
stop_codebrowse:
281
280
        $(PY) scripts/stop-loggerhead.py
282
281
 
283
 
run_codehosting: build inplace stop
 
282
run_codehosting: check_schema inplace stop
284
283
        bin/run -r librarian,sftp,forker,codebrowse -i $(LPCONFIG)
285
284
 
286
285
start_librarian: compile
374
373
            -name '*.lo' -o -name '*.py[co]' -o -name '*.dll' \) \
375
374
            -print0 | xargs -r0 $(RM)
376
375
        $(RM) -r lib/mailman
377
 
        $(RM) -r $(LP_BUILT_JS_ROOT)/*
378
 
        $(RM) -r $(CODEHOSTING_ROOT)
379
 
        $(RM) -r $(APIDOC_DIR)
380
 
        $(RM) -r $(APIDOC_DIR).tmp
 
376
        $(RM) -rf $(LP_BUILT_JS_ROOT)/*
 
377
        $(RM) -rf $(CODEHOSTING_ROOT)
 
378
        $(RM) -rf $(APIDOC_DIR)
 
379
        $(RM) -rf $(APIDOC_DIR).tmp
381
380
        $(RM) $(BZR_VERSION_INFO)
382
381
        $(RM) +config-overrides.zcml
383
 
        $(RM) -r \
 
382
        $(RM) -rf \
384
383
                          /var/tmp/builddmaster \
385
384
                          /var/tmp/bzrsync \
386
385
                          /var/tmp/codehosting.test \
396
395
        # /var/tmp/launchpad_mailqueue is created read-only on ec2test
397
396
        # instances.
398
397
        if [ -w /var/tmp/launchpad_mailqueue ]; then \
399
 
                $(RM) -r /var/tmp/launchpad_mailqueue; \
 
398
                $(RM) -rf /var/tmp/launchpad_mailqueue; \
400
399
        fi
401
400
 
402
401
 
430
429
        sed -e 's,%BRANCH_REWRITE%,$(shell pwd)/scripts/branch-rewrite.py,' \
431
430
                configs/development/local-launchpad-apache > \
432
431
                /etc/apache2/sites-available/local-launchpad
 
432
        cp configs/development/local-vostok-apache \
 
433
                /etc/apache2/sites-available/local-vostok
433
434
        touch /var/tmp/bazaar.launchpad.dev/rewrite.log
434
435
        chown $(SUDO_UID):$(SUDO_GID) /var/tmp/bazaar.launchpad.dev/rewrite.log
435
436
 
436
437
enable-apache-launchpad: copy-apache-config copy-certificates
437
438
        a2ensite local-launchpad
 
439
        a2ensite local-vostok
438
440
 
439
441
reload-apache: enable-apache-launchpad
440
442
        /etc/init.d/apache2 restart
460
462
                --docformat restructuredtext --verbose-about epytext-summary \
461
463
                $(PYDOCTOR_OPTIONS)
462
464
 
463
 
.PHONY: apidoc build_eggs buildonce_eggs buildout_bin check check       \
464
 
        check_config check_mailman clean clean_buildout clean_js        \
465
 
        clean_logs compile css_combine debug default doc ftest_build    \
466
 
        ftest_inplace hosted_branches jsbuild jsbuild_widget_css        \
467
 
        launchpad.pot pagetests pull_branches pydoctor realclean        \
468
 
        reload-apache run run-testapp runner scan_branches schema       \
469
 
        sprite_css sprite_image start stop sync_branches TAGS tags      \
470
 
        test_build test_inplace zcmldocs
 
465
.PHONY: apidoc buildout_bin check doc tags TAGS zcmldocs realclean \
 
466
        clean debug stop start run ftest_build ftest_inplace \
 
467
        test_build test_inplace pagetests check schema default \
 
468
        launchpad.pot pull_branches scan_branches sync_branches \
 
469
        reload-apache hosted_branches check_mailman check_config \
 
470
        jsbuild jsbuild_widget_css clean_js clean_buildout buildonce_eggs \
 
471
        build_eggs sprite_css sprite_image css_combine compile \
 
472
        check_schema pydoctor clean_logs