# # 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@ CLEAN_SUBDIRS= . test build INSTALL_SUBDIRS=@INSTALL_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 libtool EXTRACLEAN_TARGETS = configure aclocal.m4 include/arch/unix/apr_private.h.in prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ delete-lib: @if test -f $(TARGET_LIB); then \ for i in $(SUBDIRS); do objects="$$objects $$i/*.@so_ext@"; 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 install: $(TARGET_LIB) if [ ! -d $(includedir) ]; then \ ./build/mkdir.sh $(includedir); \ fi; \ cp include/*.h $(includedir); \ if [ ! -d $(libdir) ]; then \ ./build/mkdir.sh $(libdir); \ fi; \ $(LIBTOOL) --mode=install cp $(TARGET_LIB) $(libdir) $(LIBTOOL) --mode=install cp APRVARS $(libdir) @if [ $(INSTALL_SUBDIRS) != "none" ]; then \ for i in $(INSTALL_SUBDIRS); do \ ( cd $$i ; $(MAKE) install ); \ done \ fi $(TARGET_LIB): @for i in $(SUBDIRS); do objects="$$objects $$i/*.@so_ext@"; done ; \ $(LINK) @lib_target@ 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 > $@ dox: doxygen docs/doxygen.conf 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