~mozillateam/thunderbird/thunderbird-beta.vivid

« back to all changes in this revision

Viewing changes to debian/build/mozbuild.mk

  • Committer: Chris Coulson
  • Date: 2013-04-02 22:59:42 UTC
  • Revision ID: chris.coulson@canonical.com-20130402225942-fdq9x5wmmhoedwc5
* New upstream release from the beta channel (THUNDERBIRD_21_0b1_BUILD1)
* Drop support for building on older than precise
  - update debian/apport/source_thunderbird.py.in
  - update debian/build/mozbuild.mk
  - update debian/config/mozconfig.in
  - update debian/control.in
  - remove debian/patches/add-syspref-dir.patch
  - update debian/patches/series.in
  - remove debian/patches/use-new-yasm-in-lucid.patch
  - update debian/rules
  - update debian/thunderbird-globalmenu.dirs.in
  - update debian/thunderbird.desktop.in
  - update debian/thunderbird.dirs.in
  - update debian/thunderbird.install.in
  - update debian/thunderbird.links.in
  - update debian/thunderbird.postinst.in
  - update debian/thunderbird.postrm.in
  - update debian/thunderbird.preinst.in
* Drop the perl script for preprocessing the quilt series file
  - remove debian/build/enable-dist-patches.pl
  - update debian/build/mozbuild.mk
  - update debian/patches/series.in
* Make sure that SHELL is set in the build environment
  - update debian/build/mozbuild.mk
* Don't set the MOZCONFIG environment variable, but just copy our config
  in to the root of the source tree
  - update debian/build/mozconfig.mk
* Drop libthai suggest - this hasn't been needed for a long time
  - update debian/control
* Replace latex-xft-fonts suggest with ttf-lyx (yes, I know this is a
  transitional package since 12.10, but it avoids suggesting a different
  package for each release)
  - update debian/control
* Use virtualenv for compare-locales
  - update debian/build/create-tarball.py
  - update debian/build/mozbuild.mk
* Refactor create-tarball.py
* Fix LP: #1093665 - 'Next' button icon points upwards. Thanks to
  Richard Marti for the patch
  - update debian/patches/theme-refresh-messenger-toolbar-icons.patch
* Move some test integration patches in to a new directory
  - rename d/p/test-overrides/xpcshell-disable-addon-select-dialog-test.patch =>
      d/p/test-integration/xpcshell-disable-addon-select-dialog-test-for-adt.patch
  - rename debian/patches/update-python-virtualenv.patch =>
      d/p/test-integration/mozmill-update-python-virtualenv.patch
  - rename debian/patches/workaround-shebang-char-limit.patch =>
      d/p/test-fixes/mozmill-workaround-shebang-char-limit.patch
  - rename d/p/test-overrides/xpcshell-disable-mailglue-distribution-test.patch =>
      d/p/test-integration/xpcshell-disable-mailglue-distribution-test.patch
* Drop debian/patches/python-virtualenv-multiarch-fix.patch - fixed upstream
* Drop the ability to automatically skip xpcshell tests on an installed system that
  require write access to the application directory, preferring to just disable
  them instead. In reality, we weren't ever going to use this feature
  - remove d/p/test-integration/xpcshell-allow-omit-tests-on-real-install.patch
  - rename d/p/test-integration/xpcshell-disable-mailglue-distribution-test.patch =>
      d/p/test-integration/xpcshell-disable-tests-which-need-appdir-write-access.patch
  - update d/p/test-integration/xpcshell-disable-tests-which-need-appdir-write-access.patch
  - remove d/p/xpcshell-disable-extension-upgrade-test-for-adt.patch (merged
    in to the last patch)
  - remove d/p/test-overrides/xpcshell-disable-isp-autoconfig-test.patch
    (merged in to the last patch)
* Disable some extra failing xpcshell tests
  - rename d/p/test-overrides/xpcshell-disable-geolocation-provider-test.patch =>
      d/p/test-overrides/xpcshell-disable-failing-tests.patch
  - update d/p/test-overrides/xpcshell-disable-failing-tests.patch
  - update debian/patches/series.in
* Disable the menubar addon
  - update debian/config/mozconfig.in
  - update debian/build/mozbuild.mk
  - update debian/thunderbird-globalmenu.dirs.in
* Drop the menubar addon
  - remove debian/globalmenu
  - update debian/build/mozbuild.mk
  - update debian/config/mozconfig.in
  - update debian/control.in
  - remove debian/thunderbird-globalmenu.dirs.in
  - remove debian/patches/unity-globalmenu-build-support.patch
  - update debian/patches/series.in
* Fix build failure with --disable-updater builds
  - add debian/patches/fix-install-manifest-for-no-updater.patch
  - update debian/patches/series
* Fix a space versus tab issue in debian/build/mozbuild.mk
* Add native support for the Unity menubar (no addon)
  - add debian/patches/unity-menubar.patch
  - update debian/patches/series.in
* Refresh patches
  - update d/p/test-overrides/xpcshell-disable-geolocation-provider-test.patch
  - update debian/patches/xpcshell-allow-omit-tests-on-real-install.patch
  - update debian/patches/dont-include-hyphenation-patterns.patch
  - update d/p/test-integration/mozmill-update-python-virtualenv.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
# We need this to execute before the debian/control target gets called
20
20
clean::
21
21
        cp debian/control debian/control.old
 
22
        cp debian/tests/control debian/tests/control.old
22
23
ifneq (1, $(MOZ_DISABLE_CLEAN_CHECKS))
23
24
        touch debian/control.in
 
25
        touch debian/tests/control.in
24
26
else
25
27
        touch debian/control
 
28
        touch debian/tests/control
26
29
endif
27
30
 
28
31
-include /usr/share/cdbs/1/rules/debhelper.mk
38
41
MOZ_APP_NAME            ?= $(MOZ_PKG_NAME)
39
42
 
40
43
# Define other variables used throughout the build
41
 
# The value of "Name" to use in application.ini, which the profile location is based on.
42
 
# Derived from the desired MOZ_APP_NAME, but can be overridden
 
44
MOZ_DEFAULT_APP_NAME    ?= $(MOZ_PKG_BASENAME)
43
45
MOZ_APP_BASENAME        ?= $(shell echo $(MOZ_APP_NAME) | sed -n 's/\-.\|\<./\U&/g p')
44
 
# The default value of "Name" in the application.ini, derived from the upstream build system
45
 
# It is used for the profile location. This should be set manually if not provided
46
 
MOZ_DEFAULT_APP_BASENAME ?= $(shell . ./$(DEB_SRCDIR)/$(MOZ_APP)/confvars.sh; echo $$MOZ_APP_BASENAME)
47
 
# Equal to upstreams default MOZ_APP_NAME. If not a lower case version of the "Name"
48
 
# in application.ini, then this should be manually overridden
49
 
MOZ_DEFAULT_APP_NAME    ?= $(MOZ_DEFAULT_APP_BASENAME_L)
50
 
# Location for searchplugins
 
46
MOZ_DEFAULT_APP_BASENAME ?= $(shell echo $(MOZ_DEFAULT_APP_NAME) | sed -n 's/\-.\|\<./\U&/g p')
51
47
MOZ_SEARCHPLUGIN_DIR    ?= $(MOZ_LIBDIR)/distribution/searchplugins
52
48
 
53
 
MOZ_APP_BASENAME_L      := $(shell echo $(MOZ_APP_BASENAME) | tr A-Z a-z)
54
 
MOZ_DEFAULT_APP_BASENAME_L := $(shell echo $(MOZ_DEFAULT_APP_BASENAME) | tr A-Z a-z)
55
 
 
56
49
ifeq (,$(MOZ_APP))
57
50
$(error "Need to set MOZ_APP")
58
51
endif
62
55
ifeq (,$(MOZ_PKG_NAME))
63
56
$(error "Need to set MOZ_PKG_NAME")
64
57
endif
 
58
ifeq (,$(MOZ_PKG_BASENAME))
 
59
$(error "Need to set MOZ_PKG_BASENAME")
 
60
endif
65
61
 
66
62
MOZ_PKG_NAMES = $(shell sed -n 's/Package\: \(.*\)/\1/ p' < debian/control)
67
63
 
75
71
DEB_DH_STRIP_ARGS       := --dbg-package=$(MOZ_PKG_NAME)-dbg
76
72
# We don't want build-tree/mozilla/README to be shipped as a doc
77
73
DEB_INSTALL_DOCS_ALL    := $(NULL)
 
74
# scour breaks the testsuite
 
75
DEB_DH_SCOUR_ARGS := -N$(MOZ_PKG_NAME)-testsuite
78
76
 
79
77
MOZ_VERSION             := $(shell cat $(DEB_SRCDIR)/$(MOZ_APP)/config/version.txt)
80
78
MOZ_LIBDIR              := usr/lib/$(MOZ_APP_NAME)
91
89
else
92
90
PROFILE_BASE = $(shell echo $(MOZ_VENDOR) | tr A-Z a-z)/
93
91
endif
94
 
MOZ_PROFILEDIR          := .$(PROFILE_BASE)$(MOZ_APP_BASENAME_L)
95
 
MOZ_DEFAULT_PROFILEDIR  := .$(PROFILE_BASE)$(MOZ_DEFAULT_APP_BASENAME_L)
 
92
MOZ_PROFILEDIR          := .$(PROFILE_BASE)$(shell echo $(MOZ_APP_BASENAME) | tr A-Z a-z)
 
93
MOZ_DEFAULT_PROFILEDIR  := .$(PROFILE_BASE)$(shell echo $(MOZ_DEFAULT_APP_BASENAME) | tr A-Z a-z)
96
94
 
97
95
DEB_AUTO_UPDATE_DEBIAN_CONTROL  = no
98
96
 
99
97
MOZ_PYTHON              := $(shell which python)
 
98
VIRTENV_PYTHON          := $(CURDIR)/debian/_virtualenv/bin/python
100
99
DISTRIB                 := $(shell lsb_release -i -s)
101
100
 
102
101
CFLAGS                  := -g
130
129
endif
131
130
 
132
131
# enable the crash reporter only on i386, amd64 and armel
133
 
ifeq (,$(filter lucid maverick natty oneiric,$(DISTRIB_CODENAME)))
134
 
SUPPORTED_ARM = armhf
135
 
else
136
 
SUPPORTED_ARM = armel
137
 
endif
138
 
ifeq (,$(filter i386 amd64 $(SUPPORTED_ARM),$(DEB_HOST_ARCH)))
 
132
ifeq (,$(filter i386 amd64 armhf,$(DEB_HOST_ARCH)))
139
133
MOZ_ENABLE_BREAKPAD = 0
140
134
endif
141
135
 
160
154
MOZ_BUILD_PGO = 0
161
155
endif
162
156
 
163
 
ifneq (,$(wildcard $(CURDIR)/debian/globalmenu))
164
 
HAVE_GLOBALMENU = 1
165
 
endif
166
 
 
167
 
ifeq (1,$(HAVE_GLOBALMENU))
168
 
ifeq (,$(filter lucid maverick, $(DISTRIB_CODENAME)))
169
 
MOZ_ENABLE_GLOBALMENU = 1
170
 
endif
171
 
endif
172
 
 
 
157
export SHELL=/bin/bash
173
158
export NO_PNG_PKG_MANGLE=1
174
159
export LDFLAGS
175
160
export DEB_BUILD_HARDENING=1
176
 
export MOZCONFIG=$(CURDIR)/debian/config/mozconfig
177
161
ifeq (Ubuntu, $(DISTRIB))
178
162
export MOZ_UA_VENDOR=Ubuntu
179
163
endif
191
175
LANGPACK_DIR := $(DEB_HOST_GNU_SYSTEM)-$(DEB_HOST_GNU_CPU)/xpi
192
176
endif
193
177
 
194
 
ifeq (1,$(MOZ_ENABLE_GLOBALMENU))
195
178
MOZ_PKG_SUPPORT_RECOMMENDS ?= $(MOZ_PKG_NAME)-globalmenu
196
 
endif
197
179
MOZ_PKG_SUPPORT_SUGGESTS ?= $(MOZ_PKG_NAME)-gnome-support
198
180
 
