aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-26 19:18:53 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-26 19:18:53 +0000
commit5995035bf01c3af3091980b197c948761c10d71a (patch)
treea487b62b781ed0e0cca7b3edc2780d27cdc2659f
parentd9095f455be926fd1441bdbd8fa854da6678d596 (diff)
Merged revisions 159534 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r159534 | kpfleming | 2008-11-26 13:08:56 -0600 (Wed, 26 Nov 2008) | 11 lines Merged revisions 159476 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r159476 | kpfleming | 2008-11-26 12:36:24 -0600 (Wed, 26 Nov 2008) | 7 lines simplify (and slightly bug-fix) the recent developer-oriented COMPILE_DOUBLE mode ensure that 'make clean' removes dependency files for .i files that are created in COMPILE_DOUBLE mode ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@159536 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--Makefile.moddir_rules3
-rw-r--r--Makefile.rules17
-rw-r--r--agi/Makefile3
-rw-r--r--utils/Makefile2
4 files changed, 10 insertions, 15 deletions
diff --git a/Makefile.moddir_rules b/Makefile.moddir_rules
index c2985fd78..1db15ecb1 100644
--- a/Makefile.moddir_rules
+++ b/Makefile.moddir_rules
@@ -111,7 +111,7 @@ modules.link:
clean::
rm -f *.so *.o *.oo *.eo *.i *.ii
- rm -f .*.o.d .*.oo.d
+ rm -f .*.d
rm -f *.s *.i
rm -f modules.link
@@ -124,7 +124,6 @@ uninstall::
dist-clean::
rm -f .*.moduleinfo .moduleinfo
rm -f .*.makeopts .makeopts
- rm -f .*.d
.%.moduleinfo: %.c
@echo "<member name=\"$*\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.o $(SUBDIR)/$*.so\">" > $@
diff --git a/Makefile.rules b/Makefile.rules
index 92fca37c9..db44a876b 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -19,6 +19,11 @@
.PHONY: dist-clean
+# If 'make' decides to create intermediate files to satisfy a build requirement
+# (like producing a .i from a .c), we want to keep them, so tell make to keep
+# all intermediate files
+.SECONDARY:
+
# extra cflags to build dependencies. Recursively expanded.
MAKE_DEPS=-MD -MT $@ -MF .$(subst /,_,$@).d -MP
@@ -74,13 +79,9 @@ ifeq ($(COMPILE_DOUBLE),yes)
endif
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
+ifneq ($(COMPILE_DOUBLE),yes)
%.o: %.c
$(ECHO_PREFIX) echo " [CC] $< -> $@"
-ifeq ($(COMPILE_DOUBLE),yes)
- $(CMD_PREFIX) $(CC) -o $(@:%.o=%.i) -E $< $(CC_CFLAGS) $(MAKE_DEPS)
- $(CMD_PREFIX) $(CC) -o /dev/null -c $(@:%.o=%.i) $(CC_CFLAGS) $(OPTIMIZE)
- $(CMD_PREFIX) $(CC) -o $@ -c $(@:%.o=%.i) $(CC_CFLAGS)
-else
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) $(MAKE_DEPS)
endif
@@ -95,13 +96,9 @@ ifeq ($(COMPILE_DOUBLE),yes)
endif
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS)
+ifneq ($(COMPILE_DOUBLE),yes)
%.oo: %.cc
$(ECHO_PREFIX) echo " [CXX] $< -> $@"
-ifeq ($(COMPILE_DOUBLE),yes)
- $(CMD_PREFIX) $(CXX) -o $(@:%.oo=%.ii) -E $< $(CXX_CFLAGS) $(MAKE_DEPS)
- $(CMD_PREFIX) $(CXX) -o /dev/null -c $(@:%.oo=%.ii) $(CXX_CFLAGS) $(MAKE_DEPS) $(OPTIMIZE)
- $(CMD_PREFIX) $(CXX) -o $@ -c $(@:%.oo=%.ii) $(CXX_CFLAGS) $(MAKE_DEPS)
-else
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS) $(MAKE_DEPS)
endif
diff --git a/agi/Makefile b/agi/Makefile
index d580a1632..e8e57a9b9 100644
--- a/agi/Makefile
+++ b/agi/Makefile
@@ -48,8 +48,7 @@ uninstall:
clean:
rm -f *.so *.o look eagi-test eagi-sphinx-test
- rm -f .*.o.d .*.oo.d
- rm -f *.s *.i
+ rm -f .*.d *.s *.i
rm -f strcompat.c
ifneq ($(wildcard .*.d),)
diff --git a/utils/Makefile b/utils/Makefile
index f058fea28..d705c40ed 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -73,7 +73,7 @@ uninstall:
clean:
rm -f *.o $(ALL_UTILS) check_expr
- rm -f .*.o.d .*.oo.d
+ rm -f .*.d
rm -f *.s *.i
rm -f md5.c strcompat.c ast_expr2.c ast_expr2f.c pbx_ael.c pval.c hashtab.c
rm -f aelparse.c aelbison.c conf2ael