From 3caa225108fd22c02b9e96f291e3045a5eada09f Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Fri, 29 Jun 2007 20:33:35 +0000 Subject: Make sure that we properly recurse in subdirectories to check dependencies for libraries. Because these targets (e.g. minimime/libmmime.a) are real ones, declaring them .PHONY would cause them to be rebuilt every time (see e.g. SVN 64355). As a workaround I am using the following CHECK_SUBDIR target: CHECK_SUBDIR: # do nothing, just make sure that we recurse in the subdir/ minimime/libmmime.a: CHECK_SUBDIR @cd minimime && $(MAKE) libmmime.a which seems to do a better job than .PHONY (probably because .PHONY forces the rebuild even if the recursive make does not think it is necessary). If this turns out to be the correct approach, we can then merge it back into 1.4 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72700 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main/Makefile b/main/Makefile index c079a9802..103f2f6a5 100644 --- a/main/Makefile +++ b/main/Makefile @@ -100,11 +100,13 @@ ifeq ($(OSARCH),SunOS) ASTLINK= endif -editline/libedit.a: +CHECK_SUBDIR: # do nothing, just make sure that we recurse in the subdir/ + +editline/libedit.a: CHECK_SUBDIR cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(ASTCFLAGS:-Werror=)" LDFLAGS="$(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR) $(MAKE) -C editline libedit.a -db1-ast/libdb1.a: +db1-ast/libdb1.a: CHECK_SUBDIR CFLAGS="$(ASTCFLAGS)" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a ast_expr2.c ast_expr2.h: @@ -133,7 +135,7 @@ else H323LDLIBS= endif -minimime/libmmime.a: +minimime/libmmime.a: CHECK_SUBDIR @cd minimime && $(MAKE) libmmime.a asterisk: $(OBJS) editline/libedit.a db1-ast/libdb1.a minimime/libmmime.a $(AST_EMBED_LDSCRIPTS) -- cgit v1.2.3