ensure that dependencies are rebuilt after 'make update' so that builds don't break...
authorKevin P. Fleming <kpfleming@digium.com>
Sun, 12 Feb 2006 16:52:42 +0000 (16:52 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Sun, 12 Feb 2006 16:52:42 +0000 (16:52 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9691 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 files changed:
Makefile
agi/Makefile
apps/Makefile
cdr/Makefile
channels/Makefile
codecs/Makefile
cygwin/Makefile
db1-ast/Makefile
formats/Makefile
funcs/Makefile
pbx/Makefile
res/Makefile
stdtime/Makefile
utils/Makefile

index 6f68919..04ea7bc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -454,12 +454,7 @@ editline/libedit.a: FORCE
        $(MAKE) -C editline libedit.a
 
 db1-ast/libdb1.a: FORCE
-       @if [ -d db1-ast ]; then \
-               $(MAKE) -C db1-ast libdb1.a ; \
-       else \
-               echo "You need to do a cvs update -d not just cvs update"; \
-               exit 1; \
-       fi
+       $(MAKE) -C db1-ast libdb1.a
 
 ifneq ($(wildcard .depend),)
   include .depend
@@ -516,12 +511,7 @@ include/asterisk/version.h: FORCE
        rm -f $@.tmp
 
 stdtime/libtime.a: FORCE
-       @if [ -d stdtime ]; then \
-               $(MAKE) -C stdtime libtime.a ; \
-       else \
-               echo "You need to do a cvs update -d not just cvs update"; \
-               exit 1; \
-       fi
+       $(MAKE) -C stdtime libtime.a
 
 cygwin_a:
        $(MAKE) -C cygwin all
@@ -541,13 +531,17 @@ muted: muted.o
 subdirs: 
        for x in $(SUBDIRS); do $(MAKE) -C $$x || exit 1 ; done
 
-clean:
+clean-depend:
+       for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done
+       rm -f .depend .tags-depend
+
+clean: clean-depend
        for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done
-       rm -f *.o *.so asterisk .depend
+       rm -f *.o *.so asterisk
        rm -f defaults.h
        rm -f include/asterisk/build.h
        rm -f include/asterisk/version.h
-       rm -f .tags-depend .tags-sources tags TAGS
+       rm -f .tags-sources tags TAGS
        @if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
        @if [ -d mpg123-0.59r ]; then $(MAKE) -C mpg123-0.59r clean; fi
        $(MAKE) -C db1-ast clean
@@ -617,6 +611,7 @@ update:
                        grep ^C update.out | cut -b4- ; \
                fi ; \
                rm -f update.out; \
+               $(MAKE) clean-depend; \
        elif [ -d CVS ]; then \
                echo "Updating from CVS..." ; \
                cvs -q -z3 update -Pd | tee update.out; \
@@ -626,6 +621,7 @@ update:
                        grep ^C update.out | cut -d' ' -f2- ; \
                fi ; \
                rm -f update.out; \
+               $(MAKE) clean-depend; \
        else \
                echo "Not under version control";  \
        fi
index 5f2a6af..d9d10dc 100644 (file)
@@ -39,8 +39,11 @@ eagi-test: eagi-test.o
 eagi-sphinx-test: eagi-sphinx-test.o
        $(CC) $(CFLAGS) -o eagi-sphinx-test eagi-sphinx-test.o $(LIBS) 
 
-clean:
-       rm -f *.so *.o look .depend eagi-test eagi-sphinx-test
+clean-depend:
+       rm -f .depend
+
+clean: clean-depend
+       rm -f *.so *.o look eagi-test eagi-sphinx-test
 
 %.so : %.o
        $(CC) -shared -Xlinker -x -o $@ $<
index b8a6b91..988645d 100644 (file)
@@ -63,8 +63,11 @@ endif
 
 all: $(MODS)
 
-clean:
-       rm -f *.so *.o look .depend
+clean-depend:
+       rm -f .depend
+
+clean: clean-depend
+       rm -f *.so *.o look
 
 %.so : %.o
        $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
index 40779a2..e11cfb9 100644 (file)
@@ -106,8 +106,11 @@ install: all
 
 uninstall:
 
-clean:
-       rm -f *.so *.o .depend
+clean-depend:
+       rm -f .depend
+
+clean: clean-depend
+       rm -f *.so *.o
 
 %.so : %.o
        $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
index b2304a5..6613a49 100644 (file)
@@ -151,8 +151,11 @@ endif
 
 all: depend $(MODS) 
 
-clean:
-       rm -f *.so *.o .depend
+clean-depend:
+       rm -f .depend
+
+clean: clean-depend
+       rm -f *.so *.o
        rm -f busy.h ringtone.h gentone gentone-ulaw
 
 %.so : %.o
index 23e6ba1..5d1f175 100644 (file)
@@ -63,8 +63,11 @@ LIBLPC10=lpc10/liblpc10.a
 
 all: depend $(MODS)
 
-clean:
-       rm -f *.so *.o .depend
+clean-depend:
+       rm -f .depend
+
+clean: clean-depend
+       rm -f *.so *.o
        [ ! -d g723.1 ] || $(MAKE) -C g723.1 clean
        [ ! -d g723.1b ] || $(MAKE) -C g723.1b clean
        $(MAKE) -C gsm clean
index 124628f..38f7837 100644 (file)
@@ -2,5 +2,8 @@ OBJS=cygloader.o
 all: $(OBJS)
 $(OBJS) : %.o: %.c
        $(CC) $< -o asterisk.exe
+
+clean-depend:
+
 clean:
        rm -f asterisk.exe
index 0aa9fdb..d36b592 100644 (file)
@@ -42,6 +42,8 @@ $(LIBDBSO): $(SHOBJS)
 $(PROG): db_dump185.o $(LIBDBSO)
        $(CC) -o $@ db_dump185.o -L. -ldb
 
+clean-depend:
+
 clean:
        rm -f $(LIBDB) $(LIBDBSO) $(OBJS) $(SHOBJS)
 
index 108e85e..80143e5 100644 (file)
@@ -31,8 +31,11 @@ endif
 
 all: depend $(MODS)
 
-clean:
-       rm -f *.so *.o .depend
+clean-depend:
+       rm -f .depend
+
+clean: clean-depend
+       rm -f *.so *.o
 
 %.so : %.o
        $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
index 493ec3a..f2f8a4b 100644 (file)
@@ -26,8 +26,11 @@ endif
 
 all: $(MODS)
 
-clean:
-       rm -f *.so *.o .depend
+clean-depend:
+       rm -f .depend
+
+clean: clean-depend
+       rm -f *.so *.o
 
 %.so : %.o
        $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
index e8eb087..b32fbca 100644 (file)
@@ -40,8 +40,11 @@ KDE_CONSOLE_OBJS=pbx_kdeconsole_main.o pbx_kdeconsole.o
 
 all: depend $(MODS)
 
-clean:
-       rm -f *.so *.o .depend
+clean-depend:
+       rm -f .depend
+
+clean: clean-depend
+       rm -f *.so *.o
 
 pbx_gtkconsole.o: pbx_gtkconsole.c
        $(CC) $(CFLAGS) $(GTK_FLAGS) -c -o $@ $<
index 01cdc40..9bbb587 100644 (file)
@@ -86,8 +86,11 @@ uninstall:
 res_crypto.so: res_crypto.o
        $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CRYPTO_LIBS)
 
-clean:
-       rm -f *.so *.o .depend
+clean-depend:
+       rm -f .depend
+
+clean: clean-depend
+       rm -f *.so *.o
 
 res_odbc.so: res_odbc.o
        $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc
index 391b455..cbe3c48 100644 (file)
@@ -10,8 +10,11 @@ install:
 
 uninstall:
 
-clean:
-       rm -f libtime.a *.o test .depend
+clean-depend:
+       rm -f .depend
+
+clean: clean-depend
+       rm -f libtime.a *.o test
 
 depend: .depend
 
index cc90f35..93da993 100644 (file)
@@ -43,8 +43,11 @@ install:
 uninstall:
        for x in $(TARGET); do rm -f $$x $(DESTDIR)$(ASTSBINDIR)/$$x; done
 
-clean:
-       rm -f *.o astman smsq stereorize streamplayer check_expr .depend
+clean-depend:
+       rm -f .depend
+
+clean: clean-depend
+       rm -f *.o astman smsq stereorize streamplayer check_expr
        rm -f ast_expr2.o ast_expr2f.o
 
 astman: astman.o ../md5.o