]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/apr/Makefile.in
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / apr / Makefile.in
1
2 srcdir=@srcdir@
3 VPATH=@srcdir@
4 top_srcdir=@apr_srcdir@
5 top_blddir=@apr_builddir@
6
7 #
8 # APR (Apache Portable Runtime) library Makefile.
9 #
10 CPP = @CPP@
11
12 # get substituted into some targets
13 APR_MAJOR_VERSION=@APR_MAJOR_VERSION@
14
15 #
16 # Macros for supporting directories
17 #
18 INCDIR=./include
19 OSDIR=$(top_srcdir)/include/arch/@OSDIR@
20 DEFOSDIR=$(INCDIR)/arch/@DEFAULT_OSDIR@
21 INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR) -I$(top_srcdir)/include/arch/@DEFAULT_OSDIR@ -I$(top_srcdir)/include
22
23 #
24 # Macros for target determination
25 #
26 CLEAN_SUBDIRS= test
27 INSTALL_SUBDIRS=@INSTALL_SUBDIRS@
28
29 TARGET_LIB = lib@APR_LIBNAME@.la
30 APR_PCFILE = apr-$(APR_MAJOR_VERSION).pc
31 APR_CONFIG = apr-$(APR_MAJOR_VERSION)-config
32 INSTALL = @INSTALL@
33 INSTALL_DATA = @INSTALL_DATA@
34
35 #
36 # Rules for building specific targets, starting with 'all' for
37 # building the entire package.
38 #
39 TARGETS = $(TARGET_LIB) apr.exp apr-config.out build/apr_rules.out
40
41 LT_VERSION = @LT_VERSION@
42
43 # bring in rules.mk for standard functionality
44 @INCLUDE_RULES@
45 @INCLUDE_OUTPUTS@
46
47 CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
48         build/apr_rules.out
49 DISTCLEAN_TARGETS = config.cache config.log config.status \
50         include/apr.h include/arch/unix/apr_private.h \
51         libtool $(APR_CONFIG) build/apr_rules.mk apr.pc \
52         build/pkg/pkginfo
53 EXTRACLEAN_TARGETS = configure aclocal.m4 include/arch/unix/apr_private.h.in \
54         build-outputs.mk build/ltcf-c.sh build/aclocal.m4 \
55         build/ltconfig build/ltmain.sh \
56         build/argz.m4 build/libtool.m4 build/ltoptions.m4 \
57         build/ltsugar.m4 build/ltversion.m4 build/lt~obsolete.m4
58
59 prefix=@prefix@
60 exec_prefix=@exec_prefix@
61 bindir=@bindir@
62 libdir=@libdir@
63 includedir=@includedir@
64 installbuilddir=@installbuilddir@
65
66 # Create apr-config script suitable for the install tree
67 apr-config.out: $(APR_CONFIG)
68         sed 's,^\(location=\).*$$,\1installed,' < $(APR_CONFIG) > $@
69
70 # Create apr_rules.mk suitable for the install tree
71 build/apr_rules.out: build/apr_rules.mk
72         sed -e 's,^\(apr_build.*=\).*$$,\1$(installbuilddir),' -e 's,^\(top_build.*=\).*$$,\1$(installbuilddir),' < build/apr_rules.mk > $@
73
74 install: $(TARGETS)
75         $(APR_MKDIR) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(installbuilddir) \
76                      $(DESTDIR)$(libdir)/pkgconfig $(DESTDIR)$(includedir)
77         $(INSTALL_DATA) $(top_blddir)/include/apr.h $(DESTDIR)$(includedir)
78         for f in $(top_srcdir)/include/apr_*.h; do \
79             $(INSTALL_DATA) $${f} $(DESTDIR)$(includedir); \
80         done
81         $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(TARGET_LIB) $(DESTDIR)$(libdir)
82         $(INSTALL_DATA) apr.exp $(DESTDIR)$(libdir)/apr.exp
83         $(INSTALL_DATA) apr.pc $(DESTDIR)$(libdir)/pkgconfig/$(APR_PCFILE)
84         for f in libtool shlibtool; do \
85             if test -f $${f}; then $(INSTALL) -m 755 $${f} $(DESTDIR)$(installbuilddir); fi; \
86         done
87         $(INSTALL) -m 755 $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(installbuilddir)
88         for f in make_exports.awk make_var_export.awk; do \
89             $(INSTALL_DATA) $(top_srcdir)/build/$${f} $(DESTDIR)$(installbuilddir); \
90         done
91         $(INSTALL_DATA) build/apr_rules.out $(DESTDIR)$(installbuilddir)/apr_rules.mk
92         $(INSTALL) -m 755 apr-config.out $(DESTDIR)$(bindir)/$(APR_CONFIG)
93         @if [ $(INSTALL_SUBDIRS) != "none" ]; then \
94             for i in $(INSTALL_SUBDIRS); do \
95                 ( cd $$i ; $(MAKE) DESTDIR=$(DESTDIR) install ); \
96             done \
97         fi
98
99 $(TARGET_LIB): $(OBJECTS)
100         $(LINK) @lib_target@ $(ALL_LIBS)
101
102 exports.c: $(HEADERS)
103         $(APR_MKEXPORT) $(HEADERS) > $@
104
105 export_vars.c: $(HEADERS)
106         $(APR_MKVAREXPORT) $(HEADERS) > $@
107
108 apr.exp: exports.c export_vars.c
109         @echo "#! lib@APR_LIBNAME@.so" > $@
110         @echo "* This file was AUTOGENERATED at build time." >> $@
111         @echo "* Please do not edit by hand." >> $@
112         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
113         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.c | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@
114
115 dox:
116         doxygen $(top_srcdir)/docs/doxygen.conf
117
118 gcov: 
119         @build/run-gcov.sh
120
121 test: check
122 check: $(TARGET_LIB)
123         cd test && $(MAKE) all check
124
125 etags:
126         etags `find . -name '*.[ch]'`
127
128 # DO NOT REMOVE
129 docs: $(INCDIR)/*.h