199
181
# Defines used for the Mozilla text preprocessor
228
210
ifeq (1,$(MOZ_DEBUG))
229
211
MOZ_DEFINES += -DMOZ_DEBUG
230
212
endif
231
 
ifeq (1,$(MOZ_ENABLE_GLOBALMENU))
232
 
MOZ_DEFINES += -DMOZ_ENABLE_GLOBALMENU
233
 
endif
234
213
ifeq (official, $(MOZ_BRANDING))
235
214
MOZ_DEFINES += -DMOZ_OFFICIAL_BRANDING
236
215
endif
243
222
 
244
223
pkgname_subst_files = \
245
224
        debian/config/mozconfig \
 
225
        debian/patches/series \
246
226
        $(MOZ_PKGNAME_SUBST_FILES) \
247
227
        $(NULL)
248
228
 
260
240
        $(MOZ_PKGCONFIG_FILES) \
261
241
        $(NULL)
262
242
 
 
243
debian/tests/control: debian/tests/control.in
 
244
        sed -e 's/@MOZ_PKG_NAME@/$(MOZ_PKG_NAME)/g' < debian/tests/control.in > debian/tests/control
 
245
 
263
246
debian/control:: debian/control.in debian/control.langpacks debian/control.langpacks.unavail debian/config/locales.shipped debian/config/locales.all
264
247
        @echo ""
265
248
        @echo "*****************************"
267
250
        @echo "*****************************"
268
251
        @echo ""
269
252
 
270
 
        sed -e 's/@MOZ_PKG_NAME@/$(MOZ_PKG_NAME)/g' < debian/control.in > debian/control
 
253
        sed -e 's/@MOZ_PKG_NAME@/$(MOZ_PKG_NAME)/g' \
 
254
            -e 's/@MOZ_LOCALE_PKGS@/$(shell perl debian/build/dump-langpack-control-entries.pl -l | sed 's/\(\,\?\)\([^\,]*\)\(\,\?\)/\1$(MOZ_PKG_NAME)\-locale\-\2 (= $${binary:Version})\3 /g')/g' < debian/control.in > debian/control
271
255
        perl debian/build/dump-langpack-control-entries.pl > debian/control.tmp
272
256
        sed -e 's/@MOZ_PKG_NAME@/$(MOZ_PKG_NAME)/g' < debian/control.tmp >> debian/control && rm -f debian/control.tmp
273
257
 
274
258
$(pkgname_subst_files): $(foreach file,$(pkgname_subst_files),$(subst $(MOZ_PKG_NAME),$(MOZ_PKG_BASENAME),$(file).in))
275
 
        $(MOZ_PYTHON) $(CURDIR)/debian/build/Preprocessor.py -Fsubstitution --marker="%%" $(MOZ_DEFINES) $(CURDIR)/$(subst $(MOZ_PKG_NAME),$(MOZ_PKG_BASENAME),$@.in) > $(CURDIR)/$@
 
259
        PYTHONDONTWRITEBYTECODE=1 $(MOZ_PYTHON) $(CURDIR)/debian/build/Preprocessor.py -Fsubstitution --marker="%%" $(MOZ_DEFINES) $(CURDIR)/$(subst $(MOZ_PKG_NAME),$(MOZ_PKG_BASENAME),$@.in) > $(CURDIR)/$@
276
260
 
277
261
$(appname_subst_files): $(foreach file,$(appname_subst_files),$(subst $(MOZ_APP_NAME),$(MOZ_PKG_BASENAME),$(file).in))
278
 
        $(MOZ_PYTHON) $(CURDIR)/debian/build/Preprocessor.py -Fsubstitution --marker="%%" $(MOZ_DEFINES) $(CURDIR)/$(subst $(MOZ_APP_NAME),$(MOZ_PKG_BASENAME),$@.in) > $(CURDIR)/$@
 
262
        PYTHONDONTWRITEBYTECODE=1 $(MOZ_PYTHON) $(CURDIR)/debian/build/Preprocessor.py -Fsubstitution --marker="%%" $(MOZ_DEFINES) $(CURDIR)/$(subst $(MOZ_APP_NAME),$(MOZ_PKG_BASENAME),$@.in) > $(CURDIR)/$@
