Fragment to properly start the build system
[ntk/apt.git] / Makefile
1 # -*- make -*-
2
3 # This is the top level make file for APT, it recurses to each lower
4 # level make file and runs it with the proper target
5 ifndef NOISY
6 .SILENT:
7 endif
8
9 .PHONY: headers library clean veryclean all binary program doc
10 all headers library clean veryclean binary program doc:
11 $(MAKE) -C apt-pkg $@
12 $(MAKE) -C methods $@
13 # $(MAKE) -C methods/ftp $@
14 $(MAKE) -C cmdline $@
15 $(MAKE) -C deity $@
16 $(MAKE) -C gui $@
17 $(MAKE) -C doc $@
18
19 .PHONY: maintainer-clean dist-clean distclean pristine sanity
20 maintainer-clean dist-clean distclean pristine sanity: veryclean
21
22
23 # The startup target builds the necessary configure scripts. It should
24 # be used after a CVS checkout.
25 .PHONY: startup
26 BUILD=build
27 CONVERTED=$(BUILD)/environment.mak $(BUILD)/include/config.h $(BUILD)/makefile
28 startup: configure $(CONVERTED)
29
30 configure: aclocal.m4 configure.in
31 autoconf
32
33 aclocal.m4:
34 aclocal -I buildlib
35
36 build:
37 mkdir $(BUILD)
38 $(BUILD)/config.status: configure
39 (HERE=`pwd`; cd $(BUILD) && $$HERE/configure)
40 $(BUILD)/include/config.h: buildlib/config.h.in
41 $(BUILD)/environment.mak: buildlib/environment.mak.in
42 $(CONVERTED):
43 (cd $(BUILD) && ./config.status)