
parser.test.in.diff is for libsmi/test/parser.test.in:
Substitutes the @srcdir@ variable during the configure process, then turns that into an $abssrcdir by cd'ing to @srcdir@ and running 'pwd' (very common bit of code). The relative references to ../mibs are now changed to point to something relative to $abssrcdir. This allows the parser test to finds the its files. The test completes fine outside of the source tree.
mibs.diff is for libsmi/mibs/* (only touches Makefile.am files):
Removes the mkinstalldirs magic from mibs/Makefile.am and replaces it with directory references in each of the individual Makefile.am's, which causes the build script to automatically create the installation directories. Moves the list of files from mibs/Makefile.am to each individual Makefile.am and specifies their installation directory explicitly. This causes the mibs files to be installed correctly when building outside of the source tree.
Please apply these to HEAD.
I noticed that none of these files have been updated since at least 2000 (I think) and the files in CVS are the same as the files that are in the 0.4.1 release. What are the chances that we could commit these patches (along with a reautotooling so that the shared lib will build on Cygwin) to the 0.4 branch and cut a 0.4.2 release while waiting for the next 0.x release to come out? It would be advantageous for other package maintainers to get these patches in the default source package so that they don't have to build a possibly unstable version from CVS. Awaiting your feedback.
Harold
Index: parser.test.in =================================================================== RCS file: /anoncvs/libsmi/test/parser.test.in,v retrieving revision 1.6 diff -u -r1.6 parser.test.in --- parser.test.in 15 Nov 2000 10:50:28 -0000 1.6 +++ parser.test.in 27 Nov 2003 17:16:24 -0000 @@ -3,17 +3,19 @@ rm -rf parser.out mkdir parser.out
+abssrcdir=`cd @srcdir@; pwd` + RC=0 -SMIPATH=$SMIPATH:../mibs +SMIPATH=$SMIPATH:$abssrcdir/../mibs/ietf:$abssrcdir/mibs export SMIPATH
-for n in mibs/LIBSMI-TEST-???-MIB ; do +for n in $abssrcdir/mibs/LIBSMI-TEST-???-MIB ; do mib=`basename $n` echo -n "Checking $mib. " cd parser.out - ../../tools/smilint -c/dev/null -l9 $mib 2>&1 | sed -e 's/^../mibs///' > $mib.err + ../../tools/smilint -c/dev/null -l9 $n 2>&1 | sed -e "s/^.*/$mib(.*)/$mib\1/" > $mib.err cd .. - cat mibs/$mib | grep "^$mib:[0-9]*: " > parser.out/$mib.expect + cat $abssrcdir/mibs/$mib | grep "^$mib:[0-9]*: " > parser.out/$mib.expect cmp -s parser.out/$mib.err parser.out/$mib.expect if [ $? -ne 0 ] ; then RC=1
Index: mibs/Makefile.am =================================================================== RCS file: /anoncvs/libsmi/mibs/Makefile.am,v retrieving revision 1.4 diff -u -r1.4 Makefile.am --- mibs/Makefile.am 11 Feb 2000 11:08:27 -0000 1.4 +++ mibs/Makefile.am 27 Nov 2003 17:24:38 -0000 @@ -12,12 +12,4 @@ #
MIBDIRS = iana ietf irtf tubs site - -MIBS = $(shell ls -1d [a-z]*/* | egrep -v 'CVS|Makefile') -mib_DATA = $(MIBS) SUBDIRS = $(MIBDIRS) - -install-exec-local: - for dir in $(MIBDIRS) ; do \ - $(mkinstalldirs) $(DESTDIR)$(mibdir)/$$dir ; \ - done Index: mibs/iana/Makefile.am =================================================================== RCS file: /anoncvs/libsmi/mibs/iana/Makefile.am,v retrieving revision 1.1 diff -u -r1.1 Makefile.am --- mibs/iana/Makefile.am 12 Dec 1999 12:21:05 -0000 1.1 +++ mibs/iana/Makefile.am 27 Nov 2003 17:24:38 -0000 @@ -11,4 +11,7 @@ # @(#) $Id: Makefile.am,v 1.1 1999/12/12 12:21:05 strauss Exp $ #
-EXTRA_DIST = $(shell ls -1 | egrep -v 'CVS|Makefile') +ianadir = $(mibdir)/iana +MIBS = $(shell ls -1 $(srcdir) | egrep -v 'CVS|Makefile') +EXTRA_DIST = $(MIBS) +iana_DATA = $(MIBS) Index: mibs/ietf/Makefile.am =================================================================== RCS file: /anoncvs/libsmi/mibs/ietf/Makefile.am,v retrieving revision 1.1 diff -u -r1.1 Makefile.am --- mibs/ietf/Makefile.am 12 Dec 1999 12:21:05 -0000 1.1 +++ mibs/ietf/Makefile.am 27 Nov 2003 17:24:38 -0000 @@ -11,4 +11,7 @@ # @(#) $Id: Makefile.am,v 1.1 1999/12/12 12:21:05 strauss Exp $ #
-EXTRA_DIST = $(shell ls -1 | egrep -v 'CVS|Makefile') +ietfdir = $(mibdir)/ietf +MIBS = $(shell ls -1 $(srcdir) | egrep -v 'CVS|Makefile') +EXTRA_DIST = $(MIBS) +ietf_DATA = $(MIBS) Index: mibs/irtf/Makefile.am =================================================================== RCS file: /anoncvs/libsmi/mibs/irtf/Makefile.am,v retrieving revision 1.1 diff -u -r1.1 Makefile.am --- mibs/irtf/Makefile.am 12 Dec 1999 12:21:05 -0000 1.1 +++ mibs/irtf/Makefile.am 27 Nov 2003 17:24:38 -0000 @@ -11,4 +11,7 @@ # @(#) $Id: Makefile.am,v 1.1 1999/12/12 12:21:05 strauss Exp $ #
-EXTRA_DIST = $(shell ls -1 | egrep -v 'CVS|Makefile') +irtfdir = $(mibdir)/irtf +MIBS = $(shell ls -1 $(srcdir) | egrep -v 'CVS|Makefile') +EXTRA_DIST = $(MIBS) +irtf_DATA = $(MIBS) Index: mibs/site/Makefile.am =================================================================== RCS file: /anoncvs/libsmi/mibs/site/Makefile.am,v retrieving revision 1.1 diff -u -r1.1 Makefile.am --- mibs/site/Makefile.am 12 Dec 1999 12:21:05 -0000 1.1 +++ mibs/site/Makefile.am 27 Nov 2003 17:24:38 -0000 @@ -11,4 +11,7 @@ # @(#) $Id: Makefile.am,v 1.1 1999/12/12 12:21:05 strauss Exp $ #
-EXTRA_DIST = $(shell ls -1 | egrep -v 'CVS|Makefile') +sitedir = $(mibdir)/site +MIBS = $(shell ls -1 $(srcdir) | egrep -v 'CVS|Makefile') +EXTRA_DIST = $(MIBS) +site_DATA = $(MIBS) Index: mibs/tubs/Makefile.am =================================================================== RCS file: /anoncvs/libsmi/mibs/tubs/Makefile.am,v retrieving revision 1.1 diff -u -r1.1 Makefile.am --- mibs/tubs/Makefile.am 11 Feb 2000 11:08:31 -0000 1.1 +++ mibs/tubs/Makefile.am 27 Nov 2003 17:24:38 -0000 @@ -11,4 +11,7 @@ # @(#) $Id: Makefile.am,v 1.1 2000/02/11 11:08:31 strauss Exp $ #
-EXTRA_DIST = $(shell ls -1 | egrep -v 'CVS|Makefile') +tubsdir = $(mibdir)/tubs +MIBS = $(shell ls -1 $(srcdir) | egrep -v 'CVS|Makefile') +EXTRA_DIST = $(MIBS) +tubs_DATA = $(MIBS)