# # APR (Apache Portable Runtime) library Makefile. # # # Macros for supporting directories # INCDIR=./include INCDIR1=../include INCLUDES=-I$(INCDIR) -I$(INCDIR1) # # Macros for target determination # SUBDIRS=@SUBDIRS@ TARGET_LIB = libapr.la TARGET_EXPORTS = apr.exports # # Rules for building specific targets, starting with 'all' for # building the entire package. # TARGETS = delete-lib $(TARGET_LIB) delete-exports $(TARGET_EXPORTS) # bring in rules.mk for standard functionality @INCLUDE_RULES@ CLEAN_TARGETS = $(TARGET_EXPORTS) DISTCLEAN_TARGETS = config.cache config.log config.status \ include/apr.h include/arch/unix/apr_private.h \ APRVARS EXTRACLEAN_TARGETS = configure libtool aclocal.m4 \ include/arch/unix/apr_private.h.in SCANDOC_TEMPLATE = -i$(apr_builders)/scandoc_template.pl ### fix this up at some point (install location) libdir = /usr/local/lib delete-lib: @if test -f $(TARGET_LIB); then \ for i in $(SUBDIRS); do objects="$$objects $$i/*.lo"; done ; \ if test -n "`find $$objects -newer $(TARGET_LIB)`"; then \ echo Found newer objects. Will relink $(TARGET_LIB). ; \ echo $(RM) -f $(TARGET_LIB) ; \ $(RM) -f $(TARGET_LIB) ; \ fi \ fi $(TARGET_LIB): @for i in $(SUBDIRS); do objects="$$objects $$i/*.lo"; done ; \ echo $(LINK) -rpath $(libdir) $$objects ; \ $(LINK) -rpath $(libdir) $$objects delete-exports: @if test -f $(TARGET_EXPORTS); then \ headers="`find include/*.h -newer $(TARGET_EXPORTS)`" ; \ if test -n "$$headers"; then \ echo Found newer headers. Will rebuild $(TARGET_EXPORTS). ; \ echo $(RM) -f $(TARGET_EXPORTS) ; \ $(RM) -f $(TARGET_EXPORTS) ; \ fi \ fi $(TARGET_EXPORTS): $(MKEXPORT) include/*.h > $@ docs: $(SCANDOC) $(SCANDOC_TEMPLATE) -p./docs/ $(INCDIR)/*.h test: $(TARGET_LIB) (cd test; make clean; make; \ cd test; \ for prog in `find . -type f -perm +u+x -name "test*" -print`; do \ ./$$prog; \ if [ $$? -eq 255 ]; then \ echo "$$prog failed"; \ break; \ fi \ done ) # DO NOT REMOVE docs: $(INCDIR)/*.h