File: rules

package info (click to toggle)
jam 2.6-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 1,316 kB
  • ctags: 1,068
  • sloc: ansic: 7,827; yacc: 443; sh: 63; makefile: 48
file content (54 lines) | stat: -rwxr-xr-x 1,447 bytes parent folder | download
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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# GNU copyright 2001 by Yann Dirson.

# This is the debian/rules file for packages jam and ftjam
# It should be usable with both packages without any change

# find out package name (jam/ftjam)
jam = $(strip $(shell dpkg-parsechangelog | grep ^Source: | cut -d: -f2))

# original jam should not get the same name as the alternative
ifeq (${jam},jam)
binname = jam.perforce
else
binname = ${jam}
endif

%:
	dh $@

GENERATED = jamgram.c jamgram.h jambase.c jamgramtab.h

override_dh_auto_build: debian/jam.1
  # backup generated files
	test -r origfiles || { mkdir origfiles && cp -a $(GENERATED) origfiles/ ; }
  # bootstrap
	${MAKE} CCFLAGS="$(CPPFLAGS) $(CFLAGS)" LINKFLAGS="$(LDFLAGS)"
  # force update of generated files
	rm -f $(GENERATED)
	${MAKE} CCFLAGS="$(CPPFLAGS) $(CFLAGS)" LINKFLAGS="$(LDFLAGS)"

%.1: %.man.sgml
	/usr/bin/docbook-to-man $< > $@

override_dh_auto_clean:
	rm -rf bin.*
	rm -f jam0 debian/jam.1
	if test -r origfiles; then \
	  mv origfiles/* . ;\
	  rmdir origfiles ;\
	fi

override_dh_auto_install:
	./jam0  -sBINDIR=$(CURDIR)/debian/${jam}/usr/bin \
		-sCCFLAGS=-g -sOPTIM=-O2 \
		install
	cd debian/${jam}/usr/bin && mv jam ${binname}
	install -d debian/${jam}/usr/share/man/man1/
	install -m644 debian/jam.1 debian/${jam}/usr/share/man/man1/${binname}.1

override_dh_installdocs:
	dh_installdocs
	dh_buildinfo