[asterisk-commits] trunk r26808 - in /trunk: ./ build_tools/
include/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu May 11 02:50:41 MST 2006
Author: russell
Date: Thu May 11 04:50:41 2006
New Revision: 26808
URL: http://svn.digium.com/view/asterisk?rev=26808&view=rev
Log:
change the CFLAGS controlled by menuselect to be placed in a header file
instead of being added to the compiler commands. This header file will be
installed and modules built outside of the main tree will be able to use the
same build options used to build the rest of Asterisk.
Added:
trunk/build_tools/make_buildopts_h (with props)
Modified:
trunk/.cleancount
trunk/Makefile
trunk/build_tools/Makefile
trunk/build_tools/cflags.xml
trunk/configure.ac
trunk/include/autoconfig.h.in
Modified: trunk/.cleancount
URL: http://svn.digium.com/view/asterisk/trunk/.cleancount?rev=26808&r1=26807&r2=26808&view=diff
==============================================================================
--- trunk/.cleancount (original)
+++ trunk/.cleancount Thu May 11 04:50:41 2006
@@ -1,1 +1,1 @@
-15
+16
Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?rev=26808&r1=26807&r2=26808&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu May 11 04:50:41 2006
@@ -195,7 +195,6 @@
include makeopts
endif
-ASTCFLAGS+=$(MENUSELECT_CFLAGS)
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..
@@ -432,7 +431,7 @@
@echo " + make install +"
@echo " +-------------------------------------------+"
-all: config.status menuselect.makeopts cleantest depend asterisk subdirs
+all: cleantest config.status menuselect.makeopts depend asterisk subdirs
config.status: configure
@CFLAGS="" ./configure
@@ -525,10 +524,17 @@
fi
@rm -f $@.tmp
+include/asterisk/buildopts.h: menuselect.makeopts
+ @build_tools/make_buildopts_h > $@.tmp
+ @if cmp -s $@.tmp $@ ; then echo; else \
+ mv $@.tmp $@ ; \
+ fi
+ @rm -f $@.tmp
+
stdtime/libtime.a:
CFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) -C stdtime libtime.a
-asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
+asterisk: include/asterisk/buildopts.h editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
build_tools/make_build_h > include/asterisk/build.h.tmp
if cmp -s include/asterisk/build.h.tmp include/asterisk/build.h ; then echo ; else \
mv include/asterisk/build.h.tmp include/asterisk/build.h ; \
@@ -567,6 +573,7 @@
rm -f menuselect.makeopts makeopts makeopts.xml
rm -f config.log config.status
rm -f include/autoconfig.h
+ rm -f include/asterisk/buildopts.h
$(MAKE) -C mxml clean
$(MAKE) -C build_tools dist-clean
@@ -862,7 +869,7 @@
rpm: __rpm
-__rpm: include/asterisk/version.h spec
+__rpm: include/asterisk/version.h include/asterisk/buildopts.h spec
rm -rf /tmp/asterisk ; \
mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
$(MAKE) DESTDIR=/tmp/asterisk install ; \
@@ -911,10 +918,10 @@
valgrind: dont-optimize
-depend: include/asterisk/version.h .depend defaults.h
+depend: include/asterisk/version.h include/asterisk/buildopts.h .depend defaults.h
@for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
-.depend: include/asterisk/version.h defaults.h
+.depend: include/asterisk/version.h include/asterisk/buildopts.h defaults.h
build_tools/mkdep $(CFLAGS) $(wildcard *.c)
.tags-depend:
@@ -958,7 +965,7 @@
cleantest:
@if cmp -s .cleancount .lastclean ; then echo ; else \
- $(MAKE) clean; cp -f .cleancount .lastclean;\
+ $(MAKE) dist-clean; cp -f .cleancount .lastclean;\
fi
_uninstall:
Modified: trunk/build_tools/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/Makefile?rev=26808&r1=26807&r2=26808&view=diff
==============================================================================
--- trunk/build_tools/Makefile (original)
+++ trunk/build_tools/Makefile Thu May 11 04:50:41 2006
@@ -1,5 +1,5 @@
MENUSELECT_OBJS=menuselect.o menuselect_curses.o
-MENUSELECT_CFLAGS=-g -c -D_GNU_SOURCE -I../ -I../include/
+MENUSELECT_CFLAGS=-g -c -D_GNU_SOURCE -DMENUSELECT -I../ -I../include/
MENUSELECT_LIBS=../mxml/libmxml.a
ifeq ($(OSARCH),SunOS)
Modified: trunk/build_tools/cflags.xml
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/cflags.xml?rev=26808&r1=26807&r2=26808&view=diff
==============================================================================
--- trunk/build_tools/cflags.xml (original)
+++ trunk/build_tools/cflags.xml Thu May 11 04:50:41 2006
@@ -1,20 +1,20 @@
<category name="MENUSELECT_CFLAGS" displayname="Compiler Flags" positive_output="yes" force_clean_on_change="yes">
- <member name="-DDEBUG_SCHEDULER">
+ <member name="DEBUG_SCHEDULER">
</member>
- <member name="-DDEBUG_THREADS">
+ <member name="DEBUG_THREADS">
</member>
- <member name="-DDETECT_DEADLOCKS">
+ <member name="DETECT_DEADLOCKS">
</member>
- <member name="-DDUMP_SCHEDULER">
+ <member name="DUMP_SCHEDULER">
</member>
- <member name="-DLOW_MEMORY">
+ <member name="LOW_MEMORY">
</member>
- <member name="-DMALLOC_DEBUG">
+ <member name="MALLOC_DEBUG">
</member>
- <member name="-DRADIO_RELAX">
+ <member name="RADIO_RELAX">
</member>
- <member name="-DTRACE_FRAMES">
+ <member name="TRACE_FRAMES">
</member>
- <member name="-DMTX_PROFILE">
+ <member name="MTX_PROFILE">
</member>
</category>
Added: trunk/build_tools/make_buildopts_h
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/make_buildopts_h?rev=26808&view=auto
==============================================================================
--- trunk/build_tools/make_buildopts_h (added)
+++ trunk/build_tools/make_buildopts_h Thu May 11 04:50:41 2006
@@ -1,0 +1,13 @@
+#!/bin/sh
+
+cat << END
+/*
+ * buildopts.h
+ * Automatically generated
+ */
+
+END
+TMP=`grep MENUSELECT_CFLAGS menuselect.makeopts | sed s/MENUSELECT_CFLAGS\=//g`
+for x in ${TMP}; do
+ echo "#define ${x}"
+done
Propchange: trunk/build_tools/make_buildopts_h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/build_tools/make_buildopts_h
------------------------------------------------------------------------------
svn:executable = *
Propchange: trunk/build_tools/make_buildopts_h
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: trunk/build_tools/make_buildopts_h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?rev=26808&r1=26807&r2=26808&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Thu May 11 04:50:41 2006
@@ -111,6 +111,10 @@
AC_GNU_SOURCE
AH_TOP(
+#ifndef MENUSELECT
+#include "asterisk/buildopts.h"
+#endif
+
#ifndef _REENTRANT
#define _REENTRANT
#endif
Modified: trunk/include/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/trunk/include/autoconfig.h.in?rev=26808&r1=26807&r2=26808&view=diff
==============================================================================
--- trunk/include/autoconfig.h.in (original)
+++ trunk/include/autoconfig.h.in Thu May 11 04:50:41 2006
@@ -1,4 +1,8 @@
/* include/autoconfig.h.in. Generated from configure.ac by autoheader. */
+
+#ifndef MENUSELECT
+#include "asterisk/buildopts.h"
+#endif
#ifndef _REENTRANT
#define _REENTRANT
More information about the asterisk-commits
mailing list