File: rules

package info (click to toggle)
libast1 0.4-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 972 kB
  • ctags: 426
  • sloc: sh: 8,807; ansic: 2,874; makefile: 81
file content (85 lines) | stat: -rwxr-xr-x 1,822 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
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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper. 
# GNU copyright 1997 by Joey Hess.

export DH_COMPAT=3
export DH_OPTIONS

BUILDDIR = $(CURDIR)/debian/build
DESTDIR = $(CURDIR)/debian/libast1
INSTALL = /usr/bin/install -p
CFLAGS = -O2 -Wall
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -g
endif

build: configure $(BUILDDIR)/build-stamp
$(BUILDDIR)/build-stamp:
	dh_testdir
	$(MAKE) -C $(BUILDDIR)
	touch $@

configure: $(BUILDDIR)/configure-stamp
$(BUILDDIR)/configure-stamp:
	$(INSTALL) -d $(BUILDDIR)
	cd $(BUILDDIR); \
	CFLAGS="$(CFLAGS)" $(CURDIR)/configure \
	--prefix=/usr \
	--enable-mmx=no
	touch $@

clean:
	dh_testdir
	-$(MAKE) distclean
	rm -rf $(BUILDDIR) 
	dh_clean

install: DH_OPTIONS=
install: build 
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	
	$(INSTALL) -d $(DESTDIR)
	$(MAKE) install DESTDIR=$(DESTDIR) -C $(BUILDDIR)
	$(INSTALL) -d $(DESTDIR)-dev/usr/lib
	cd $(DESTDIR)/usr/lib; mv *.a *.la *.so $(DESTDIR)-dev/usr/lib/
	mv $(DESTDIR)/usr/include $(DESTDIR)-dev/usr
	mv $(DESTDIR)/usr/bin $(DESTDIR)-dev/usr

	$(INSTALL) -d $(DESTDIR)-dev/usr/share/man/man3
	$(INSTALL) debian/libast-config.3 $(DESTDIR)-dev/usr/share/man/man3

binary-indep:

binary-arch: DH_OPTIONS=-a
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installchangelogs ChangeLog
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_makeshlibs
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure

# snapshot checklist
# remove test from SUBDIRS in top Makefile.am
# run grep -v configure autogen.sh | sh

snapshot:
	ruby -pi -e 'sub("test","") if /SUBDIRS/' Makefile.am
	ruby -n -e '/configure/ or print' autogen.sh | sh

.PHONY: snapshot