]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix makedist for new svn for -d option.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 22 Mar 2013 12:41:13 +0000 (12:41 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 22 Mar 2013 12:41:13 +0000 (12:41 +0000)
- unbound.h header file has UNBOUND_VERSION_MAJOR define.
- Fix windows RSRC version for long version numbers.

git-svn-id: file:///svn/unbound/trunk@2870 be551aaa-1e26-0410-a405-d3ace91eadb9

Makefile.in
acx_nlnetlabs.m4
configure
configure.ac
doc/Changelog
libunbound/unbound.h
makedist.sh

index 114a2225773aefecb08cb36a0ce6c111a74a11a7..bb1643010ee19e569657a5bb127a484c02a81e35 100644 (file)
@@ -30,6 +30,9 @@ PYTHONMOD_INSTALL=@PYTHONMOD_INSTALL@
 PYTHONMOD_UNINSTALL=@PYTHONMOD_UNINSTALL@
 PYUNBOUND_INSTALL=@PYUNBOUND_INSTALL@
 PYUNBOUND_UNINSTALL=@PYUNBOUND_UNINSTALL@
+UNBOUND_VERSION_MAJOR=@UNBOUND_VERSION_MAJOR@
+UNBOUND_VERSION_MINOR=@UNBOUND_VERSION_MINOR@
+UNBOUND_VERSION_MICRO=@UNBOUND_VERSION_MICRO@
 ALLTARGET=@ALLTARGET@
 
 # _unbound.la if pyunbound enabled.
@@ -275,7 +278,7 @@ test:       unittest$(EXEEXT) testbound$(EXEEXT)
 longtest:      tests
        if test -x "`which bash`"; then bash testcode/do-tests.sh; else sh testcode/do-tests.sh; fi
 
-lib:   libunbound.la
+lib:   libunbound.la unbound.h
 
 libunbound.la: $(LIBUNBOUND_OBJ_LINK)
        $(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) -rpath $(libdir) -lssl $(LIBS)
@@ -340,6 +343,9 @@ delayer$(EXEEXT):   $(DELAYER_OBJ_LINK)
 harvest$(EXEEXT):      $(HARVEST_OBJ_LINK) libunbound.la
        $(LINK) -o $@ $(HARVEST_OBJ_LINK) $(LIBS) -L. -L.libs -lunbound
 
+unbound.h:     $(srcdir)/libunbound/unbound.h
+       sed -e 's/@''UNBOUND_VERSION_MAJOR@/$(UNBOUND_VERSION_MAJOR)/' -e 's/@''UNBOUND_VERSION_MINOR@/$(UNBOUND_VERSION_MINOR)/' -e 's/@''UNBOUND_VERSION_MICRO@/$(UNBOUND_VERSION_MICRO)/' < $(srcdir)/libunbound/unbound.h > $@
+
 unbound-control-setup: $(srcdir)/smallapp/unbound-control-setup.sh
        sed -e 's:^DESTDIR=.*$$:DESTDIR=$(UNBOUND_RUN_DIR):' < $(srcdir)/smallapp/unbound-control-setup.sh > $@
        -chmod +x $@
@@ -367,8 +373,8 @@ pythonmod/interface.h:      $(srcdir)/pythonmod/interface.i config.h
        $(SWIG) $(CPPFLAGS) -o $@ -python $(srcdir)/pythonmod/interface.i
 
 libunbound_wrap.lo libunbound_wrap.o: libunbound/python/libunbound_wrap.c \
-       $(srcdir)/libunbound/unbound.h
-libunbound/python/libunbound_wrap.c:   $(srcdir)/libunbound/python/libunbound.i $(srcdir)/libunbound/unbound.h
+       unbound.h
+libunbound/python/libunbound_wrap.c:   $(srcdir)/libunbound/python/libunbound.i unbound.h
        @-if test ! -d libunbound/python; then $(INSTALL) -d libunbound/python; fi
        $(SWIG) -python -o $@ $(CPPFLAGS) $(srcdir)/libunbound/python/libunbound.i
 
@@ -391,7 +397,7 @@ util/configparser.c util/configparser.h:  $(srcdir)/util/configparser.y
 
 clean:
        rm -f *.o *.d *.lo *~ tags
-       rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la
+       rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la unbound.h
        rm -f $(ALL_SRC:.c=.lint)
        rm -f _unbound.la libunbound/python/libunbound_wrap.c libunbound/python/unbound.py pythonmod/interface.h pythonmod/unboundmodule.py
        rm -rf autom4te.cache .libs build doc/html doc/xml
@@ -483,7 +489,7 @@ install:    all $(PYTHONMOD_INSTALL) $(PYUNBOUND_INSTALL)
        done
        $(INSTALL) -c -m 755 unbound-control-setup $(DESTDIR)$(sbindir)/unbound-control-setup
        if test ! -e $(DESTDIR)$(configfile); then $(INSTALL) -d `dirname $(DESTDIR)$(configfile)`; $(INSTALL) -c -m 644 doc/example.conf $(DESTDIR)$(configfile); fi
-       $(LIBTOOL) --mode=install cp $(srcdir)/libunbound/unbound.h $(DESTDIR)$(includedir)/unbound.h
+       $(LIBTOOL) --mode=install cp unbound.h $(DESTDIR)$(includedir)/unbound.h
        $(LIBTOOL) --mode=install cp libunbound.la $(DESTDIR)$(libdir)
        $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
 
index e90c81ea02abd6e14a5d2faee30b3a7dbce3c9f3..bc18187fdffaefdc0d2fbf3a779847cb70a89f80 100644 (file)
@@ -2,7 +2,8 @@
 # Copyright 2009, Wouter Wijngaards, NLnet Labs.   
 # BSD licensed.
 #
-# Version 21
+# Version 22
+# 2013-03-22 Fix ACX_RSRC_VERSION for long version numbers.
 # 2012-02-09 Fix AHX_MEMCMP_BROKEN with undef in compat/memcmp.h.
 # 2012-01-20 Fix COMPILER_FLAGS_UNBOUND for gcc 4.6.2 assigned-not-used-warns.
 # 2011-12-05 Fix getaddrinfowithincludes on windows with fedora16 mingw32-gcc.
@@ -101,7 +102,7 @@ dnl Calculate comma separated windows-resource numbers from package version.
 dnl Picks the first three(,0) or four numbers out of the name.
 dnl $1: variable for the result
 AC_DEFUN([ACX_RSRC_VERSION], 
-[$1=[`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*$/\1,\2,\3,0/' `]
+[$1=[`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1,\2,\3,0/' `]
 ])
 
 dnl Routine to help check for compiler flags.
index 1f1780be3e1b8f120c8cbac42a344cc573f0505b..f0a6cbbc6cdb4ce5fe660c0fed93feb4993cee42 100755 (executable)
--- a/configure
+++ b/configure
@@ -743,6 +743,9 @@ build
 LIBUNBOUND_AGE
 LIBUNBOUND_REVISION
 LIBUNBOUND_CURRENT
+UNBOUND_VERSION_MICRO
+UNBOUND_VERSION_MINOR
+UNBOUND_VERSION_MAJOR
 target_alias
 host_alias
 build_alias
@@ -2483,6 +2486,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+UNBOUND_VERSION_MAJOR=1
+
+UNBOUND_VERSION_MINOR=4
+
+UNBOUND_VERSION_MICRO=21
+
 
 LIBUNBOUND_CURRENT=4
 LIBUNBOUND_REVISION=1
@@ -4140,7 +4149,7 @@ _ACEOF
 
 $as_echo "#define WINVER 0x0502" >>confdefs.h
 
-wnvs=`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*$/\1,\2,\3,0/' `
+wnvs=`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1,\2,\3,0/' `
 
 
 cat >>confdefs.h <<_ACEOF
index 08e424859a0bbbde1bbc0e21c63eb3f3b1e6cc8b..62d7492c7e3f166f3136add47a44bc611d066c02 100644 (file)
@@ -6,7 +6,14 @@ sinclude(acx_pthread.m4)
 sinclude(acx_python.m4)
 sinclude(ac_pkg_swig.m4)
 
-AC_INIT(unbound, 1.4.21, unbound-bugs@nlnetlabs.nl, unbound)
+# must be numbers. ac_defun because of later processing
+m4_define([VERSION_MAJOR],[1])
+m4_define([VERSION_MINOR],[4])
+m4_define([VERSION_MICRO],[21])
+AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound)
+AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR])
+AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR])
+AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO])
 
 LIBUNBOUND_CURRENT=4
 LIBUNBOUND_REVISION=1
