diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/Makefile.bind.in | 15 | ||||
-rw-r--r-- | util/lt.pl | 133 | ||||
-rw-r--r-- | util/regen-conf.sh | 20 |
3 files changed, 157 insertions, 11 deletions
diff --git a/util/Makefile.bind.in b/util/Makefile.bind.in index e33bae6c..7c7a4a33 100644 --- a/util/Makefile.bind.in +++ b/util/Makefile.bind.in @@ -24,13 +24,14 @@ exec_prefix = @exec_prefix@ bindconfig = --without-openssl --without-libxml2 --without-libjson \ --without-gssapi --disable-threads \ --includedir=@includedir@ --libdir=@libdir@ \ - @BINDIOMUX@ @BINDCONFIG@ --enable-full-report + @BINDLT@ @BINDIOMUX@ @BINDCONFIG@ --enable-full-report @BIND_ATF_FALSE@cleandirs = ./lib ./include @BIND_ATF_TRUE@cleandirs = ./lib ./include ./atf cleanfiles = ./configure.log ./build.log ./install.log -bindlibs = isc dns isccfg irs +# isccfg depends on isccc?! +bindlibs = isc dns isccc isccfg irs installdirs = includedir=${binddir}/include libdir=${binddir}/lib @BIND_ATF_FALSE@all: bind1 bind2 @@ -98,8 +99,6 @@ clean: @INSTALL_BIND_FALSE@install: @INSTALL_BIND_TRUE@install: install-bind -@INSTALL_BIND_FALSE@uninstall: -@INSTALL_BIND_TRUE@uninstall: uninstall-bind install-bind: all @for libdir in ${bindlibs} ; do \ @@ -107,13 +106,7 @@ install-bind: all $(MAKE) install) ; \ done -uninstall-bind: all - @for libdir in ${bindlibs} ; do \ - (cd ${bindsrcdir}/lib/$$libdir ; \ - $(MAKE) uninstall) ; \ - done - # Include the following so that this Makefile is happy when the parent # tries to use them. -check distdir distclean dvi installcheck: +check distdir distclean dvi installcheck uninstall: diff --git a/util/lt.pl b/util/lt.pl new file mode 100644 index 00000000..eed17fe3 --- /dev/null +++ b/util/lt.pl @@ -0,0 +1,133 @@ +#!/usr/bin/perl +# +# Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC") +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + +# build configure.am with or without libtool stuff + +require 5.000; +use strict; + +# general arguments + +my @optionlist = ("with", "without", "verbose"); + +# usage + +my $usage = ("Usage: perl lt.pl [with|without] [verbose]\n"); + +# Parse arguments + +my $with = 0; +my $verbose = 0; + +foreach (@ARGV) { + if (/^with$/i) { + $with = 1; + } elsif (/^without$/i) { + $with = 0; + } elsif (/^verbose$/i) { + $verbose = 1; + } else { + die $usage; + } +} + +if ($verbose) { + if ($with) { + print STDERR "building the with libtool version\n"; + } else { + print STDERR "building the without libtool version\n"; + } +} + +# Perform + +my $line; +my $state = "top"; +my $directives = 0; +my $included = 0; +my $escaped = 0; + +foreach $line (<STDIN>) { + chomp $line; + if ($line =~ /^\@BEGIN WITH LIBTOOL$/) { + if ($state eq "top") { + $state = "with"; + } elsif ($state eq "with") { + die "got WITH begin in WITH context\n"; + } elsif ($state eq "without") { + die "got WITH begin in WITHOUT context\n"; + } + $directives += 1; + next; + } elsif ($line =~ /^\@BEGIN WITHOUT LIBTOOL$/) { + if ($state eq "top") { + $state = "without"; + } elsif ($state eq "with") { + die "got WITHOUT begin in WITH context\n"; + } elsif ($state eq "without") { + die "got WITHOUT begin in WITHOUT context\n"; + } + $directives += 1; + next; + } elsif ($line =~ /^\@END WITH LIBTOOL$/) { + if ($state eq "with") { + $state = "top"; + } elsif ($state eq "top") { + die "got WITH end outside context\n"; + } elsif ($state eq "without") { + die "got WITH end in WITHOUT context\n"; + } + $directives += 1; + next; + } elsif ($line =~ /^\@END WITHOUT LIBTOOL$/) { + if ($state eq "without") { + $state = "top"; + } elsif ($state eq "top") { + die "got WITHOUT end outside context\n"; + } elsif ($state eq "with") { + die "got WITHOUT end in WITH context\n"; + } + $directives += 1; + next; + } elsif ($line =~ /^@/) { + die "git unknown directive '$line'\n"; + } + + if ($state eq "with") { + if ($with) { + $included += 1; + } else { + $escaped += 1; + next; + } + } elsif ($state eq "without") { + if ($with) { + $escaped += 1; + next; + } else { + $included += 1; + } + } + print $line. "\n"; +} + +if ($verbose) { + print STDERR "directives: $directives\n"; + print STDERR "included: $included\n"; + print STDERR "escaped: $escaped\n"; +} + +exit 0; diff --git a/util/regen-conf.sh b/util/regen-conf.sh new file mode 100644 index 00000000..5b0c934d --- /dev/null +++ b/util/regen-conf.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC") +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + +perl util/lt.pl with < configure.ac-base > configure.ac+lt +perl util/lt.pl without < configure.ac-base > configure.ac-lt +cp -p configure.ac-lt configure.ac +autoconf |