File: rules

package info (click to toggle)
bmake 20160220-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 3,024 kB
  • sloc: ansic: 17,511; sh: 937; python: 442; makefile: 323; perl: 68
file content (46 lines) | stat: -rwxr-xr-x 1,425 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

#export DH_VERBOSE=1

ARCH=$(patsubst mips,mipseb,$(shell dpkg-architecture -qDEB_HOST_ARCH_CPU))
MULTIARCH=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
MAKE_VERSION=$(shell sed -n '/^MAKE_VERSION=/s,.*=[^0-9]*,,p' Makefile)
CFLAGS=$(shell dpkg-buildflags --get CFLAGS) \
	-D__COPYRIGHT\(x\)= -D__RCSID\(x\)= \
	-I. -DMACHINE=\\\"debian\\\" -DMACHINE_ARCH=\\\"${ARCH}\\\" \
	-DMACHINE_MULTIARCH=\\\"${MULTIARCH}\\\" \
	-DHAVE_CONFIG_H -DNEED_HOST_CDEFS_H -DMAKE_NATIVE \
	-DUSE_META -D_PATH_DEFSYSPATH=\\\"/usr/share/mk\\\" \
	-DMAKE_VERSION=\\\"${MAKE_VERSION}\\\" \
	-Wno-unused

DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CROSS :=
else
CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc
endif

%:
	dh $@ --with=autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --with-machine=debian

override_dh_auto_build:
	$(MAKE) -f Makefile.boot CFLAGS="$(CFLAGS)" $(CROSS)

override_dh_auto_test:

override_dh_auto_clean:
	$(MAKE) -f Makefile.boot clean

override_dh_auto_install:
	ln -s bmake pmake
	groff -Tascii -ms PSD.doc/tutorial.ms > \
	      PSD.doc/tutorial.asc
	groff -Tps -ms PSD.doc/tutorial.ms > \
	      PSD.doc/tutorial.ps

.PHONY: override_dh_auto_configure override_dh_auto_build override_dh_auto_test override_dh_auto_clean override_dh_auto_install