File: rules

package info (click to toggle)
scheme2c 2012.10.14-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,692 kB
  • ctags: 7,013
  • sloc: ansic: 62,496; lisp: 15,686; asm: 873; makefile: 681; sh: 19; csh: 9
file content (56 lines) | stat: -rwxr-xr-x 1,565 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
55
56
#!/usr/bin/make -f

arch := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifeq ($(arch),amd64)
  S2C_ARCH = AMD64
else ifeq ($(arch),i386)
  S2C_ARCH = LINUX
else ifeq ($(arch),armel)
  S2C_ARCH = ARM
else ifeq ($(arch),armhf)
  S2C_ARCH = ARM
else ifeq ($(arch),kfreebsd-i386)
  S2C_ARCH = OPENBSD
else
  $(warning Warning: unsupported architecture $(arch))
  S2C_ARCH = UNSUPPORTED
endif

%:
	dh $@ --parallel

override_dh_auto_configure:
	$(MAKE) for$(S2C_ARCH) $(path_opts)

path_opts = \
 prefix=/usr \
 MANDIR='$$(prefix)/share/man' \
 DOCDIR='$$(prefix)/share/doc/scheme2c'

install_opts = \
 DESTDIR=`pwd`/debian/tmp \
 $(path_opts)

override_dh_auto_build:
	$(MAKE) -C $(S2C_ARCH)	     $(path_opts) # architecture dependent, executables
	$(MAKE) -C $(S2C_ARCH)/cdecl $(path_opts) all # sizeof cdecl
	$(MAKE) -C $(S2C_ARCH)/xlib  $(path_opts) sizeof.cdecl libs2cxl.a s2cixl
	$(MAKE) -C doc		     $(path_opts) # architecture independent, documentation
	$(MAKE) -C doc pdfs=r4rs.pdf $(path_opts) # architecture independent, documentation

override_dh_auto_install:
	$(MAKE) -C $(S2C_ARCH)/scrt  $(install_opts) install
	$(MAKE) -C $(S2C_ARCH)/scsc  $(install_opts) install
	$(MAKE) -C $(S2C_ARCH)/cdecl $(install_opts) install
	$(MAKE) -C $(S2C_ARCH)/xlib  $(install_opts) install
	$(MAKE) -C doc               $(install_opts) install
	$(MAKE) -C doc pdfs=r4rs.pdf $(install_opts) install

override_dh_compress:
	dh_compress --exclude=.pdf --exclude=scheme2c-doc/examples/

ifneq ($(S2C_ARCH),)
override_dh_auto_clean:
	-rm -rf $(S2C_ARCH)
	dh_auto_clean
endif