blob: ac3952b55921cd89d6b028195108af7567df7dbd [file] [log] [blame]
#
# Top-level Makefile for APRUTIL
#
CPP = @CPP@
INCLUDES=-I./include -I../include -I@APR_SOURCE_DIR@/include
TARGET_LIB = libaprutil.la
INSTALL_SUBDIRS = @APR_XML_DIR@
TARGETS = delete-lib $(TARGET_LIB) delete-exports aprutil.exp export_vars.h
# bring in rules.mk for standard functionality
@INCLUDE_RULES@
SUBDIRS = buckets crypto dbm encoding hooks ldap uri xml misc
CLEAN_SUBDIRS = . test
CLEAN_TARGETS =
DISTCLEAN_TARGETS = config.cache config.log config.status libtool \
include/private/apu_config.h include/private/apu_private.h \
include/private/apu_select_dbm.h include/apu.h export_vars.sh \
aprutil.exp
EXTRACLEAN_TARGETS = configure aclocal.m4 include/private/apu_config.h.in \
exports.c export_vars.h
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
top_srcdir=@top_srcdir@
EXPORT_FILES = $(top_srcdir)/include/*.h
delete-lib:
@if test -f $(TARGET_LIB); then \
objects="`find $(SUBDIRS) -name expat -prune -o -name '*.@so_ext@' -a -newer $(TARGET_LIB) -print`" ; \
if test -n "$$objects"; then \
echo Found newer objects. Will relink $(TARGET_LIB). ; \
echo $(RM) -f $(TARGET_LIB) ; \
$(RM) -f $(TARGET_LIB) ; \
fi; \
fi
install: $(TARGET_LIB)
if [ ! -d $(includedir) ]; then \
@APR_SOURCE_DIR@/build/mkdir.sh $(includedir); \
fi; \
cp include/*.h $(includedir); \
if [ ! -d $(libdir) ]; then \
@APR_SOURCE_DIR@/build/mkdir.sh $(libdir); \
fi; \
$(LIBTOOL) --mode=install cp $(TARGET_LIB) $(libdir); \
list='$(INSTALL_SUBDIRS)'; for i in $$list; do \
( cd $$i ; $(MAKE) install ); \
done
$(TARGET_LIB):
@objects="`find $(SUBDIRS) -name expat -prune -o -name '*.@so_ext@' -print`"; \
$(LINK) @lib_target@ @EXTRA_OS_LINK@
delete-exports:
@if test -f aprutil.exp; then \
headers="`find include/*.h -newer aprutil.exp -print`" ; \
if test -n "$$headers"; then \
echo Found newer headers. Will rebuild aprutil.exp. ; \
echo $(RM) -f aprutil.exp ; \
$(RM) -f aprutil.exp ; \
fi \
fi
exports.c:
$(AWK) -f @APR_SOURCE_DIR@/build/make_exports.awk $(EXPORT_FILES) > $@
export_vars.h:
$(AWK) -f @APR_SOURCE_DIR@/build/make_var_export.awk $(EXPORT_FILES) > $@
aprutil.exp: exports.c export_vars.h
@echo "#! ." > $@
@echo "* This file was AUTOGENERATED at build time." >> $@
@echo "* Please do not edit by hand." >> $@
$(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
$(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@
docs:
mkdir ./docs
perl @APR_SOURCE_DIR@/build/scandoc.pl -i./build/default.pl -p./docs/ ./include/*.h
.PHONY: delete-lib delete-exports