index 7123ed686e12d7a207bc01b2973fe514c9b19b5b..b4ff97c03819be575ed94e14f9d032afa4804564 100644 (file)
@@ -1,6 +1,9 @@
 22 March 2013: Wouter
        - Fix resolve of names that use a mix of public and private addresses.
        - iana portlist update.
+       - Fix makedist for new svn for -d option.
+       - unbound.h header file has UNBOUND_VERSION_MAJOR define.
+       - Fix windows RSRC version for long version numbers.
 
 21 March 2013: Wouter
        - release 1.4.20
index d435bf28d35e433283870e30f295d3c3c59dce17..1ab7d45ef342d0aa2ac7ac50f611413824006046 100644 (file)
 extern "C" {
 #endif
 
+/** the version of this header file */
+#define UNBOUND_VERSION_MAJOR @UNBOUND_VERSION_MAJOR@
+#define UNBOUND_VERSION_MINOR @UNBOUND_VERSION_MINOR@
+#define UNBOUND_VERSION_MICRO @UNBOUND_VERSION_MICRO@
+
 /**
  * The validation context is created to hold the resolver status,
  * validation keys and a small cache (containing messages, rrsets,
index ef930bf7a4d582f4fbdc4d6abae08f3951341d92..f1735515e7649e8e773ba4809e02f70f34c0a603 100755 (executable)
@@ -109,16 +109,24 @@ replace_all () {
     info "Updating '$1' with today's date."
     replace_text "$1" "@date@" "`date +'%b %e, %Y'`"
 }
+
+replace_version () {
+    local v1=`echo $2 | sed -e 's/^.*\..*\.//'`
+    local v2=`echo $3 | sed -e 's/^.*\..*\.//'`
+    replace_text "$1" "VERSION_MICRO\],\[$v1" "VERSION_MICRO\],\[$v2"
+    head -20 "$1"
+}
     
 check_svn_root () {
     # Check if SVNROOT is specified.
     if [ -z "$SVNROOT" ]; then
-       if test -f .svn/entries; then
-             eval `svn info | grep 'URL:' | sed -e 's/URL: /url=/' | head -1`
-             SVNROOT="$url"
-       fi
-       if test -z "$SVNROOT"; then
-           error "SVNROOT must be specified (using -d)"
+       if svn info 2>&1 | grep "not a working copy" >/dev/null; then
+               if test -z "$SVNROOT"; then
+                   error "SVNROOT must be specified (using -d)"
+               fi
+       else
+            eval `svn info | grep 'URL:' | sed -e 's/URL: /url=/' | head -1`
+            SVNROOT="$url"
        fi
     fi
 }
@@ -277,7 +285,7 @@ if [ "$DOWIN" = "yes" ]; then
                version2=`echo $version | sed -e 's/rc.*$//' -e 's/_20.*$//'`
                version2="${version2}_`date +%Y%m%d`"
        fi
-       replace_text "configure.ac" "AC_INIT(unbound, $version" "AC_INIT(unbound, $version2"
+       replace_version "configure.ac" "$version" "$version2"
        version="$version2"
        info "Rebuilding configure script (autoconf) snapshot."
        autoconf || error_cleanup "Autoconf failed."
@@ -404,7 +412,7 @@ if [ "$RC" != "no" ]; then
     version2="${version}rc$RC"
     info "Version number: $version2"
 
-    replace_text "configure.ac" "AC_INIT(unbound, $version" "AC_INIT(unbound, $version2"
+    replace_version "configure.ac" "$version" "$version2"
     version="$version2"
     RECONFIGURE="yes"
 fi
@@ -414,7 +422,7 @@ if [ "$SNAPSHOT" = "yes" ]; then
     version2="${version}_`date +%Y%m%d`"
     info "Snapshot version number: $version2"
 
-    replace_text "configure.ac" "AC_INIT(unbound, $version" "AC_INIT(unbound, $version2"
+    replace_version "configure.ac" "$version" "$version2"
     version="$version2"
     RECONFIGURE="yes"
 fi