- cleanup + simplify buildlib/tools.m4 handling (Ralf)
[apt.git] / buildlib / Makefile.am
1
2 all-local: copy-headers
3
4 EXTRA_DIST = \
5              archtable \
6              ostable \
7              config.h.in \
8              gettext.h \
9              inttypes.h \
10              statvfs.h \
11              netdb.h
12
13 CLEANFILES  = $(top_builddir)/include/apti18n.h \
14               $(top_builddir)/include/inttypes.h \
15               $(top_builddir)/include/sys/statvfs.h \
16               $(top_builddir)/include/netdb.h
17
18
19 COPYHEADERS = copy-apti18n
20
21 if NEED_INTTYPES_H
22 COPYHEADERS += copy-inttypes
23 endif
24 if NEED_STATVFS_H
25 COPYHEADERS += copy-statvfs
26 endif
27 if NEED_NETDB_H
28 COPYHEADERS += copy-netdb
29 endif
30
31 copy-headers: $(COPYHEADERS)
32
33 copy-apti18n:
34         @$(mkinstalldirs) $(top_builddir)/include
35         @echo "Copying gettext.h to $(top_builddir)/include/apti18n.h"
36         @cp -f -p $(srcdir)/gettext.h $(top_builddir)/include/apti18n.h
37         
38 copy-inttypes:
39         @echo "Copying inttypes.h to $(top_builddir)/include/inttypes.h"
40         @cp -f -p $(srcdir)/inttypes.h $(top_builddir)/include/inttypes.h
41
42 copy-statvfs:
43         @$(mkinstalldirs) $(top_builddir)/include/sys
44         @echo "Copying statvfs.h to $(top_builddir)/include/sys/statvfs.h"
45         @cp -f -p $(srcdir)/statvfs.h $(top_builddir)/include/sys/statvfs.h
46
47 copy-netdb:
48         @echo "Copying netdb.h to $(top_builddir)/include/netdb.h"
49         @cp -f -p $(srcdir)/netdb.h $(top_builddir)/include/netdb.h