[asterisk-commits] rizzo: trunk r72700 - /trunk/main/Makefile
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jun 29 15:33:36 CDT 2007
Author: rizzo
Date: Fri Jun 29 15:33:35 2007
New Revision: 72700
URL: http://svn.digium.com/view/asterisk?view=rev&rev=72700
Log:
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
Modified:
trunk/main/Makefile
Modified: trunk/main/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/main/Makefile?view=diff&rev=72700&r1=72699&r2=72700
==============================================================================
--- trunk/main/Makefile (original)
+++ trunk/main/Makefile Fri Jun 29 15:33:35 2007
@@ -100,11 +100,13 @@
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 @@
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)
More information about the asterisk-commits
mailing list