From 27459757db7b43483b51f354b78b15d4d1ef6b90 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 4 Jan 1991 15:01:59 +0000 Subject: [PATCH] Changed installation mechanism --- util/LLgen/Makefile | 8 ++++++++ util/LLgen/READ_ME | 2 +- util/LLgen/src/.distr | 9 ++++----- util/LLgen/src/Makefile | 19 ++++++++++++++++--- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/util/LLgen/Makefile b/util/LLgen/Makefile index d1303022d..c9b416228 100644 --- a/util/LLgen/Makefile +++ b/util/LLgen/Makefile @@ -14,6 +14,14 @@ install: cd src; make rm -f $(INSTALLDIR)/LLgen $(LIBDIR)/rec $(LIBDIR)/incl $(MANDIR)/LLgen.1 cp src/LLgen $(INSTALLDIR)/LLgen + cp lib/rec $(LIBDIR)/rec + cp lib/incl $(LIBDIR)/incl + cp LLgen.1 $(MANDIR)/LLgen.1 + +firstinstall: + cd src; make first + rm -f $(INSTALLDIR)/LLgen $(LIBDIR)/rec $(LIBDIR)/incl $(MANDIR)/LLgen.1 + cp src/LLgen $(INSTALLDIR)/LLgen -mkdir $(LIBDIR) cp lib/rec $(LIBDIR)/rec cp lib/incl $(LIBDIR)/incl diff --git a/util/LLgen/READ_ME b/util/LLgen/READ_ME index 3bcd1e416..8208d5049 100644 --- a/util/LLgen/READ_ME +++ b/util/LLgen/READ_ME @@ -13,7 +13,7 @@ To install LLgen, proceed as follows: library files, INSTALLDIR should be set to the directory where LLgen is to be put. - now type - make install + make firstinstall - This should do all the work. LLgen.1 contains a man-page. diff --git a/util/LLgen/src/.distr b/util/LLgen/src/.distr index e878c153c..780d5e3fc 100644 --- a/util/LLgen/src/.distr +++ b/util/LLgen/src/.distr @@ -1,10 +1,9 @@ -parser cclass.c cclass.h -LLgen.c +LLgen.c.dist LLgen.g -Lpars.c -Lpars.h +Lpars.c.dist +Lpars.h.dist Makefile alloc.c assert.h @@ -20,6 +19,6 @@ name.c reach.c sets.c sets.h -tokens.c +tokens.c.dist tokens.g types.h diff --git a/util/LLgen/src/Makefile b/util/LLgen/src/Makefile index 2e28db8d3..0a93282ff 100644 --- a/util/LLgen/src/Makefile +++ b/util/LLgen/src/Makefile @@ -15,8 +15,17 @@ all: parser @make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "PROF=$(PROF)" parser: $(GFILES) - -LLgen $(LLOPT) $(GFILES) -# must continue when installing LLgen + LLgen $(LLOPT) $(GFILES) + @touch parser + +first: firstparser + @make LLgen "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "PROF=$(PROF)" + +firstparser: + cp LLgen.c.dist LLgen.c + cp tokens.c.dist tokens.c + cp Lpars.c.dist Lpars.c + cp Lpars.h.dist Lpars.h @touch parser LLgen: $(OBJECTS) @@ -30,11 +39,15 @@ lint: $(LINT) $(INCLUDES) $(CFILES) clean: - -rm -f *.o LL.temp LL.xxx LL.output LLgen + -rm -f *.o LL.temp LL.xxx LL.output LLgen LLgen.c tokens.c Lpars.[ch] distr: -rm -f parser make parser + cp Lpars.c Lpars.c.dist + cp Lpars.h Lpars.h.dist + cp LLgen.c LLgen.c.dist + cp tokens.c tokens.c.dist # The next lines are generated automatically # AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO