Skip to content
Snippets Groups Projects
Commit 3caa2251 authored by Luigi Rizzo's avatar Luigi Rizzo
Browse files

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
parent 7415c3ee
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment