From 1f00aafd9f5a1c69d72233c5b7859a38a6c702e5 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 4 Jul 2000 12:34:34 +0000 Subject: [PATCH] ChangeLog, Makefile.in, ct_c.awk, mk_cmds.sh.in: ct_c.awk: Work around a bug in gawk 3.05 mk_cmds.sh.in: Allow the build system to override the standard location for finding the ct_c.* files by setting the _SS_DIR_OVERRIDE environment variable. Makefile.in: Use _SS_DIR_OVERRIDE to make sure we get the version in the source tree. ChangeLog, Makefile.in: Makefile.in: Use _SS_DIR_OVERRIDE to make sure we get the mk_cmds support files from the source tree. --- lib/ss/ChangeLog | 11 +++++++++++ lib/ss/Makefile.in | 4 ++-- lib/ss/ct_c.awk | 8 +++++--- lib/ss/mk_cmds.sh.in | 4 ++++ tests/progs/ChangeLog | 5 +++++ tests/progs/Makefile.in | 2 +- 6 files changed, 28 insertions(+), 6 deletions(-) diff --git a/lib/ss/ChangeLog b/lib/ss/ChangeLog index 6243f1d0..714a2403 100644 --- a/lib/ss/ChangeLog +++ b/lib/ss/ChangeLog @@ -1,3 +1,14 @@ +2000-07-03 + + * ct_c.awk: Work around a bug in gawk 3.05 + + * mk_cmds.sh.in: Allow the build system to override the standard + location for finding the ct_c.* files by setting the + _SS_DIR_OVERRIDE environment variable. + + * Makefile.in: Use _SS_DIR_OVERRIDE to make sure we get the + version in the source tree. + 2000-05-25 * Makefile: Add hack dependency rule so that parallel makes work diff --git a/lib/ss/Makefile.in b/lib/ss/Makefile.in index 658a7c11..6dd0f8c3 100644 --- a/lib/ss/Makefile.in +++ b/lib/ss/Makefile.in @@ -38,7 +38,7 @@ BSDLIB_INSTALL_DIR = $(root_libdir) TAGS=etags COMPILE_ET=../et/compile_et -MK_CMDS=./mk_cmds +MK_CMDS=_SS_DIR_OVERRIDE=. ./mk_cmds # -I.. is so that ss/ss_err.h works # -I$(srcdir)/.. is so that ss/ss.h works @@ -108,7 +108,7 @@ FILES= $(SRCS) $(MKCMDSFILES) $(HFILES) \ all:: libss.a # libss_p.a lint -std_rqs.c: std_rqs.ct $(MK_CMDS) +std_rqs.c: std_rqs.ct mk_cmds DIR=$(srcdir) $(MK_CMDS) $(srcdir)/std_rqs.ct ss_err.c ss_err.h: ss_err.et diff --git a/lib/ss/ct_c.awk b/lib/ss/ct_c.awk index 872f6e00..ef741453 100644 --- a/lib/ss/ct_c.awk +++ b/lib/ss/ct_c.awk @@ -45,9 +45,11 @@ print " (char const *)0" > outfile print "};" > outfile printf "extern void %s __SS_PROTO;\n", subr > outfile - subr_tab[cmdnum] = subr - options_tab[cmdnum] = options - help_tab[cmdnum] = help + # Work around a bug in gawk 3.0.5 + awk_bug = cmdnum + subr_tab[awk_bug] = subr + options_tab[awk_bug] = options + help_tab[awk_bug] = help } /^[0-9]/ { diff --git a/lib/ss/mk_cmds.sh.in b/lib/ss/mk_cmds.sh.in index 9ac9ce99..cc74274c 100644 --- a/lib/ss/mk_cmds.sh.in +++ b/lib/ss/mk_cmds.sh.in @@ -12,6 +12,10 @@ if test "x$1" = x ; then exit 1 fi +if test -n "$_SS_DIR_OVERRIDE" ; then + DIR=$_SS_DIR_OVERRIDE; +fi + if test ! -f $DIR/ct_c.sed -o ! -f $DIR/ct_c.awk ; then DIR=$SS_DIR # echo "Falling back to $DIR..." diff --git a/tests/progs/ChangeLog b/tests/progs/ChangeLog index e61e2805..7757f92f 100644 --- a/tests/progs/ChangeLog +++ b/tests/progs/ChangeLog @@ -1,3 +1,8 @@ +2000-07-04 + + * Makefile.in: Use _SS_DIR_OVERRIDE to make sure we get the + mk_cmds support files from the source tree. + 1999-11-19 * Makefile.in (distclean): Remove TAGS and Makefile.in.old from diff --git a/tests/progs/Makefile.in b/tests/progs/Makefile.in index 249666a0..a4f13628 100644 --- a/tests/progs/Makefile.in +++ b/tests/progs/Makefile.in @@ -11,7 +11,7 @@ INSTALL = @INSTALL@ @MCONFIG@ -MK_CMDS= ../../lib/ss/mk_cmds +MK_CMDS= _SS_DIR_OVERRIDE=../../lib/ss ../../lib/ss/mk_cmds PROGS= test_icount