summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorgstein <gstein@13f79535-47bb-0310-9956-ffa450edef68>2001-01-11 09:09:43 +0000
committergstein <gstein@13f79535-47bb-0310-9956-ffa450edef68>2001-01-11 09:09:43 +0000
commit3d28d35b424526e559d4ce6c4f9e796ec5f7b737 (patch)
treeb66999b915c30ccca494e1b44b85752df25ecb72 /Makefile.in
parent25c5b5d4e5d194c3afdf9b089ca72265a1f5def3 (diff)
downloadlibapr-3d28d35b424526e559d4ce6c4f9e796ec5f7b737.tar.gz
- get libapr.la relinking when something has changed
- toss MODULES from the Makefile; it wasn't doing anything useful (SUBDIRS is the key) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61049 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in21
1 files changed, 14 insertions, 7 deletions
diff --git a/Makefile.in b/Makefile.in
index 39b4d750f..906367518 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -12,19 +12,16 @@ INCLUDES=-I$(INCDIR) -I$(INCDIR1)
#
# Macros for target determination
#
-MODULES=@MODULES@
SUBDIRS=@SUBDIRS@
-#shmem/@OSDIR@
-
-LIBAPR = libapr.la
+TARGET_LIB = libapr.la
TARGET_EXPORTS = apr.exports
#
# Rules for building specific targets, starting with 'all' for
# building the entire package.
#
-TARGETS = $(LIBAPR) delete-exports $(TARGET_EXPORTS)
+TARGETS = delete-lib $(TARGET_LIB) delete-exports $(TARGET_EXPORTS)
# bring in rules.mk for standard functionality
@INCLUDE_RULES@
@@ -39,7 +36,17 @@ EXTRACLEAN_TARGETS = configure libtool aclocal.m4 \
### fix this up at some point (install location)
libdir = /usr/local/lib
-$(LIBAPR): $(MODULES)
+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
@@ -68,7 +75,7 @@ docs:
$(srcdir)helpers/scandoc -i$(srcdir)helpers/default.pl -p./docs/ $(srcdir)include/*.h; \
fi
-test: $(LIBAPR)
+test: $(TARGET_LIB)
(cd test; make clean; make; \
cd test; \
for prog in `find . -type f -perm +u+x -name "test*" -print`; do \