summaryrefslogtreecommitdiff
path: root/build/apr_rules.mk.in
diff options
context:
space:
mode:
authorGreg Stein <gstein@apache.org>2004-02-05 10:16:25 +0000
committerGreg Stein <gstein@apache.org>2004-02-05 10:16:25 +0000
commit7f5b352d208fc156d060afc3d4d9bd6dd02472dc (patch)
treecfa5a711c027d72cc924b6fe5e6451b8d81fbe2c /build/apr_rules.mk.in
parent4ee50c35aa2cd7184e3e6ec836f469f08bd003f5 (diff)
downloadapr-7f5b352d208fc156d060afc3d4d9bd6dd02472dc.tar.gz
First whack at switching to a single top-level make. This adds a dependency
upon Python at packaging time, but not at end-user config/build time. As far as I can tell, the build continues to function properly. (out-of-dir config/make not tested, and apr-iconv prolly needs some work) The buildconf scripts now generate a build-outputs.mk file which is included by the root's Makefile (via the build/gen-build.py script). bulid-outputs.mk specifies all of the various files present in the distribution. The top-level Makefiles were simplified to use an $(OBJECTS) symbol rather than 'find'ing them. Similarly, a $(HEADERS) symbol is used for the exports. The corresponding delete-* targets were eliminated since we have a precise set of inputs. The subdirs' Makefiles were removed since they are no longer called/used. The apr-util/uri Makefile was responsible for compiling a C program to generate the uri_delims.h file. That process was replaced by a Python script to generate the header (called by buildconf). The .c and .dsp were left for the Windows build to continue, but that should be revamped. build/apr_rules.mk was revamped somewhat to avoid recursion, but a lot of cleanup is still needed. Much of the recursive/local/x- logic is no longer needed and can be elimianated. rules.mk was created for inclusion by N makefiles, but that isn't really true any more, so it could probably be tossed (caveat: test/Makefile). Saved for a phase 2. Some additional work was added to properly clean up files in */build/, rather than relying on a makefile in there. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64891 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/apr_rules.mk.in')
-rw-r--r--build/apr_rules.mk.in21
1 files changed, 14 insertions, 7 deletions
diff --git a/build/apr_rules.mk.in b/build/apr_rules.mk.in
index a23738738..392efa141 100644
--- a/build/apr_rules.mk.in
+++ b/build/apr_rules.mk.in
@@ -140,9 +140,9 @@ install: all-recursive
all-recursive depend-recursive:
@otarget=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; \
+ list='$(SOURCE_DIRS)'; \
for i in $$list; do \
- if test -d "$$i"; then \
+ if test -f "$$i/Makefile"; then \
target="$$otarget"; \
echo "Making $$target in $$i"; \
if test "$$i" = "."; then \
@@ -161,9 +161,9 @@ all-recursive depend-recursive:
clean-recursive distclean-recursive extraclean-recursive:
@otarget=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS) $(CLEAN_SUBDIRS)'; \
+ list='$(CLEAN_SUBDIRS)'; \
for i in $$list; do \
- if test -d "$$i"; then \
+ if test -f "$$i/Makefile"; then \
target="$$otarget"; \
echo "Making $$target in $$i"; \
if test "$$i" = "."; then \
@@ -182,10 +182,17 @@ clean-recursive distclean-recursive extraclean-recursive:
# autoconf 2.5x is creating a 'autom4te.cache' directory
# In case someone ran autoconf by hand, get rid of that directory
-# aswell.
+# as well.
local-clean: x-local-clean
- $(RM) -f *.o *.lo *.a *.la *.so *.obj $(CLEAN_TARGETS) $(PROGRAMS)
- $(RM) -rf .libs autom4te.cache
+ @list='. $(SOURCE_DIRS)'; \
+ for i in $$list; do \
+ echo $(RM) -f $$i/*.o $$i/*.lo $$i/*.a $$i/*.la $$i/*.so $$i/*.obj; \
+ $(RM) -f $$i/*.o $$i/*.lo $$i/*.a $$i/*.la $$i/*.so $$i/*.obj; \
+ echo $(RM) -rf $$i/.libs; \
+ $(RM) -rf $$i/.libs; \
+ done
+ $(RM) -f $(CLEAN_TARGETS) $(PROGRAMS)
+ $(RM) -rf autom4te.cache
local-distclean: local-clean x-local-distclean
$(RM) -f Makefile $(DISTCLEAN_TARGETS)