279
263
 
280
264
%.pc: WCHAR_CFLAGS = $(shell cat $(MOZ_OBJDIR)/config/autoconf.mk | grep WCHAR_CFLAGS | sed 's/^[^=]*=[[:space:]]*\(.*\)$$/\1/')
281
265
%.pc: %.pc.in debian/stamp-makefile-build
282
 
        $(MOZ_PYTHON) $(CURDIR)/debian/build/Preprocessor.py -Fsubstitution --marker="%%" $(MOZ_DEFINES) -DWCHAR_CFLAGS="$(WCHAR_CFLAGS)" $(CURDIR)/$< > $(CURDIR)/$@
 
266
        PYTHONDONTWRITEBYTECODE=1 $(MOZ_PYTHON) $(CURDIR)/debian/build/Preprocessor.py -Fsubstitution --marker="%%" $(MOZ_DEFINES) -DWCHAR_CFLAGS="$(WCHAR_CFLAGS)" $(CURDIR)/$< > $(CURDIR)/$@
283
267
 
284
268
make-buildsymbols: debian/stamp-makebuildsymbols
285
269
debian/stamp-makebuildsymbols: debian/stamp-makefile-build
303
287
        rm -rf $(CURDIR)/debian/l10n-mergedirs/$*
304
288
        mkdir -p $(CURDIR)/debian/l10n-mergedirs/$*
305
289
 
306
 
        @export PATH=$(CURDIR)/compare-locales/scripts/:$$PATH ; \
307
 
        export PYTHONPATH=$(CURDIR)/compare-locales/lib ; \
 
290
        @export PATH=$(CURDIR)/debian/_virtualenv/bin/:$$PATH ; \
308
291
        cd $(MOZ_OBJDIR)/$(MOZ_APP)/locales ; \
309
292
                $(MAKE) merge-$* LOCALE_MERGEDIR=$(CURDIR)/debian/l10n-mergedirs/$* || exit 1 ; \
310
293
                $(MAKE) langpack-$* LOCALE_MERGEDIR=$(CURDIR)/debian/l10n-mergedirs/$* || exit 1;
317
300
        @echo "$(MOZ_PKG_SUPPORT_SUGGESTS)" | perl -0 -ne 's/[ \t\n]+/ /g; /\w/ and print "support:Suggests=$$_\n"' >> debian/$(MOZ_PKG_NAME).substvars
318
301
        @echo "$(MOZ_PKG_SUPPORT_RECOMMENDS)" | perl -0 -ne 's/[ \t\n]+/ /g; /\w/ and print "support:Recommends=$$_\n"' >> debian/$(MOZ_PKG_NAME).substvars
319
302
 
320
 
install/$(MOZ_PKG_NAME)-gnome-support::
321
 
ifneq (,$(filter lucid maverick natty, $(DISTRIB_CODENAME)))
322
 
        @echo "Adding libgconf2-4 dependency"
323
 
        @echo "gconf:Depends=libgconf2-4" >> debian/$(MOZ_PKG_NAME)-gnome-support.substvars
324
 
endif
325
 
 
326
303
ifneq ($(MOZ_PKG_NAME),$(MOZ_APP_NAME))
327
304
install/%::
328
305
        @echo "Adding conflicts / provides for renamed package"
341
318
        install -m 0644 $(CURDIR)/debian/apport/blacklist $(CURDIR)/debian/$(MOZ_PKG_NAME)/etc/apport/blacklist.d/$(MOZ_PKG_NAME)
342
319
        install -m 0644 $(CURDIR)/debian/apport/native-origins $(CURDIR)/debian/$(MOZ_PKG_NAME)/etc/apport/native-origins.d/$(MOZ_PKG_NAME)
343
320
 
344
 
ifeq (1, $(MOZ_ENABLE_GLOBALMENU))
345
 
binary-install/$(MOZ_PKG_NAME)-globalmenu::
346
 
        unzip -o -d debian/$(MOZ_PKG_NAME)-globalmenu/$(MOZ_ADDONDIR)/extensions/globalmenu@ubuntu.com/ $(MOZ_DISTDIR)/xpi-stage/globalmenu.xpi
347
 
endif
348
 
 
349
321
GNOME_SUPPORT_FILES = libmozgnome.so
350
322
binary-post-install/$(MOZ_PKG_NAME):: install-searchplugins-,$(MOZ_PKG_NAME)
351
323
        $(foreach file,$(GNOME_SUPPORT_FILES),rm -fv debian/$(MOZ_PKG_NAME)/$(MOZ_LIBDIR)/components/$(file);) true
366
338
        dh_installdirs -p$(MOZ_PKG_NAME)-locale-$* $(MOZ_ADDONDIR)/extensions
367
339
        @for lang in $(shell grep $*$$ debian/config/locales.shipped | sed -n 's/\([^\:]*\)\:\?.*/\1/ p' | tr '\n' ' '); \
368
340
        do \
369
 
                id=`python $(CURDIR)/debian/build/get-xpi-id.py $(CURDIR)/$(MOZ_DISTDIR)/$(LANGPACK_DIR)/$(MOZ_APP_NAME)-$(MOZ_VERSION).$$lang.langpack.xpi 2>/dev/null`; \
 
341
                id=`PYTHONDONTWRITEBYTECODE=1 $(MOZ_PYTHON) $(CURDIR)/debian/build/xpi-id.py $(CURDIR)/$(MOZ_DISTDIR)/$(LANGPACK_DIR)/$(MOZ_APP_NAME)-$(MOZ_VERSION).$$lang.langpack.xpi 2>/dev/null`; \
370
342
                echo "Installing $(MOZ_APP_NAME)-$(MOZ_VERSION).$$lang.langpack.xpi to $$id.xpi in to $(MOZ_PKG_NAME)-locale-$*"; \
371
343
                install -m 0644 $(CURDIR)/$(MOZ_DISTDIR)/$(LANGPACK_DIR)/$(MOZ_APP_NAME)-$(MOZ_VERSION).$$lang.langpack.xpi \
372
344
                        $(CURDIR)/debian/$(MOZ_PKG_NAME)-locale-$*/$(MOZ_ADDONDIR)/extensions/$$id.xpi; \
448
420
        # install them at binary-install/* stage, but copy them over _after_ the shlibdeps had been generated
449
421
        $(foreach file,$(GNOME_SUPPORT_FILES),mv debian/$(MOZ_PKG_NAME)-gnome-support/$(MOZ_LIBDIR)/components/$(file) debian/$(MOZ_PKG_NAME)/$(MOZ_LIBDIR)/components/;) true
450
422
 
451
 
pre-build:: auto-refresh-supported-locales $(pkgname_subst_files) $(appname_subst_files) enable-dist-patches
452
 
        cp $(CURDIR)/debian/syspref.js $(CURDIR)/debian/$(MOZ_PKG_BASENAME).js
453
 
ifeq (1,$(HAVE_GLOBALMENU))
454
 
        mkdir -p $(DEB_SRCDIR)/$(MOZ_MOZDIR)/extensions/globalmenu
455
 
        (cd debian/globalmenu && tar -cvhf - .) | (cd $(DEB_SRCDIR)/$(MOZ_MOZDIR)/extensions/globalmenu && tar -xf -)
456
 
endif
457
 
ifeq (,$(MOZ_DEFAULT_APP_BASENAME))
458
 
        $(error "Need to set MOZ_DEFAULT_APP_BASENAME")
459
 
endif
 
423
mozconfig: debian/config/mozconfig
 
424
        cp $< $@
 
425
 
 
426
create-virtualenv: $(VIRTENV_PYTHON)
 
427
$(VIRTENV_PYTHON):
 
428
        mkdir -p debian/_virtualenv
 
429
        $(MOZ_PYTHON) $(CURDIR)/$(MOZ_MOZDIR)/python/virtualenv/virtualenv.py --system-site-packages $(CURDIR)/debian/_virtualenv
 
430
        cd $(CURDIR)/$(MOZ_MOZDIR)/python/compare-locales; $(VIRTENV_PYTHON) $(CURDIR)/$(MOZ_MOZDIR)/python/compare-locales/setup.py install
 
