upload http
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / srclib / apr / Makefile
1 #
2 # APR (Apache Portable Runtime) library Makefile.
3 #
4 CPP = gcc -E
5
6 # get substituted into some targets
7 APR_MAJOR_VERSION=0
8
9 #
10 # Macros for supporting directories
11 #
12 INCDIR=./include
13 INCDIR1=../include
14 INCLUDES=-I$(INCDIR) -I$(INCDIR1)
15
16 #
17 # Macros for target determination
18 #
19 SUBDIRS=strings passwd tables  file_io/unix  network_io/unix  threadproc/unix  misc/unix  locks/unix  time/unix  mmap/unix  shmem/unix  user/unix  memory/unix  atomic/unix  poll/unix  support/unix  dso/unix 
20 CLEAN_SUBDIRS= . test build
21 INSTALL_SUBDIRS=none
22
23 TARGET_LIB = libapr-${APR_MAJOR_VERSION}.la
24
25 #
26 # Rules for building specific targets, starting with 'all' for
27 # building the entire package.
28 #
29 TARGETS = delete-lib $(TARGET_LIB) delete-exports export_vars.c apr.exp
30
31 # bring in rules.mk for standard functionality
32 include /bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr/build/apr_rules.mk
33
34 CLEAN_TARGETS = apr.exp exports.c export_vars.c apr-config.out \
35         build/apr_rules.out
36 DISTCLEAN_TARGETS = config.cache config.log config.status \
37         include/apr.h include/arch/unix/apr_private.h \
38         libtool apr-config
39 EXTRACLEAN_TARGETS = configure aclocal.m4 include/arch/unix/apr_private.h.in
40
41 prefix=/bottlenecks/rubbos/app/apache2
42 exec_prefix=/bottlenecks/rubbos/app/apache2
43 bindir=${prefix}/bin
44 libdir=${prefix}/lib
45 includedir=/bottlenecks/rubbos/app/apache2/include
46 installbuilddir=${prefix}/build
47 srcdir=.
48
49 top_srcdir=/bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr
50 top_blddir=/bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr
51
52 EXPORT_FILES = $(top_srcdir)/include/*.h
53
54 delete-lib:
55         @if test -f $(TARGET_LIB); then \
56             for i in $(SUBDIRS); do objects="$$objects $$i/*.lo"; done ; \
57             if test -n "`find $$objects -newer $(TARGET_LIB)`"; then \
58                 echo Found newer objects. Will relink $(TARGET_LIB). ; \
59                 echo $(RM) -f $(TARGET_LIB) ; \
60                 $(RM) -f $(TARGET_LIB) ; \
61             fi \
62         fi
63
64 # Create apr-config script suitable for the install tree
65 apr-config.out: apr-config
66         sed 's,^\(location=\).*$$,\1installed,' < apr-config > $@
67
68 # Create apr_rules.mk suitable for the install tree
69 build/apr_rules.out: build/apr_rules.mk
70         sed 's,^\(apr_build.*=\).*$$,\1$(installbuilddir),' < build/apr_rules.mk > $@
71
72 install: $(TARGET_LIB) apr-config.out build/apr_rules.out
73         if [ ! -d $(DESTDIR)$(includedir) ]; then \
74             $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(includedir); \
75         fi;
76         cp -p $(top_srcdir)/include/*.h $(DESTDIR)$(includedir);
77
78         if test -n "$(top_blddir)"; then \
79             cp -p $(top_blddir)/include/*.h $(DESTDIR)$(includedir); \
80         fi;
81         if [ ! -d $(DESTDIR)$(libdir) ]; then \
82             $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(libdir); \
83         fi;
84         $(LIBTOOL) --mode=install cp $(TARGET_LIB) $(DESTDIR)$(libdir)
85         $(LIBTOOL) --mode=install cp apr.exp $(DESTDIR)$(libdir)
86         if [ ! -d $(DESTDIR)$(installbuilddir) ]; then \
87                 $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(installbuilddir); \
88         fi; 
89         if [ -f libtool ]; then \
90                 $(LIBTOOL) --mode=install cp libtool $(DESTDIR)$(installbuilddir); \
91         fi;
92         if [ -f shlibtool ]; then \
93                 $(LIBTOOL) --mode=install cp shlibtool $(DESTDIR)$(installbuilddir); \
94         fi;
95         for f in mkdir.sh make_exports.awk make_var_export.awk; do \
96                 cp $(top_srcdir)/build/$${f} $(DESTDIR)$(installbuilddir); \
97         done
98         cp build/apr_rules.out $(DESTDIR)$(installbuilddir)/apr_rules.mk
99         if [ ! -d $(DESTDIR)$(bindir) ]; then \
100             $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(bindir); \
101         fi;
102         $(LIBTOOL) --mode=install cp apr-config.out $(DESTDIR)$(bindir)/apr-config
103         chmod 755 $(DESTDIR)$(bindir)/apr-config
104         @if [ $(INSTALL_SUBDIRS) != "none" ]; then \
105             for i in $(INSTALL_SUBDIRS); do \
106                 ( cd $$i ; $(MAKE) DESTDIR=$(DESTDIR) install ); \
107             done \
108         fi
109
110 $(TARGET_LIB):
111         @for i in $(SUBDIRS); do objects="$$objects $$i/*.lo"; done ; \
112             tmpcmd="$(LINK) -rpath $(libdir) $$objects $(ALL_LIBS)"; \
113             echo $$tmpcmd; \
114             $$tmpcmd && touch $@
115
116 delete-exports:
117         @if test -f apr.exp; then \
118             headers="`find include/*.h -newer apr.exp`" ; \
119             if test -n "$$headers"; then \
120                 echo Found newer headers. Will rebuild apr.exp. ; \
121                 echo $(RM) -f apr.exp exports.c export_vars.h ; \
122                 $(RM) -f apr.exp exports.c export_vars.h ; \
123             fi \
124         fi
125
126 exports.c:
127         $(APR_MKEXPORT) $(EXPORT_FILES) > $@
128
129 export_vars.c:
130         $(APR_MKVAREXPORT) $(EXPORT_FILES) > $@
131
132 apr.exp: exports.c export_vars.c
133         @echo "#! libapr-${APR_MAJOR_VERSION}.so" > $@
134         @echo "* This file was AUTOGENERATED at build time." >> $@
135         @echo "* Please do not edit by hand." >> $@
136         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
137         $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.c | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@
138
139 dox:
140         doxygen $(top_srcdir)/docs/doxygen.conf
141
142 check: $(TARGET_LIB)
143         (cd test && $(MAKE) check)
144
145 # DO NOT REMOVE
146 docs: $(INCDIR)/*.h
147
148 .PHONY: delete-lib delete-exports
149 .NOTPARALLEL: delete-lib delete-exports