[asterisk-commits] russell: trunk r104245 - in /trunk: ./ build_tools/ include/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Feb 26 14:19:03 CST 2008
Author: russell
Date: Tue Feb 26 14:19:03 2008
New Revision: 104245
URL: http://svn.digium.com/view/asterisk?view=rev&rev=104245
Log:
Re-add the automatically generated version.h, so that modules can include for
making build time decisions for cross asterisk version compatibility
Added:
trunk/build_tools/make_version_h (with props)
Modified:
trunk/Makefile
trunk/include/asterisk/ (props changed)
Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?view=diff&rev=104245&r1=104244&r2=104245
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Tue Feb 26 14:19:03 2008
@@ -373,7 +373,7 @@
@$(MAKE) $(PRINT_DIR) $(MOD_SUBDIRS_EMBED_LDFLAGS)
@$(MAKE) $(PRINT_DIR) $(MOD_SUBDIRS_EMBED_LIBS)
-$(SUBDIRS): main/version.c include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
+$(SUBDIRS): main/version.c include/asterisk/version.h include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
# Non-windows:
@@ -409,6 +409,11 @@
@cmp -s $@.tmp $@ || mv $@.tmp $@
@rm -f $@.tmp
+include/asterisk/version.h:
+ @build_tools/make_version_h > $@.tmp
+ @cmp -s $@.tmp $@ || mv $@.tmp $@
+ @rm -f $@.tmp
+
include/asterisk/buildopts.h: menuselect.makeopts
@build_tools/make_buildopts_h > $@.tmp
@cmp -s $@.tmp $@ || mv $@.tmp $@
@@ -429,6 +434,7 @@
rm -f defaults.h
rm -f include/asterisk/build.h
rm -f main/version.c
+ rm -f include/asterisk/version.h
@$(MAKE) -C menuselect clean
cp -f .cleancount .lastclean
@@ -716,7 +722,7 @@
rpm: __rpm
-__rpm: main/version.c include/asterisk/buildopts.h spec
+__rpm: main/version.c 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 ; \
@@ -841,4 +847,4 @@
asterisk.pdf:
$(MAKE) -C doc/tex asterisk.pdf
-.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_DIST_CLEAN) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) badshell main/version.c
+.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_DIST_CLEAN) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) badshell main/version.c include/asterisk/version.h
Added: trunk/build_tools/make_version_h
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/make_version_h?view=auto&rev=104245
==============================================================================
--- trunk/build_tools/make_version_h (added)
+++ trunk/build_tools/make_version_h Tue Feb 26 14:19:03 2008
@@ -1,0 +1,25 @@
+#!/bin/sh
+if [ ! -f ../.flavor ]; then
+ cat << END
+/*
+ * version.h
+ * Automatically generated
+ */
+#define ASTERISK_VERSION "${ASTERISKVERSION}"
+#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
+
+END
+else
+ aadkver=`cat ../.version`
+ aadkflavor=`cat ../.flavor`
+ cat << END
+/*
+ * version.h
+ * Automatically generated
+ */
+#define ASTERISK_VERSION "${ASTERISKVERSION} (${aadkflavor} ${aadkver})"
+#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
+
+END
+fi
+
Propchange: trunk/build_tools/make_version_h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/build_tools/make_version_h
------------------------------------------------------------------------------
svn:executable = *
Propchange: trunk/build_tools/make_version_h
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: trunk/build_tools/make_version_h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: trunk/include/asterisk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Feb 26 14:19:03 2008
@@ -1,3 +1,4 @@
build.h
buildopts.h
autoconfig.h
+version.h
More information about the asterisk-commits
mailing list