Author: sebor
Date: Tue Sep 5 10:40:21 2006
New Revision: 440420
URL: http://svn.apache.org/viewvc?view=rev&rev=440420
Log:
2006-09-05 Martin Sebor <[EMAIL PROTECTED]>
* GNUmakefile.bin (RUNTARGET, LOCALE_LIST, localedb.d): Added
a dependency on gen_list.
Removed an explicit include statement to pull in localedb.d
and added said file to DEPS to let makefile.rules pull it in.
* makefile.rules (DEPS): Appended to the variable since it may
be previously set (see above).
(makedep): Avoided creating $(DEPENDDIR) and instead done so
in an explicit target for it to avoid code duplication between
GNUmakefile.bin and this file.
Modified:
incubator/stdcxx/trunk/etc/config/GNUmakefile.bin
incubator/stdcxx/trunk/etc/config/makefile.rules
Modified: incubator/stdcxx/trunk/etc/config/GNUmakefile.bin
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/GNUmakefile.bin?view=diff&rev=440420&r1=440419&r2=440420
==============================================================================
--- incubator/stdcxx/trunk/etc/config/GNUmakefile.bin (original)
+++ incubator/stdcxx/trunk/etc/config/GNUmakefile.bin Tue Sep 5 10:40:21 2006
@@ -8,7 +8,7 @@
include ../makefile.in
-SRCDIRS = $(TOPDIR)/src/util
+SRCDIRS = $(TOPDIR)/util
# include common variables setting for all makefiles
ONE_REPOSITORY = 1
@@ -76,7 +76,7 @@
locales: localedef $(LOCALE_LIST)
# the rule builds the scripts that are run by the runall script
-$(RUNTARGET):
+$(RUNTARGET): $(NLSDIR)/gen_list
@(echo "making [EMAIL PROTECTED]";
\
echo "#!/bin/sh" > $@; \
locname=`echo $@ | sed "s:^\./::g;s:\.sh$$::g"`; \
@@ -89,15 +89,15 @@
# the rule presents as dependencies the source files corresponding
# to that locale; it is run once for each entry in LOCALE_LIST
-$(LOCALE_LIST):
- @(lname=`echo $@ | sed "s:\([^.]*\)\.\([EMAIL
PROTECTED])\(.*\):\1\3:;y:@:.:"`; \
+$(LOCALE_LIST): $(NLSDIR)/gen_list
+ @(lname=`echo $@ | sed "s:\([^.]*\)\.\([EMAIL
PROTECTED])\(.*\):\1\3:;y:@:.:"`; \
cname=`echo $@ | sed "s:\([^.]*\)\.\([EMAIL PROTECTED])\(.*\):\2:"`;
\
echo "./localedef -w -c -f $(NLSDIR)/charmaps/$$cname" \
"-i $(NLSDIR)/src/$$lname $(LOCDIR)/$@"; \
./localedef -w -c -f $(NLSDIR)/charmaps/$$cname \
-i $(NLSDIR)/src/$$lname $(LOCDIR)/$@)
-$(DEPENDDIR)/localedb.d:
+$(DEPENDDIR)/localedb.d: $(DEPENDDIR) $(NLSDIR)/gen_list
@(echo "# generated locale dependencies" > $@; \
for f in $(LOCALE_LIST); do \
lname=`echo $$f | \
@@ -105,13 +105,12 @@
cname=`echo $$f | sed "s:\([^.]*\)\.\([EMAIL
PROTECTED])\(.*\):\2:"`; \
f=$$f; \
echo "generating dependencies for $$f"; \
- printf "%-32s:%s %s\n" $$f \
- $(NLSDIR)/src/$$lname \
- $(NLSDIR)/charmaps/$$cname >> $@; \
+ echo "$$f: $$""(NLSDIR)/src/$$lname" \
+ "$$""(NLSDIR)/charmaps/$$cname" >> $@; \
done;)
-# include the generated dependencies file
--include $(DEPENDDIR)/localedb.d
+# tell makefile.rules to include the generated dependencies file
+DEPS := $(DEPENDDIR)/localedb.d
# do any directory specific cleanup using the realclean target
realclean: clean dependclean
Modified: incubator/stdcxx/trunk/etc/config/makefile.rules
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/makefile.rules?view=diff&rev=440420&r1=440419&r2=440420
==============================================================================
--- incubator/stdcxx/trunk/etc/config/makefile.rules (original)
+++ incubator/stdcxx/trunk/etc/config/makefile.rules Tue Sep 5 10:40:21 2006
@@ -131,13 +131,13 @@
ifeq ($(MAKECMDGOALS),)
# include all dependencies (can be slow when there are a lot of them)
- DEPS := $(patsubst %.cpp,$(DEPENDDIR)/%.d,$(filter %.cpp,$(SRCS)))
+ DEPS += $(patsubst %.cpp,$(DEPENDDIR)/%.d,$(filter %.cpp,$(SRCS)))
DEPS += $(patsubst %$(AS_EXT),$(DEPENDDIR)/%.d,$(filter
%$(AS_EXT),$(SRCS)))
else
# as a (potentially significant) optimization, include
# only the dependencies for the explicitly specified goals
- DEPS := $(addprefix $(DEPENDDIR)/,$(basename $(MAKECMDGOALS)))
- DEPS := $(addsuffix .d,$(DEPS))
+ DEPS += $(addprefix $(DEPENDDIR)/,$(basename $(MAKECMDGOALS)))
+ DEPS += $(addsuffix .d,$(DEPS))
endif
# (try to) include the dependency file(s), failing gracefully
@@ -158,9 +158,6 @@
define makedep
-@(if [ ! -f $@ ] ; then \
- if [ ! -d $(DEPENDDIR) ]; then \
- mkdir -p $(DEPENDDIR); \
- fi; \
echo "generating dependencies for" \
`echo $< | sed "s:$(TOPDIR):$$""(TOPDIR):"` ; \
\
@@ -188,12 +185,15 @@
fi)
endef
+$(DEPENDDIR):
+ @[ ! -d $(DEPENDDIR) ] && mkdir -p $(DEPENDDIR)
+
# rule to make dependencies for C++ source files
-$(DEPENDDIR)/%.d: %.cpp
+$(DEPENDDIR)/%.d: %.cpp $(DEPENDDIR)
$(makedep)
# rule to make dependencies for assembly files
-$(DEPENDDIR)/%.d: %$(AS_EXT)
+$(DEPENDDIR)/%.d: %$(AS_EXT) $(DEPENDDIR)
$(makedep)
@@ -238,4 +238,3 @@
# override the default set of suffixes with our own
.SUFFIXES: .a .c .cc .cpp .d .h .o .$(AS_EXT)
-