[Freeswitch-svn] [commit] r4578 - in freeswitch/trunk: . build

Freeswitch SVN mikej at freeswitch.org
Tue Mar 13 02:17:59 EDT 2007


Author: mikej
Date: Tue Mar 13 02:17:58 2007
New Revision: 4578

Removed:
   freeswitch/trunk/build/addenv.sh
   freeswitch/trunk/build/build.sh
   freeswitch/trunk/build/checkversion.sh
Modified:
   freeswitch/trunk/Makefile.am
   freeswitch/trunk/Makefile.in
   freeswitch/trunk/configure
   freeswitch/trunk/configure.in

Log:
Fix re-generation of switch_version.h
remove some un-used and un-necessary shell scripts



Modified: freeswitch/trunk/Makefile.am
==============================================================================
--- freeswitch/trunk/Makefile.am	(original)
+++ freeswitch/trunk/Makefile.am	Tue Mar 13 02:17:58 2007
@@ -61,7 +61,6 @@
 src/include/switch_types.h\
 src/include/switch_utils.h\
 src/include/switch_rtp.h\
-src/include/switch_version.h\
 src/include/switch_stun.h\
 src/include/switch_log.h\
 src/include/switch_xml.h
@@ -91,10 +90,11 @@
 MOD_LINK       = $(BASE)/libfreeswitch.la
 
 CLEANFILES     = src/include/switch_version.h
+BUILT_SOURCES  = src/include/switch_version.h
 
 bin_PROGRAMS =  freeswitch
-freeswitch_SOURCES =    src/switch.c\
-                        src/include/switch_version.h
+freeswitch_SOURCES =    src/switch.c
+nodist_freeswitch_SOURCES = src/include/switch_version.h
 freeswitch_CFLAGS = $(AM_CFLAGS)
 freeswitch_LDADD = ${MOD_LINK}
 
@@ -112,12 +112,20 @@
 		$(INSTALL) ./$(NAME) $(DESTDIR)$(PREFIX)/bin/$(NAME) ;\
 	 fi
 
-version: Makefile src/include/switch_version.h
-	MAKE=$(MAKE) ./build/checkversion.sh
+.version:
+	touch .version
 
-newversion: Makefile
-	MAKE=$(MAKE) ./build/checkversion.sh force
-	$(MAKE)
+src/include/switch_version.h: $(top_srcdir)/src/include/switch_version.h.in .version $(libfreeswitch_la_SOURCES) $(library_include_HEADERS)
+	@if test ! -f .noversion ; then \
+	  force=0 ; \
+	  version=`svnversion . -n || echo hacked` ; \
+	  oldversion=`cat .version 2>/dev/null || echo "0"` ; \
+	  test ! -f src/include/switch_version.h || grep "@SVN_VERSION@" src/include/switch_version.h && force=1 ; \
+	  if test "$$oldversion" != "$$version" || test $$force = 1 ; then \
+	    cat src/include/switch_version.h.in | sed "s/@SVN_VERSION@/$$version/g" > src/include/switch_version.h ; \
+	    echo $$version > .version ; \
+	  fi ; \
+	fi ;
 
 .nodepends:
 	touch .nodepends
@@ -148,7 +156,7 @@
 teletone:
 	cd libs/libteletone && $(MAKE)
 
-deps: version sqlite apr apr-util pcre srtp resample teletone
+deps: sqlite apr apr-util pcre srtp resample teletone
 
 core: deps libfreeswitch.la  
 

Modified: freeswitch/trunk/Makefile.in
==============================================================================
--- freeswitch/trunk/Makefile.in	(original)
+++ freeswitch/trunk/Makefile.in	Tue Mar 13 02:17:58 2007
@@ -16,7 +16,7 @@
 
 
 
-SOURCES = $(libfreeswitch_la_SOURCES) $(nodist_libfreeswitch_la_SOURCES) $(freeswitch_SOURCES)
+SOURCES = $(libfreeswitch_la_SOURCES) $(nodist_libfreeswitch_la_SOURCES) $(freeswitch_SOURCES) $(nodist_freeswitch_SOURCES)
 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
@@ -46,8 +46,7 @@
 	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
 	$(top_srcdir)/build/modmake.rules.in $(top_srcdir)/configure \
 	$(top_srcdir)/src/include/switch_am_config.h.in \
-	$(top_srcdir)/src/include/switch_private.h.in \
-	$(top_srcdir)/src/include/switch_version.h.in AUTHORS COPYING \
+	$(top_srcdir)/src/include/switch_private.h.in AUTHORS COPYING \
 	ChangeLog INSTALL NEWS build/config/compile \
 	build/config/config.guess build/config/config.sub \
 	build/config/depcomp build/config/install-sh \
@@ -70,7 +69,7 @@
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/include/switch_private.h
 CONFIG_CLEAN_FILES = src/include/switch_am_config.h \
-	build/modmake.rules src/include/switch_version.h
+	build/modmake.rules
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -109,7 +108,9 @@
 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_freeswitch_OBJECTS = freeswitch-switch.$(OBJEXT)
-freeswitch_OBJECTS = $(am_freeswitch_OBJECTS)
+nodist_freeswitch_OBJECTS =
+freeswitch_OBJECTS = $(am_freeswitch_OBJECTS) \
+	$(nodist_freeswitch_OBJECTS)
 am__DEPENDENCIES_2 = $(BASE)/libfreeswitch.la
 freeswitch_DEPENDENCIES = $(am__DEPENDENCIES_2)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include
