]>
Commit | Line | Data |
---|---|---|
066427d0 AL |
1 | # -*- make -*- |
2 | ||
3 | # This is the build directory make file, it sets the build directory | |
4 | # and runs the src makefile. | |
53da8d70 | 5 | ifndef NOISY |
faf4e30c | 6 | .SILENT: |
53da8d70 | 7 | endif |
8484ee17 | 8 | include environment.mak |
066427d0 AL |
9 | |
10 | SRCDIR=@top_srcdir@ | |
f00ce0ae AL |
11 | DIRS:=./docs ./bin ./obj ./include ./scripts |
12 | SUBDIRS:= $(DIRS) ./docs/examples ./bin/methods ./include/apt-pkg \ | |
c3c459fc | 13 | ./include/deity ./obj/apt-pkg ./obj/deity ./obj/gui ./obj/cmdline \ |
f00ce0ae | 14 | ./obj/test ./obj/methods ./obj/methods/ftp ./scripts/dselect |
066427d0 AL |
15 | BUILD:=$(shell pwd) |
16 | export BUILD | |
17 | ||
18 | # Chain to the parent make to do the actual building | |
f00ce0ae AL |
19 | .PHONY: headers library clean veryclean all binary program doc \ |
20 | veryclean/local | |
6322370b AL |
21 | all headers library clean veryclean binary program doc: |
22 | $(MAKE) -C $(SRCDIR) -f Makefile $@ | |
f00ce0ae AL |
23 | |
24 | # Purge everything. | |
25 | .PHONY: maintainer-clean dist-clean pristine sanity distclean | |
26 | maintainer-clean dist-clean pristine sanity distclean: | |
27 | -rm -rf $(DIRS) | |
28 | -rm -f config.cache config.log config.status environment.mak makefile | |
066427d0 AL |
29 | |
30 | # This makes any missing directories | |
31 | .PHONY: dirs | |
32 | MISSING_DIRS:= $(filter-out $(wildcard $(SUBDIRS)),$(SUBDIRS)) | |
33 | dirs: | |
101030ab | 34 | @rm -f include/sys |
066427d0 AL |
35 | ifneq ($(words $(MISSING_DIRS)),0) |
36 | @mkdir $(MISSING_DIRS) | |
066427d0 | 37 | endif |
8484ee17 | 38 | ifeq ($(HAVE_C9X),yes) |
101030ab | 39 | @rm -f include/inttypes.h > /dev/null 2>&1 |
51761e5e | 40 | else |
f58a97d3 | 41 | @cp -p $(SRCDIR)/buildlib/inttypes.h.in include/inttypes.h |
51761e5e | 42 | endif |
101030ab AL |
43 | ifeq ($(HAVE_STATVFS),yes) |
44 | @rm -f include/statvfs.h > /dev/null 2>&1 | |
45 | else | |
f58a97d3 | 46 | @cp -p $(SRCDIR)/buildlib/statvfs.h.in include/statvfs.h |
101030ab AL |
47 | ln -sf . include/sys |
48 | endif | |
1cecba4d AL |
49 | ifeq ($(NEED_SOCKLEN_T_DEFINE),yes) |
50 | @cp -p $(SRCDIR)/buildlib/netdb.h.in include/netdb.h | |
51 | else | |
52 | @rm -f include/netdb.h > /dev/null 2>&1 | |
53 | endif |