- 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.


git-svn-id: file:///svn/unbound/trunk@2870 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2013-03-22 12:41:13 +00:00
parent 93bdeae0ff
commit efd7d6efb7
7 changed files with 57 additions and 18 deletions

View file

@ -30,6 +30,9 @@ PYTHONMOD_INSTALL=@PYTHONMOD_INSTALL@
PYTHONMOD_UNINSTALL=@PYTHONMOD_UNINSTALL@ PYTHONMOD_UNINSTALL=@PYTHONMOD_UNINSTALL@
PYUNBOUND_INSTALL=@PYUNBOUND_INSTALL@ PYUNBOUND_INSTALL=@PYUNBOUND_INSTALL@
PYUNBOUND_UNINSTALL=@PYUNBOUND_UNINSTALL@ PYUNBOUND_UNINSTALL=@PYUNBOUND_UNINSTALL@
UNBOUND_VERSION_MAJOR=@UNBOUND_VERSION_MAJOR@
UNBOUND_VERSION_MINOR=@UNBOUND_VERSION_MINOR@
UNBOUND_VERSION_MICRO=@UNBOUND_VERSION_MICRO@
ALLTARGET=@ALLTARGET@ ALLTARGET=@ALLTARGET@
# _unbound.la if pyunbound enabled. # _unbound.la if pyunbound enabled.
@ -275,7 +278,7 @@ test: unittest$(EXEEXT) testbound$(EXEEXT)
longtest: tests longtest: tests
if test -x "`which bash`"; then bash testcode/do-tests.sh; else sh testcode/do-tests.sh; fi 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) libunbound.la: $(LIBUNBOUND_OBJ_LINK)
$(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) -rpath $(libdir) -lssl $(LIBS) $(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 harvest$(EXEEXT): $(HARVEST_OBJ_LINK) libunbound.la
$(LINK) -o $@ $(HARVEST_OBJ_LINK) $(LIBS) -L. -L.libs -lunbound $(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 unbound-control-setup: $(srcdir)/smallapp/unbound-control-setup.sh
sed -e 's:^DESTDIR=.*$$:DESTDIR=$(UNBOUND_RUN_DIR):' < $(srcdir)/smallapp/unbound-control-setup.sh > $@ sed -e 's:^DESTDIR=.*$$:DESTDIR=$(UNBOUND_RUN_DIR):' < $(srcdir)/smallapp/unbound-control-setup.sh > $@
-chmod +x $@ -chmod +x $@
@ -367,8 +373,8 @@ pythonmod/interface.h: $(srcdir)/pythonmod/interface.i config.h
$(SWIG) $(CPPFLAGS) -o $@ -python $(srcdir)/pythonmod/interface.i $(SWIG) $(CPPFLAGS) -o $@ -python $(srcdir)/pythonmod/interface.i
libunbound_wrap.lo libunbound_wrap.o: libunbound/python/libunbound_wrap.c \ libunbound_wrap.lo libunbound_wrap.o: libunbound/python/libunbound_wrap.c \
$(srcdir)/libunbound/unbound.h unbound.h
libunbound/python/libunbound_wrap.c: $(srcdir)/libunbound/python/libunbound.i $(srcdir)/libunbound/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 @-if test ! -d libunbound/python; then $(INSTALL) -d libunbound/python; fi
$(SWIG) -python -o $@ $(CPPFLAGS) $(srcdir)/libunbound/python/libunbound.i $(SWIG) -python -o $@ $(CPPFLAGS) $(srcdir)/libunbound/python/libunbound.i
@ -391,7 +397,7 @@ util/configparser.c util/configparser.h: $(srcdir)/util/configparser.y
clean: clean:
rm -f *.o *.d *.lo *~ tags 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 $(ALL_SRC:.c=.lint)
rm -f _unbound.la libunbound/python/libunbound_wrap.c libunbound/python/unbound.py pythonmod/interface.h pythonmod/unboundmodule.py 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 rm -rf autom4te.cache .libs build doc/html doc/xml
@ -483,7 +489,7 @@ install: all $(PYTHONMOD_INSTALL) $(PYUNBOUND_INSTALL)
done done
$(INSTALL) -c -m 755 unbound-control-setup $(DESTDIR)$(sbindir)/unbound-control-setup $(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 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=install cp libunbound.la $(DESTDIR)$(libdir)
$(LIBTOOL) --mode=finish $(DESTDIR)$(libdir) $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)

View file

@ -2,7 +2,8 @@
# Copyright 2009, Wouter Wijngaards, NLnet Labs. # Copyright 2009, Wouter Wijngaards, NLnet Labs.
# BSD licensed. # 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-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. # 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. # 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 Picks the first three(,0) or four numbers out of the name.
dnl $1: variable for the result dnl $1: variable for the result
AC_DEFUN([ACX_RSRC_VERSION], 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. dnl Routine to help check for compiler flags.

11
configure vendored
View file

@ -743,6 +743,9 @@ build
LIBUNBOUND_AGE LIBUNBOUND_AGE
LIBUNBOUND_REVISION LIBUNBOUND_REVISION
LIBUNBOUND_CURRENT LIBUNBOUND_CURRENT
UNBOUND_VERSION_MICRO
UNBOUND_VERSION_MINOR
UNBOUND_VERSION_MAJOR
target_alias target_alias
host_alias host_alias
build_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 ac_compiler_gnu=$ac_cv_c_compiler_gnu
UNBOUND_VERSION_MAJOR=1
UNBOUND_VERSION_MINOR=4
UNBOUND_VERSION_MICRO=21
LIBUNBOUND_CURRENT=4 LIBUNBOUND_CURRENT=4
LIBUNBOUND_REVISION=1 LIBUNBOUND_REVISION=1
@ -4140,7 +4149,7 @@ _ACEOF
$as_echo "#define WINVER 0x0502" >>confdefs.h $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 cat >>confdefs.h <<_ACEOF

View file

@ -6,7 +6,14 @@ sinclude(acx_pthread.m4)
sinclude(acx_python.m4) sinclude(acx_python.m4)
sinclude(ac_pkg_swig.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_CURRENT=4
LIBUNBOUND_REVISION=1 LIBUNBOUND_REVISION=1

View file

@ -1,6 +1,9 @@
22 March 2013: Wouter 22 March 2013: Wouter
- Fix resolve of names that use a mix of public and private addresses. - Fix resolve of names that use a mix of public and private addresses.
- iana portlist update. - 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 21 March 2013: Wouter
- release 1.4.20 - release 1.4.20

View file

@ -97,6 +97,11 @@
extern "C" { extern "C" {
#endif #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, * The validation context is created to hold the resolver status,
* validation keys and a small cache (containing messages, rrsets, * validation keys and a small cache (containing messages, rrsets,

View file

@ -109,16 +109,24 @@ replace_all () {
info "Updating '$1' with today's date." info "Updating '$1' with today's date."
replace_text "$1" "@date@" "`date +'%b %e, %Y'`" 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_svn_root () {
# Check if SVNROOT is specified. # Check if SVNROOT is specified.
if [ -z "$SVNROOT" ]; then if [ -z "$SVNROOT" ]; then
if test -f .svn/entries; then if svn info 2>&1 | grep "not a working copy" >/dev/null; then
eval `svn info | grep 'URL:' | sed -e 's/URL: /url=/' | head -1` if test -z "$SVNROOT"; then
SVNROOT="$url" error "SVNROOT must be specified (using -d)"
fi fi
if test -z "$SVNROOT"; then else
error "SVNROOT must be specified (using -d)" eval `svn info | grep 'URL:' | sed -e 's/URL: /url=/' | head -1`
SVNROOT="$url"
fi fi
fi fi
} }
@ -277,7 +285,7 @@ if [ "$DOWIN" = "yes" ]; then
version2=`echo $version | sed -e 's/rc.*$//' -e 's/_20.*$//'` version2=`echo $version | sed -e 's/rc.*$//' -e 's/_20.*$//'`
version2="${version2}_`date +%Y%m%d`" version2="${version2}_`date +%Y%m%d`"
fi fi
replace_text "configure.ac" "AC_INIT(unbound, $version" "AC_INIT(unbound, $version2" replace_version "configure.ac" "$version" "$version2"
version="$version2" version="$version2"
info "Rebuilding configure script (autoconf) snapshot." info "Rebuilding configure script (autoconf) snapshot."
autoconf || error_cleanup "Autoconf failed." autoconf || error_cleanup "Autoconf failed."
@ -404,7 +412,7 @@ if [ "$RC" != "no" ]; then
version2="${version}rc$RC" version2="${version}rc$RC"
info "Version number: $version2" info "Version number: $version2"
replace_text "configure.ac" "AC_INIT(unbound, $version" "AC_INIT(unbound, $version2" replace_version "configure.ac" "$version" "$version2"
version="$version2" version="$version2"
RECONFIGURE="yes" RECONFIGURE="yes"
fi fi
@ -414,7 +422,7 @@ if [ "$SNAPSHOT" = "yes" ]; then
version2="${version}_`date +%Y%m%d`" version2="${version}_`date +%Y%m%d`"
info "Snapshot version number: $version2" 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" version="$version2"
RECONFIGURE="yes" RECONFIGURE="yes"
fi fi