@@ -124,7 +125,8 @@
 LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
 SOURCES = $(libfreeswitch_la_SOURCES) \
-	$(nodist_libfreeswitch_la_SOURCES) $(freeswitch_SOURCES)
+	$(nodist_libfreeswitch_la_SOURCES) $(freeswitch_SOURCES) \
+	$(nodist_freeswitch_SOURCES)
 DIST_SOURCES = $(libfreeswitch_la_SOURCES) $(freeswitch_SOURCES)
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
@@ -329,7 +331,6 @@
 src/include/switch_types.h\
 src/include/switch_utils.h\
 src/include/switch_rtp.h\
-src/include/switch_version.h\
 src/include/switch_stun.h\
 src/include/switch_log.h\
 src/include/switch_xml.h
@@ -353,12 +354,13 @@
 nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h
 MOD_LINK = $(BASE)/libfreeswitch.la
 CLEANFILES = src/include/switch_version.h
-freeswitch_SOURCES = src/switch.c\
-                        src/include/switch_version.h
-
+BUILT_SOURCES = src/include/switch_version.h
+freeswitch_SOURCES = src/switch.c
+nodist_freeswitch_SOURCES = src/include/switch_version.h
 freeswitch_CFLAGS = $(AM_CFLAGS)
 freeswitch_LDADD = ${MOD_LINK}
-all: all-recursive
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
@@ -416,8 +418,6 @@
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 build/modmake.rules: $(top_builddir)/config.status $(top_srcdir)/build/modmake.rules.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
-src/include/switch_version.h: $(top_builddir)/config.status $(top_srcdir)/src/include/switch_version.h.in
-	cd $(top_builddir) && $(SHELL) ./config.status $@
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
 	test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
@@ -956,7 +956,8 @@
 	       $(distcleancheck_listfiles) ; \
 	       exit 1; } >&2
 check-am: all-am
-check: check-recursive
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-recursive
 all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
 install-binPROGRAMS: install-libLTLIBRARIES
 
@@ -965,7 +966,8 @@
 	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(library_includedir)"; do \
 	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
 	done
-install: install-recursive
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-recursive
 install-exec: install-exec-recursive
 install-data: install-data-recursive
 uninstall: uninstall-recursive
@@ -990,6 +992,7 @@
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
 clean: clean-recursive
 
 clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
@@ -1085,12 +1088,20 @@
 		$(INSTALL) ./$(NAME) $(DESTDIR)$(PREFIX)/bin/$(NAME) ;\
 	 fi
 
-version: Makefile src/include/switch_version.h
-	MAKE=$(MAKE) ./build/checkversion.sh
+.version:
+	touch .version
 
-newversion: Makefile
-	MAKE=$(MAKE) ./build/checkversion.sh force
-	$(MAKE)
+src/include/switch_version.h: $(top_srcdir)/src/include/switch_version.h.in .version $(libfreeswitch_la_SOURCES) $(library_include_HEADERS)
+	@if test ! -f .noversion ; then \
+	  force=0 ; \
+	  version=`svnversion . -n || echo hacked` ; \
+	  oldversion=`cat .version 2>/dev/null || echo "0"` ; \
+	  test ! -f src/include/switch_version.h || grep "@SVN_VERSION@" src/include/switch_version.h && force=1 ; \
+	  if test "$$oldversion" != "$$version" || test $$force = 1 ; then \
+	    cat src/include/switch_version.h.in | sed "s/@SVN_VERSION@/$$version/g" > src/include/switch_version.h ; \
+	    echo $$version > .version ; \
+	  fi ; \
+	fi ;
 
 .nodepends:
 	touch .nodepends
@@ -1121,7 +1132,7 @@
 teletone:
 	cd libs/libteletone && $(MAKE)
 
-deps: version sqlite apr apr-util pcre srtp resample teletone
+deps: sqlite apr apr-util pcre srtp resample teletone
 
 core: deps libfreeswitch.la  
 

Modified: freeswitch/trunk/configure
==============================================================================
--- freeswitch/trunk/configure	(original)
+++ freeswitch/trunk/configure	Tue Mar 13 02:17:58 2007
@@ -25211,8 +25211,6 @@
 subdirs="$subdirs libs/portaudio"
 
 
-
-          ac_config_files="$ac_config_files src/include/switch_version.h"
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -25808,7 +25806,6 @@
   "src/mod/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mod/Makefile" ;;
   "src/include/switch_am_config.h" ) CONFIG_FILES="$CONFIG_FILES src/include/switch_am_config.h" ;;
   "build/modmake.rules" ) CONFIG_FILES="$CONFIG_FILES build/modmake.rules" ;;
-  "src/include/switch_version.h" ) CONFIG_FILES="$CONFIG_FILES src/include/switch_version.h" ;;
   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
   "src/include/switch_private.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/switch_private.h" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5

Modified: freeswitch/trunk/configure.in
==============================================================================
--- freeswitch/trunk/configure.in	(original)
+++ freeswitch/trunk/configure.in	Tue Mar 13 02:17:58 2007
@@ -314,5 +314,4 @@
 AC_CONFIG_SUBDIRS(libs/xmlrpc-c)
 AC_CONFIG_SUBDIRS(libs/portaudio)
 
-
-AC_OUTPUT([src/include/switch_version.h])
+AC_OUTPUT



More information about the Freeswitch-svn mailing list