From 1099cdc0aaf0ec5ba56eab80c2e28e371e83313f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 28 Jun 1997 19:43:05 +0000 Subject: [PATCH 1/1] (bison_version): New variable. (dist): Use that variable. (bison.s1): Substitute the Bison version into bison.simple. --- Makefile.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index bce34aa7..74613d60 100644 --- a/Makefile.in +++ b/Makefile.in @@ -60,6 +60,9 @@ infodir = $(prefix)/info mandir = $(prefix)/man/man$(manext) manext = 1 +# hope this works on non-gnu makes. +bison_version = `sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` + #### End of system configuration section. #### DISTFILES = COPYING ChangeLog Makefile.in configure configure.in \ @@ -108,7 +111,7 @@ configure: configure.in # Copy bison.simple, inserting directory name into the #line commands. bison.s1: bison.simple -rm -f bison.s1 - sed -e "/^#line/ s|bison|$(datadir)/bison|" < $(srcdir)/$(PFILE) > $@-tmp + sed -e "/^#line/ s|bison|$(datadir)/bison|" -e "s/@bison_version@/$(bison_version)/" < $(srcdir)/$(PFILE) > $@-tmp mv $@-tmp $@ clean: @@ -151,7 +154,7 @@ bison: $(OBJECTS) # because it is normally used in the master source dir # in which configure has not been run. dist: bison.info - echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname + echo bison-$(bison_version) > .fname -rm -rf `cat .fname` mkdir `cat .fname` dst=`cat .fname`; for f in $(DISTFILES); do \ -- 2.45.2