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: https://origsvn.digium.com/svn/asterisk/trunk@159534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming 2008-11-26 19:08:56 +00:00
parent 6e6e02ce1f
commit 63b031c471
4 changed files with 10 additions and 15 deletions

View File

@ -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\">" > $@

View File

@ -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

View File

@ -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),)

View File

@ -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