1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
|
.NOTPARALLEL:
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
else
NUMJOBS := 1
ifeq ($(DEB_HOST_ARCH),i386)
NUMJOBS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
else ifeq ($(DEB_HOST_ARCH),amd64)
NUMJOBS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
endif
endif
AC_OPTFLAGS = --gnu-int128
export AC_OPTFLAGS
ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
NUMJOBS := 1
endif
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS := -O0 -g
else
CFLAGS := -O2 -g
endif
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifneq (,$(filter $(DEB_BUILD_ARCH),armel armhf))
CFLAGS := -O1 -g
endif
ifneq (,$(filter $(DEB_BUILD_ARCH),mips mipsel))
CFLAGS += -fPIC
endif
export CFLAGS
PUMA_CONFIG=$(CURDIR)/puma.config
test-builds: build-arch-stamp
Ag++/bin/linux-release/ag++ --gen_config
echo '-D "__cplusplus=199711L"' >> $(PUMA_CONFIG)
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-$(MAKE) -C AspectC++ PUMA_CONFIG=$(PUMA_CONFIG) FRONTEND=Clang LLVMCONF=/usr/bin/llvm-config-11 SHARED=1 AC="$(CURDIR)/AspectC++/bin/linux-release/ac++" REGRESSIONTEST=1 examples test
PATH=$(CURDIR)/AspectC++/bin/linux-release:$(PATH) \
$(MAKE) -C Ag++/ SHARED=1 PUMA_CONFIG=$(PUMA_CONFIG) test
endif
build: build-arch build-indep
build-arch: build-arch-stamp test-builds
build-arch-stamp:
dh_testdir
$(MAKE) -C Puma/ MINI=1 -j$(NUMJOBS) all
$(MAKE) -C AspectC++/ SHARED=1 -j$(NUMJOBS) all FRONTEND=Clang LLVMCONF=/usr/bin/llvm-config-11
$(MAKE) -C Ag++/ SHARED=1 -j$(NUMJOBS) all
$(MAKE) -C Puma clean
$(MAKE) -C Puma all AC="$(CURDIR)/AspectC++/bin/linux-release/ac++" -j$(NUMJOBS) EXTENSIONS="acppext gnuext winext"
docbook-to-man debian/ac++.1.sgml > ac++.1
docbook-to-man debian/ag++.1.sgml > ag++.1
touch $@
build-indep: build-indep-stamp
build-indep-stamp:
dh_testdir
$(MAKE) -C Puma doc
touch $@
clean:
dh_testdir
dh_testroot
dh_clean build-*stamp binary-*stamp puma.config
$(MAKE) -s -C Puma cleanall
$(MAKE) -s -C AspectC++ cleanall FRONTEND=Clang LLVMCONF=/usr/bin/llvm-config-11
$(MAKE) -s -C Ag++ clean
rm -rf Puma/include
rm -rf AspectC++/tests/RepoVersion/repo.use
rm -rf Ag++/DepFiles Ag++/ObjFiles Ag++/bin Ag++/tests/test_11.config
rm -rf AspectC++/DepFiles AspectC++/ObjFiles AspectC++/bin
rm -rf AspectC++/tests/*/feature.out
rm -rf AspectC++/tests/RepoVersion/feature.fil
rm -f ac++.1 ag++.1
rm -rf AspectC++/bin
rm -rf Puma.copy/
rm -rf Ag++/tests/src/obj
rm -rf Ag++/tests/src/test
dh_clean
binary-indep: build-indep
dh_testdir
dh_testroot
dh_prep
dh_installchangelogs
dh_installdocs -p libpuma-doc Puma/doc/RefMan/html
dh_installexamples -p libpuma-doc Puma/examples/*
dh_compress -X.cc -X.map
dh_fixperms
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
binary-arch: build-arch
dh_testdir
dh_testroot
dh_prep
dh_installdirs
dh_installchangelogs
dh_installdocs
dh_install -Xlicence_1_0.txt
dh_installexamples -p aspectc++ AspectC++/examples/*
find debian/aspectc++ -name Makefile -exec rm -v {} +
find debian/libpuma-doc -name Makefile -exec rm -v {} +
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build build-indep build-arch clean binary-indep binary-arch binary
|