X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/22a1e99f8047b6c84a7161446dd3d0502be8d38d..b0180c64a5889d44f4792ffee06ad5e63acb39b2:/Makefile.in?ds=sidebyside diff --git a/Makefile.in b/Makefile.in index 58cb48d0..74613d60 100644 --- a/Makefile.in +++ b/Makefile.in @@ -35,8 +35,8 @@ MAKEINFO = makeinfo # -DHAVE_STRERROR If you have strerror function. DEFS = @DEFS@ -CFLAGS = -g -LDFLAGS = +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ @@ -44,8 +44,8 @@ LIBS = @LIBS@ # the GNU alloca.o here. ALLOCA = @ALLOCA@ -prefix = /usr/local -exec_prefix = $(prefix) +prefix = @prefix@ +exec_prefix = @exec_prefix@ # where the installed binary goes bindir = $(exec_prefix)/bin @@ -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 \ @@ -68,10 +71,10 @@ DISTFILES = COPYING ChangeLog Makefile.in configure configure.in \ LR0.c allocate.c closure.c conflicts.c derives.c \ files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \ output.c print.c reader.c reduce.c symtab.c version.c \ - warshall.c files.h gram.h lex.h machine.h new.h state.h \ + warshall.c files.h gram.h lex.h machine.h alloc.h state.h \ symtab.h system.h types.h bison.cld build.com vmsgetargs.c \ - vmshlp.mar README INSTALL bison.texinfo bison.info* texinfo.tex \ - getopt.c getopt.h getopt1.c alloca.c mkinstalldirs install.sh + vmshlp.mar README INSTALL NEWS bison.texinfo bison.info* texinfo.tex \ + getopt.c getopt.h getopt1.c alloca.c mkinstalldirs install-sh SHELL = /bin/sh @@ -96,27 +99,28 @@ OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o \ all: bison bison.info bison.s1 -Makefile: Makefile.in config.status - ./config.status +Makefile: config.status Makefile.in + CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status config.status: configure ./config.status --recheck configure: configure.in - cd $(srcdir); autoconf + cd $(srcdir) && autoconf # 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) > bison.s1 + sed -e "/^#line/ s|bison|$(datadir)/bison|" -e "s/@bison_version@/$(bison_version)/" < $(srcdir)/$(PFILE) > $@-tmp + mv $@-tmp $@ clean: - rm -f *.o core bison bison.s1 + rm -f *.o core bison bison.s1 config.status config.log mostlyclean: clean distclean: clean - rm -f Makefile config.status + rm -f Makefile realclean: distclean rm -f TAGS *.info* @@ -146,12 +150,19 @@ check: bison: $(OBJECTS) $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJECTS) $(LIBS) +# We don't use $(srcdir) in this rule +# 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 \ - ln $(srcdir)/$$f $$dst/$$f || { echo copying $$f; cp -p $(srcdir)/$$f $$dst/$$f ; } \ + if test -L $$f; then \ + cp $$f $$dst/$$f; chmod a-w $$dst/$$f; \ + else \ + ln $$f $$dst/$$f; \ + fi \ done tar --gzip -chf `cat .fname`.tar.gz `cat .fname` -rm -rf `cat .fname` .fname @@ -167,21 +178,22 @@ files.o: files.c $(CC) -c $(PFILES) $(DEFS) $(CPPFLAGS) $(CFLAGS) \ $(srcdir)/files.c $(OUTPUT_OPTION) -LR0.o: system.h machine.h new.h gram.h state.h -closure.o: system.h machine.h new.h gram.h -conflicts.o: system.h machine.h new.h files.h gram.h state.h -derives.o: system.h new.h types.h gram.h -files.o: system.h files.h new.h gram.h +LR0.o: system.h machine.h alloc.h gram.h state.h +allocate.o: system.h +closure.o: system.h machine.h alloc.h gram.h +conflicts.o: system.h machine.h alloc.h files.h gram.h state.h +derives.o: system.h alloc.h types.h gram.h +files.o: system.h files.h alloc.h gram.h getargs.o: system.h files.h -lalr.o: system.h machine.h types.h state.h new.h gram.h +lalr.o: system.h machine.h types.h state.h alloc.h gram.h lex.o: system.h files.h symtab.h lex.h main.o: system.h machine.h -nullable.o: system.h types.h gram.h new.h -output.o: system.h machine.h new.h files.h gram.h state.h -print.o: system.h machine.h new.h files.h gram.h state.h -reader.o: system.h files.h new.h symtab.h lex.h gram.h -reduce.o: system.h machine.h files.h new.h gram.h -symtab.o: system.h new.h symtab.h gram.h +nullable.o: system.h types.h gram.h alloc.h +output.o: system.h machine.h alloc.h files.h gram.h state.h +print.o: system.h machine.h alloc.h files.h gram.h state.h +reader.o: system.h files.h alloc.h symtab.h lex.h gram.h +reduce.o: system.h machine.h files.h alloc.h gram.h +symtab.o: system.h alloc.h symtab.h gram.h warshall.o: system.h machine.h # Prevent GNU make v3 from overflowing arg limit on SysV.