431
 
 
432
post-patches:: create-virtualenv
 
433
 
 
434
pre-build:: auto-refresh-supported-locales $(pkgname_subst_files) $(appname_subst_files) mozconfig
460
435
ifeq (,$(MOZ_BRANDING_OPTION))
461
436
        $(error "Need to set MOZ_BRANDING_OPTION")
462
437
endif
509
484
clean:: auto-refresh-supported-locales
510
485
endif
511
486
 
512
 
ifdef PATCHES_DIST
513
 
CODENAME = $(PATCHES_DIST)
514
 
else
515
 
CODENAME = $(DISTRIB_CODENAME)
516
 
endif
517
 
 
518
 
ifdef PATCHES_ARCH
519
 
ARCH = $(PATCHES_ARCH)
520
 
else
521
 
ARCH = $(DEB_HOST_ARCH)
522
 
endif
523
 
 
524
 
enable-dist-patches:
525
 
        perl $(CURDIR)/debian/build/enable-dist-patches.pl $(CODENAME) $(ARCH)
526
 
 
527
487
RESTORE_BACKUP = $(shell if [ -f $(1).bak ] ; then rm -f $(1); mv $(1).bak $(1); fi)
528
488
 
529
489
get-orig-source: ARGS = -r $(MOZILLA_REPO) -l $(L10N_REPO) -n $(MOZ_PKG_NAME) -a $(MOZ_APP)
533
493
ifdef LOCAL_BRANCH
534
494
get-orig-source: ARGS += -c $(LOCAL_BRANCH)
535
495
endif
 
496
ifdef MOZ_MOZDIR
 
497
get-orig-source: ARGS += -m $(MOZ_MOZDIR)
 
498
endif
536
499
get-orig-source:
537
 
        python $(CURDIR)/debian/build/create-tarball.py $(ARGS)
 
500
        PYTHONDONTWRITEBYTECODE=1 $(MOZ_PYTHON) $(CURDIR)/debian/build/create-tarball.py $(ARGS)
538
501
 
539
502
echo-%:
540
503
        @echo "$($*)"
541
504
 
542
 
clean::
 
505
clean:: debian/tests/control
543
506
        @if ! cmp -s debian/control debian/control.old ; \
544
507
        then \
545
508
                echo "" ; \
552
515
                exit 1 ; \
553
516
        fi
554
517
        rm -f debian/control.old
555
 
        perl $(CURDIR)/debian/build/enable-dist-patches.pl --clean $(CURDIR)/debian/patches/series
 
518
        @if ! cmp -s debian/tests/control debian/tests/control.old ; \
 
519
        then \
 
520
                echo "" ; \
 
521
                echo "*******************************************************************************" ; \
 
522
                echo "* debian/tests/control file is out of date. Please refresh and try again      *" ; \
 
523
                echo "* To refresh, run \"debian/rules debian/tests/control\" in the source directory *" ; \
 
524
                echo "*******************************************************************************" ; \
 
525
                echo "" ; \
 
526
                rm -f debian/control.old ; \
 
527
                exit 1 ; \
 
528
        fi
 
529
        rm -f debian/tests/control.old
556
530
        rm -f $(pkgname_subst_files) $(appname_subst_files)
557
531
        rm -f debian/stamp-*
558
532
        rm -rf debian/l10n-mergedirs
559
 
        rm -f debian/$(MOZ_PKG_BASENAME).js
560
533
        rm -rf $(MOZ_OBJDIR)
561
534
        rm -f debian/searchplugin*.list
562
 
        find debian -name *.pyc -delete
563
 
        find compare-locales -name *.pyc -delete
 
535
        rm -f mozconfig
 
536
        rm -rf debian/_virtualenv
 
537
        rm -rf debian/tests/_results
564
538
 
565
 
.PHONY: make-buildsymbols make-testsuite make-langpack-xpis refresh-supported-locales auto-refresh-supported-locales enable-dist-patches get-orig-source
 
539
.PHONY: make-buildsymbols make-testsuite make-langpack-xpis refresh-supported-locales auto-refresh-supported-locales get-orig-source create-virtualenv