[svn-commits] trunk r23582 - in /trunk: Makefile pbx/Makefile utils/Makefile

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sun Apr 30 04:40:07 MST 2006


Author: kpfleming
Date: Sun Apr 30 06:40:06 2006
New Revision: 23582

URL: http://svn.digium.com/view/asterisk?rev=23582&view=rev
Log:
simplify CFLAGS handling for subdirectories
don't put paths into the include search path when they are not needed
don't auto-rebuild the AEL bison/flex output based on make dependencies (the generated files are already checked in, and the timestamps generated by a checkout will usually cause them to be overwritten)

Modified:
    trunk/Makefile
    trunk/pbx/Makefile
    trunk/utils/Makefile

Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?rev=23582&r1=23581&r2=23582&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Sun Apr 30 06:40:06 2006
@@ -196,8 +196,9 @@
 endif
 
 ASTCFLAGS+=$(MENUSELECT_CFLAGS)
-TOPDIR_CFLAGS=-include include/autoconfig.h
-MOD_SUBDIR_CFLAGS=-include ../include/autoconfig.h
+TOPDIR_CFLAGS=-include include/autoconfig.h -Iinclude
+MOD_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I..
+OTHER_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I..
 
 #   *CLI> show memory allocations [filename]
 #   *CLI> show memory summary [filename]
@@ -252,7 +253,6 @@
   ID=/usr/xpg4/bin/id
 endif
 
-INCLUDE+=-Iinclude -I../include -I..
 ASTCFLAGS+=-pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) #-DMAKE_VALGRIND_HAPPY
 ASTCFLAGS+=$(OPTIMIZE)
 
@@ -545,8 +545,8 @@
 
 subdirs: 
 	for x in $(MOD_SUBDIRS); do CFLAGS="$(ASTCFLAGS) $(MOD_SUBDIR_CFLAGS)" $(MAKE) -C $$x || exit 1 ; done
-	CFLAGS="$(ASTCFLAGS)" $(MAKE) -C utils
-	CFLAGS="$(ASTCFLAGS) -include ../include/autoconfig.h" $(MAKE) -C agi
+	CFLAGS="$(ASTCFLAGS) $(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C utils
+	CFLAGS="$(ASTCFLAGS) $(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C agi
 
 clean-depend:
 	for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done

Modified: trunk/pbx/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/pbx/Makefile?rev=23582&r1=23581&r2=23582&view=diff
==============================================================================
--- trunk/pbx/Makefile (original)
+++ trunk/pbx/Makefile Sun Apr 30 06:40:06 2006
@@ -59,10 +59,10 @@
 ael/aelbison.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h
 	$(CC) $(CFLAGS) -I. -c -o ael/aelbison.o ael/ael.tab.c
 
-ael/ael_lex.c: ael/ael.flex
+ael/ael_lex.c:
 	(cd ael; flex ael.flex)
 
-ael/ael.tab.c ael/ael.tab.h: ael/ael.y
+ael/ael.tab.c ael/ael.tab.h:
 	(cd ael; bison -v -d ael.y)
 
 %.moc : %.h

Modified: trunk/utils/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/utils/Makefile?rev=23582&r1=23581&r2=23582&view=diff
==============================================================================
--- trunk/utils/Makefile (original)
+++ trunk/utils/Makefile Sun Apr 30 06:40:06 2006
@@ -49,10 +49,10 @@
 	rm -f ast_expr2.o ast_expr2f.o
 
 astman.o: astman.c
-	$(CC) $(CFLAGS) -include ../include/autoconfig.h -c -o $@ $<
+	$(CC) $(CFLAGS) -c -o $@ $<
 
 astman: astman.o ../md5.o
-	$(CC) -D_GNU_SOURCE -o $@ $< ../md5.o -lnewt
+	$(CC) $(CFLAGS) -o $@ $< ../md5.o -lnewt
 
 stereorize: stereorize.o frame.o
 	$(CC) $(CFLAGS) -o stereorize stereorize.o frame.o -lm
@@ -60,10 +60,10 @@
 .PHONY: ../ast_expr2.c ../ast_expr2f.c ../pbx/ael/aelflex.o ../pbx/ael/aelbison.o ../pbx/pbx_ael.o
 
 ast_expr2.o: ../ast_expr2.c
-	gcc  $(CFLAGS) -include ../include/autoconfig.h -c -o $@ $<
+	gcc  $(CFLAGS) -c -o $@ $<
 
 ast_expr2f.o: ../ast_expr2f.c
-	gcc  $(CFLAGS) -include ../include/autoconfig.h -c -DSTANDALONE -o $@ $<
+	gcc  $(CFLAGS) -c -DSTANDALONE -o $@ $<
 
 check_expr: check_expr.c ast_expr2.o ast_expr2f.o
 	$(CC) $(CFLAGS) -o $@ $^
@@ -72,7 +72,7 @@
 	$(CC) $(CFLAGS) -g -o aelparse ../pbx/ael/aelflex.o ../pbx/ael/aelbison.o ael_main.o ../pbx/pbx_ael.o ../ast_expr2f.o ../ast_expr2.o
 
 ael_main.o : ael_main.c ../include/asterisk/ael_structs.h
-	$(CC) $(CFLAGS) -include ../include/autoconfig.h -c -g -o ael_main.o ael_main.c
+	$(CC) $(CFLAGS) -c -g -o ael_main.o ael_main.c
 
 ael_main1.o : ael_main.c ../include/asterisk/ael_structs.h
 	$(CC) $(CFLAGS) -c -g  -o ael_main1.o ael_main.c
@@ -85,7 +85,7 @@
 	./testexpr2s expr2.testinput
 
 smsq.o: smsq.c
-	$(CC) $(CFLAGS) -include ../include/autoconfig.h -c -o $@ $<
+	$(CC) $(CFLAGS) -c -o $@ $<
 
 smsq: smsq.o
 	$(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt



More information about the svn-commits mailing list