blob: a1fe24543729bca303b06afbba5cf18cb8836de1 [file] [log] [blame]
Eric Andersenb108a5b2000-06-19 09:21:34 +00001#!/usr/bin/make -f
2
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +00003# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This is the debhelper compatibility version to use.
Glenn L McGrath1b16bf62002-11-23 07:14:55 +00007export DH_COMPAT=3
Eric Andersenb108a5b2000-06-19 09:21:34 +00008
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +00009VERSION = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
10ARCH = $(shell dpkg --print-architecture)
11
Glenn L McGrath1b16bf62002-11-23 07:14:55 +000012ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +000013 DODEBUG = true
Glenn L McGrath1b16bf62002-11-23 07:14:55 +000014endif
Glenn L McGrathb9e57f42002-12-01 20:16:01 +000015ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
Glenn L McGrath1b16bf62002-11-23 07:14:55 +000016endif
Eric Andersenb108a5b2000-06-19 09:21:34 +000017
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +000018build-arch: build-arch-stamp
19build-arch-stamp:
Glenn L McGrath1b16bf62002-11-23 07:14:55 +000020 $(MAKE) clean
21 cp ./debian/config-deb .config
22 $(MAKE) dep
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +000023 $(MAKE) DODEBUG=$(DODEBUG)
24 install busybox busybox-deb
Eric Andersenb108a5b2000-06-19 09:21:34 +000025
Glenn L McGrath1b16bf62002-11-23 07:14:55 +000026 $(MAKE) clean
27 cp ./debian/config-static .config
28 $(MAKE) dep
Glenn L McGrathc4698b32002-12-08 20:45:47 +000029 $(MAKE) DODEBUG=$(DODEBUG)
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +000030 install busybox busybox-static
Glenn L McGrath1b16bf62002-11-23 07:14:55 +000031
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +000032 $(MAKE) clean
33 cp ./debian/config-udeb .config
34 $(MAKE) dep
35 $(MAKE) DODEBUG=$(DODEBUG)
Eric Andersene2f6e122000-12-01 19:55:04 +000036
Glenn L McGrathc4698b32002-12-08 20:45:47 +000037 $(MAKE) docs/BusyBox.1
38
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +000039 touch build-arch-stamp
40
Glenn L McGrathc4698b32002-12-08 20:45:47 +000041build: build-arch
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +000042
43clean:
Glenn L McGrath12371f92002-11-26 02:16:06 +000044 dh_testdir
45 dh_testroot
Glenn L McGrathc4698b32002-12-08 20:45:47 +000046 rm -f build-arch-stamp build-indep-stamp debian/files~
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +000047
48 $(MAKE) distclean
Glenn L McGrath147a3ca2003-01-14 21:41:12 +000049 -rm -f busybox-deb busybox-static busybox.1
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +000050
51 dh_clean
52
53install: build-arch
54 dh_testdir
55 dh_testroot
56 dh_clean -k
57 dh_installdirs
58
59 install busybox-deb $(CURDIR)/debian/busybox-cvs/bin/busybox
60 install busybox-static $(CURDIR)/debian/busybox-cvs-static/bin/busybox
61 $(MAKE) PREFIX=$(CURDIR)/debian/busybox-cvs-udeb install
Glenn L McGrathc4698b32002-12-08 20:45:47 +000062 cp docs/BusyBox.1 busybox.1
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +000063
Glenn L McGrathc4698b32002-12-08 20:45:47 +000064 install -m644 debian/busybox-cvs-static.override \
65 debian/busybox-cvs-static/usr/share/lintian/overrides/busybox-cvs-static
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +000066
67# Build architecture-dependent files here.
68binary-arch: build-arch install
69 dh_testdir -a
70 dh_testroot -a
71# dh_installdebconf -a
72 dh_installdocs -a -Nbusybox-cvs-udeb
73# dh_installexamples -a
74# dh_installmenu -a
75# dh_installlogrotate -a
76# dh_installemacsen -a
77# dh_installpam -a
78# dh_installmime -a
79# dh_installinit -a
80# dh_installcron -a
Glenn L McGrathc4698b32002-12-08 20:45:47 +000081 dh_installman -a -Nbusybox-cvs-udeb
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +000082# dh_installinfo -a
83# dh_undocumented -a
84 dh_installchangelogs Changelog -a -Nbusybox-cvs-udeb
85 dh_strip -a
86 dh_link -a
87 dh_compress -a
88 dh_fixperms -a
89# dh_makeshlibs -a
90 dh_installdeb -a
91# dh_perl -a
92 dh_shlibdeps -a
Glenn L McGrathc4698b32002-12-08 20:45:47 +000093 dh_gencontrol -a -Nbusybox-cvs-udeb
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +000094 dh_md5sums -a -Nbusybox-cvs-udeb
95 dh_builddeb -a -Nbusybox-cvs-udeb
Glenn L McGrathc4698b32002-12-08 20:45:47 +000096
97 dh_gencontrol -pbusybox-cvs-udeb -- -fdebian/files~
Glenn L McGrath11adab02002-12-10 11:28:40 +000098 dpkg-distaddfile busybox-cvs-udeb_$(VERSION)_$(ARCH).udeb debian-installer extra
Glenn L McGrathb9e57f42002-12-01 20:16:01 +000099 dh_builddeb -pbusybox-cvs-udeb --filename=busybox-cvs-udeb_$(VERSION)_$(ARCH).udeb
Glenn L McGrath12371f92002-11-26 02:16:06 +0000100
Glenn L McGrathc4698b32002-12-08 20:45:47 +0000101binary: binary-arch
Glenn L McGrath6fc6d7f2002-12-01 02:09:19 +0000102.PHONY: build clean binary-indep binary-arch binary install