Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/make -f | 1 #!/usr/bin/make -f |
| 2 export DH_VERBOSE = 1 | 2 export DH_VERBOSE = 1 |
| 3 | 3 |
| 4 # Use DEB_BUILD_OPTIONS's parallel=n option (see Policy 4.9.1) | 4 # Use DEB_BUILD_OPTIONS's parallel=n option (see Policy 4.9.1) |
| 5 ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS))) | 5 ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS))) |
| 6 PARALLEL_JOBS := $(shell echo $(DEB_BUILD_OPTIONS) | \ | 6 PARALLEL_JOBS := $(shell echo $(DEB_BUILD_OPTIONS) | \ |
| 7 sed -e 's/.*parallel=\([0-9]\+\).*/\1/') | 7 sed -e 's/.*parallel=\([0-9]\+\).*/\1/') |
| 8 else | 8 else |
| 9 PARALLEL_JOBS := 1 | 9 PARALLEL_JOBS := 1 |
| 10 endif | 10 endif |
| 11 | 11 |
| 12 DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) | |
| 13 ifeq (amd64,$(DEB_HOST_ARCH_CPU)) | 12 ifeq (amd64,$(DEB_HOST_ARCH_CPU)) |
| 14 BUILD_TYPE += ReleaseX64 | 13 BUILD_TYPE += ReleaseX64 |
| 14 ARCH += x64 | |
| 15 else | 15 else |
| 16 ifeq (i386,$(DEB_HOST_ARCH_CPU)) | 16 ifeq (i386,$(DEB_HOST_ARCH_CPU)) |
| 17 BUILD_TYPE += ReleaseIA32 | 17 BUILD_TYPE += ReleaseIA32 |
| 18 ARCH += ia32 | |
| 18 else | 19 else |
| 19 $(warning unsupported target arch $(DEB_HOST_ARCH_CPU) - continuing anyway) | 20 ifeq (arm,$(DEB_HOST_ARCH_CPU)) |
| 21 BUILD_TYPE += ReleaseXARM | |
|
Søren Gjesse
2014/08/05 15:20:29
ReleaseXARM -> ReleaseARM (no X right?)
zra
2014/08/14 20:42:53
Changed to detect whether we are doing a cross-bui
| |
| 22 ARCH += arm | |
| 23 else | |
| 24 $(error unsupported target arch '$(DEB_HOST_ARCH_CPU)') | |
| 25 endif | |
| 20 endif | 26 endif |
| 21 endif | 27 endif |
| 22 | 28 |
| 23 # Verbose? | 29 # Verbose? |
| 24 ifeq (1,$(DH_VERBOSE)) | 30 ifeq (1,$(DH_VERBOSE)) |
| 25 BUILD_ARGS += V=1 | 31 BUILD_ARGS += V=1 |
| 26 endif | 32 endif |
| 27 | 33 |
| 28 %: | 34 %: |
| 29 dh $@ | 35 dh $@ |
| 30 | 36 |
| 31 override_dh_auto_clean: | 37 override_dh_auto_clean: |
| 32 echo $(DEB_BUILD_OPTIONS) | 38 echo $(DEB_BUILD_OPTIONS) |
| 33 rm -fr dart/out dart/Makefile | 39 rm -fr dart/out dart/Makefile |
| 34 find . -name *.tmp -execdir rm -f {} \; | 40 find . -name *.tmp -execdir rm -f {} \; |
| 35 find . -name *.pyc -execdir rm -f {} \; | 41 find . -name *.pyc -execdir rm -f {} \; |
| 36 find . -name *.mk -execdir rm -f {} \; | 42 find . -name *.mk -execdir rm -f {} \; |
| 37 find . -name *.Makefile -execdir rm -f {} \; | 43 find . -name *.Makefile -execdir rm -f {} \; |
| 38 | 44 |
| 39 override_dh_auto_configure: | 45 override_dh_auto_configure: |
| 40 GYP_GENERATORS=make python dart/tools/gyp_dart.py all | 46 GYP_GENERATORS=make python dart/tools/gyp_dart.py all |
| 41 | 47 |
| 42 override_dh_auto_build: | 48 override_dh_auto_build: |
| 43 » make -C dart -j$(PARALLEL_JOBS) \ | 49 » cd dart; \ |
| 44 » » BUILDTYPE=$(BUILD_TYPE) $(BUILD_ARGS) create_sdk | 50 python tools/build.py -v -m release -a $(ARCH) $(TOOLCHAIN) create_sdk; \ |
|
Søren Gjesse
2014/08/05 15:20:29
As this is a Makefile all indentation should be TA
zra
2014/08/14 20:42:53
Done.
| |
| 51 cd .. | |
| 45 | 52 |
| 46 # Building the Dart SDK will already strip all binaries. | 53 # Building the Dart SDK will already strip all binaries. |
| 47 override_dh_strip: | 54 override_dh_strip: |
| 48 | 55 |
| 56 # This override allows us to ignore spurious missing library errors when | |
| 57 # cross-compiling. | |
| 58 override_dh_shlibdeps: | |
| 59 dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info | |
|
ricow1
2014/07/30 12:47:06
I don't know if we shoujld use tabs like you do ab
Søren Gjesse
2014/08/05 15:20:30
Use TABs in Makefiles.
zra
2014/08/14 20:42:53
Done.
zra
2014/08/14 20:42:53
Done.
| |
| 60 | |
| 49 override_dh_auto_install: | 61 override_dh_auto_install: |
| 50 mkdir -p debian/tmp/out | 62 mkdir -p debian/tmp/out |
| 51 cp -R dart/out/$(BUILD_TYPE)/dart-sdk debian/tmp/out | 63 cp -R dart/out/$(BUILD_TYPE)/dart-sdk debian/tmp/out |
| 52 mv debian/tmp/out/dart-sdk debian/tmp/out/dart | 64 mv debian/tmp/out/dart-sdk debian/tmp/out/dart |
| 53 dh_install | 65 dh_install |
| 54 dh_link | 66 dh_link |
| OLD | NEW |