aboutsummaryrefslogtreecommitdiffstats
path: root/main/Makefile
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-29 20:33:35 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-29 20:33:35 +0000
commit388ee3fa59e4762d9e1ef20978f3d4c55480c128 (patch)
tree68e8e2d43da90c060474dc5c800e3c5f90bdeee2 /main/Makefile
parenta306b8604d2a870b79d194998fb1d6fbb2312403 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@72700 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/Makefile')
-rw-r--r--main/Makefile8
1 files 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)