Home | History | Annotate | Line # | Download | only in debian
rules revision 1.1
      1  1.1  christos #!/usr/bin/make -f
      2  1.1  christos # MAde with the aid of dh_make, by Craig Small
      3  1.1  christos # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
      4  1.1  christos # Some lines taken from debmake, by Cristoph Lameter.
      5  1.1  christos 
      6  1.1  christos # Uncomment this to turn on verbose mode.
      7  1.1  christos #export DH_VERBOSE=1
      8  1.1  christos 
      9  1.1  christos # These are used for cross-compiling and for saving the configure script
     10  1.1  christos # from having to guess our platform (since we know it already)
     11  1.1  christos DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
     12  1.1  christos DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
     13  1.1  christos 
     14  1.1  christos CFLAGS =
     15  1.1  christos 
     16  1.1  christos ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
     17  1.1  christos         CFLAGS += -O0
     18  1.1  christos else
     19  1.1  christos         CFLAGS += -O2
     20  1.1  christos endif
     21  1.1  christos ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
     22  1.1  christos         INSTALL_PROGRAM += -s
     23  1.1  christos endif
     24  1.1  christos 
     25  1.1  christos 
     26  1.1  christos configure: configure-stamp
     27  1.1  christos configure-stamp:
     28  1.1  christos 	dh_testdir
     29  1.1  christos 
     30  1.1  christos 	CFLAGS="$(CFLAGS)" ./configure \
     31  1.1  christos 		--host=$(DEB_HOST_GNU_TYPE) \
     32  1.1  christos 		--build=$(DEB_BUILD_GNU_TYPE) \
     33  1.1  christos 		--prefix=/usr \
     34  1.1  christos 		--mandir=\$${prefix}/share/man \
     35  1.1  christos 		--sysconfdir=/etc \
     36  1.1  christos 		--program-transform-name='s,^,b,'
     37  1.1  christos 
     38  1.1  christos 	touch configure-stamp
     39  1.1  christos 
     40  1.1  christos build: build-stamp
     41  1.1  christos build-stamp: configure-stamp
     42  1.1  christos 	dh_testdir
     43  1.1  christos 
     44  1.1  christos 	$(MAKE)
     45  1.1  christos 
     46  1.1  christos 	touch build-stamp
     47  1.1  christos 
     48  1.1  christos clean:
     49  1.1  christos 	dh_testdir
     50  1.1  christos 	dh_testroot
     51  1.1  christos 
     52  1.1  christos 	[ ! -f Makefile ] || $(MAKE) clean
     53  1.1  christos 
     54  1.1  christos 	rm -f configure-stamp build-stamp install-stamp \
     55  1.1  christos 		config.cache config.h config.status config.log makefile
     56  1.1  christos 
     57  1.1  christos 	rm -f *.o yacc
     58  1.1  christos 
     59  1.1  christos 	dh_clean
     60  1.1  christos 
     61  1.1  christos install: install-stamp
     62  1.1  christos install-stamp: build-stamp
     63  1.1  christos 	dh_testdir
     64  1.1  christos 	dh_testroot
     65  1.1  christos 	dh_clean -k
     66  1.1  christos 	dh_installdirs
     67  1.1  christos 
     68  1.1  christos 	$(MAKE) install DESTDIR=$(CURDIR)/debian/byacc
     69  1.1  christos 
     70  1.1  christos 	touch install-stamp
     71  1.1  christos 
     72  1.1  christos # Build architecture-independent files here.
     73  1.1  christos binary-indep: build install
     74  1.1  christos # No binary-indep target.
     75  1.1  christos 
     76  1.1  christos # Build architecture-dependent files here.
     77  1.1  christos binary-arch: build install
     78  1.1  christos 	dh_testdir
     79  1.1  christos 	dh_testroot
     80  1.1  christos 	dh_installdocs
     81  1.1  christos 	dh_installexamples
     82  1.1  christos 	dh_installchangelogs CHANGES
     83  1.1  christos 	dh_strip
     84  1.1  christos 	dh_compress
     85  1.1  christos 	dh_fixperms
     86  1.1  christos 	dh_installdeb
     87  1.1  christos 	dh_shlibdeps
     88  1.1  christos 	dh_gencontrol
     89  1.1  christos 	dh_md5sums
     90  1.1  christos 	dh_builddeb
     91  1.1  christos 
     92  1.1  christos binary: binary-indep binary-arch
     93  1.1  christos .PHONY: build clean binary-indep binary-arch binary install install-stamp
     94