[DVDnav-discuss] r1023 - in trunk/libdvdnav: Makefile version.sh

nicodvb subversion at mplayerhq.hu
Thu May 1 11:27:16 CEST 2008


Author: nicodvb
Date: Thu May  1 11:27:16 2008
New Revision: 1023

Log:
when building a non-checkout call version.sh with the official
realease number as second paarmeter: it will be used to create
a more meaningful version.h than UNKNOWN.
Patch by Dan Nicholson: dbn.lists gmail com


Modified:
   trunk/libdvdnav/Makefile
   trunk/libdvdnav/version.sh

Modified: trunk/libdvdnav/Makefile
==============================================================================
--- trunk/libdvdnav/Makefile	(original)
+++ trunk/libdvdnav/Makefile	Thu May  1 11:27:16 2008
@@ -79,7 +79,7 @@ version.h: $(SVN_ENTRIES)
 endif
 
 version.h:
-	sh $(SRC_PATH)/version.sh $(SRC_PATH)
+	sh $(SRC_PATH)/version.sh $(SRC_PATH) "$(SHLIB_VERSION)"
 	
 $(SRCS) $(DVDREAD_SRCS): version.h
 

Modified: trunk/libdvdnav/version.sh
==============================================================================
--- trunk/libdvdnav/version.sh	(original)
+++ trunk/libdvdnav/version.sh	Thu May  1 11:27:16 2008
@@ -5,7 +5,11 @@ test $svn_revision || svn_revision=`cd "
                                     cut -d '"' -f2 2> /dev/null`
 test $svn_revision || svn_revision=UNKNOWN
 
-NEW_REVISION="#define VERSION \"SVN-r$svn_revision\""
+if test "$svn_revision" = UNKNOWN && test -n "$2"; then
+    NEW_REVISION="#define VERSION \"$2\""
+else
+    NEW_REVISION="#define VERSION \"SVN-r$svn_revision\""
+fi
 OLD_REVISION=`cat version.h 2> /dev/null`
 
 # Update version.h only on revision changes to avoid spurious rebuilds



More information about the DVDnav-discuss mailing list