From 20a7f7b1889391a912da1a14c8901211b04b2430 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 14 Oct 1991 09:18:33 +0000 Subject: [PATCH] improved installation mechanism --- lang/cem/cemcom/proto.make | 7 +++---- lang/cem/cpp.ansi/proto.make | 7 +++---- lang/cem/libcc.ansi/proto.make | 1 - lang/cem/lint/lpass1.ansi/proto.make | 2 -- lang/cem/lint/lpass1/proto.make | 2 -- lang/cem/lint/lpass2/proto.make | 5 +++-- lang/fortran/comp/proto.make | 9 ++++----- lang/m2/comp/proto.make | 7 +++---- lang/m2/libm2/proto.make | 6 ++++-- lang/m2/m2mm/proto.make | 7 +++---- lang/occam/comp/proto.make | 2 -- lang/pc/comp/proto.make | 2 -- mach/mantra/int/proto.make | 4 +++- mach/pdp/int/proto.make | 4 +++- util/LLgen/proto.make | 20 +++++++++++--------- 15 files changed, 40 insertions(+), 45 deletions(-) diff --git a/lang/cem/cemcom/proto.make b/lang/cem/cemcom/proto.make index e0696bc25..9ff9e1ab5 100644 --- a/lang/cem/cemcom/proto.make +++ b/lang/cem/cemcom/proto.make @@ -124,11 +124,10 @@ all: make.main make -f make.main main install: all - @-mkdir $(TARGET_HOME) - @-mkdir $(TARGET_HOME)/lib.bin - @-mkdir $(TARGET_HOME)/man cp main $(TARGET_HOME)/lib.bin/em_cemcom - cp $(SRC_DIR)/cemcom.1 $(TARGET_HOME)/man/em_cemcom.6 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/cemcom.1 $(TARGET_HOME)/man/em_cemcom.6 ; \ + fi cmp: all -cmp main $(TARGET_HOME)/lib.bin/em_cemcom diff --git a/lang/cem/cpp.ansi/proto.make b/lang/cem/cpp.ansi/proto.make index 7c8b1f812..dd21eefcb 100644 --- a/lang/cem/cpp.ansi/proto.make +++ b/lang/cem/cpp.ansi/proto.make @@ -63,11 +63,10 @@ all: make.main make -f make.main main install: all - @-mkdir $(TARGET_HOME) - @-mkdir $(TARGET_HOME)/lib.bin - @-mkdir $(TARGET_HOME)/man cp main $(TARGET_HOME)/lib.bin/cpp.ansi - cp $(SRC_DIR)/ncpp.6 $(TARGET_HOME)/man/cpp.ansi.6 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/ncpp.6 $(TARGET_HOME)/man/cpp.ansi.6 ; \ + fi cmp: all -cmp main $(TARGET_HOME)/lib.bin/cpp.ansi diff --git a/lang/cem/libcc.ansi/proto.make b/lang/cem/libcc.ansi/proto.make index b3eaab015..10cc04812 100644 --- a/lang/cem/libcc.ansi/proto.make +++ b/lang/cem/libcc.ansi/proto.make @@ -7,7 +7,6 @@ SRC_DIR = $(SRC_HOME)/lang/cem/libcc.ansi all: install: - -mkdir $(TARGET_HOME)/include -mkdir $(TARGET_HOME)/include/tail_ac ( cd $(SRC_DIR)/headers; tar cf - `cat LIST` ) | ( cd $(TARGET_HOME)/include/tail_ac ; tar xf - ) diff --git a/lang/cem/lint/lpass1.ansi/proto.make b/lang/cem/lint/lpass1.ansi/proto.make index 26381934d..15ba0f96f 100644 --- a/lang/cem/lint/lpass1.ansi/proto.make +++ b/lang/cem/lint/lpass1.ansi/proto.make @@ -129,8 +129,6 @@ all: make.main make -f make.main main install: all - @-mkdir $(TARGET_HOME) - @-mkdir $(TARGET_HOME)/lib.bin @-mkdir $(TARGET_HOME)/lib.bin/lint cp main $(TARGET_HOME)/lib.bin/lint/lpass1.ansi diff --git a/lang/cem/lint/lpass1/proto.make b/lang/cem/lint/lpass1/proto.make index 3c0058d51..92de6a9e4 100644 --- a/lang/cem/lint/lpass1/proto.make +++ b/lang/cem/lint/lpass1/proto.make @@ -126,8 +126,6 @@ all: make.main make -f make.main main install: all - @-mkdir $(TARGET_HOME) - @-mkdir $(TARGET_HOME)/lib.bin @-mkdir $(TARGET_HOME)/lib.bin/lint cp main $(TARGET_HOME)/lib.bin/lint/lpass1 diff --git a/lang/cem/lint/lpass2/proto.make b/lang/cem/lint/lpass2/proto.make index be8bc1fda..b71d4e263 100644 --- a/lang/cem/lint/lpass2/proto.make +++ b/lang/cem/lint/lpass2/proto.make @@ -33,11 +33,12 @@ OBJ = lpass2.$(SUF) checkargs.$(SUF) read.$(SUF) report.$(SUF) class.$(SUF) all: lpass2 lint.exec install: all - -mkdir $(TARGET_HOME)/lib.bin -mkdir $(TARGET_HOME)/lib.bin/lint cp lpass2 $(TARGET_HOME)/lib.bin/lint/lpass2 cp lint.exec $(TARGET_HOME)/bin/lint - cp $(SRC_DIR)/lint.1 $(TARGET_HOME)/man/lint.1 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/lint.1 $(TARGET_HOME)/man/lint.1 ; \ + fi cmp: all -cmp lpass2 $(TARGET_HOME)/lib.bin/lint/lpass2 diff --git a/lang/fortran/comp/proto.make b/lang/fortran/comp/proto.make index 7c3995f33..0a21b8a4f 100644 --- a/lang/fortran/comp/proto.make +++ b/lang/fortran/comp/proto.make @@ -79,12 +79,11 @@ CFILES = gram.c $(CSRC) all: f2c install: all - rm -f $(TARGET_HOME)/lib.bin/f2c cp f2c $(TARGET_HOME)/lib.bin/f2c - rm -f $(TARGET_HOME)/man/f2c.6 - cp $(SRC_DIR)/f2c.6 $(TARGET_HOME)/man/f2c.6 - rm -f $(TARGET_HOME)/include/_tail_cc/f2c.h - cp $(SRC_DIR)/f2c.h $(TARGET_HOME)/include/_tail_cc/f2c.h + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/f2c.6 $(TARGET_HOME)/man/f2c.6 ; \ + cp $(SRC_DIR)/f2c.h $(TARGET_HOME)/include/_tail_cc/f2c.h ; \ + fi cmp: all -cmp f2c $(TARGET_HOME)/lib.bin/f2c diff --git a/lang/m2/comp/proto.make b/lang/m2/comp/proto.make index 1012edbcb..f6300d23f 100644 --- a/lang/m2/comp/proto.make +++ b/lang/m2/comp/proto.make @@ -51,12 +51,11 @@ all: make.main make -f make.main main install: all - @-mkdir $(TARGET_HOME) - @-mkdir $(TARGET_HOME)/lib.bin cp main $(TARGET_HOME)/lib.bin/em_m2 @-mkdir $(TARGET_HOME)/man - rm -f $(TARGET_HOME)/man/em_m2.6 $(TARGET_HOME)/man/modula-2.1 - cp $(SRC_DIR)/em_m2.6 $(SRC_DIR)/modula-2.1 $(TARGET_HOME)/man + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/em_m2.6 $(SRC_DIR)/modula-2.1 $(TARGET_HOME)/man ; \ + fi cmp: all -cmp main $(TARGET_HOME)/lib.bin/em_m2 diff --git a/lang/m2/libm2/proto.make b/lang/m2/libm2/proto.make index 06cce1e88..7c6b0a184 100644 --- a/lang/m2/libm2/proto.make +++ b/lang/m2/libm2/proto.make @@ -25,5 +25,7 @@ opr: make pr | opr install: - -mkdir $(DEF_DIR) - for i in $(SOURCES) ; do cp $(SRC_DIR)/$$i $(DEF_DIR)/$$i ; done + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then if [ -d $(DEF_DIR) ] ; then : ; else mkdir $(DEF_DIR) ; fi ; \ + for i in $(SOURCES) ; do cp $(SRC_DIR)/$$i $(DEF_DIR)/$$i ; done ; \ + fi diff --git a/lang/m2/m2mm/proto.make b/lang/m2/m2mm/proto.make index e4655ff02..a315bd5da 100644 --- a/lang/m2/m2mm/proto.make +++ b/lang/m2/m2mm/proto.make @@ -38,11 +38,10 @@ all: make.main make -f make.main main install: all - @-mkdir $(TARGET_HOME) - @-mkdir $(TARGET_HOME)/bin cp main $(TARGET_HOME)/bin/m2mm - @-mkdir $(TARGET_HOME)/man - cp $(SRC_DIR)/m2mm.1 $(TARGET_HOME)/man/m2mm.1 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/m2mm.1 $(TARGET_HOME)/man/m2mm.1 ; \ + fi cmp: all -cmp main $(TARGET_HOME)/lib.bin/em_m2 diff --git a/lang/occam/comp/proto.make b/lang/occam/comp/proto.make index b9c5af3f2..6ef3085df 100644 --- a/lang/occam/comp/proto.make +++ b/lang/occam/comp/proto.make @@ -47,8 +47,6 @@ all: make.main make -f make.main main install: all - @-mkdir $(TARGET_HOME) - @-mkdir $(TARGET_HOME)/lib.bin cp main $(TARGET_HOME)/lib.bin/em_occam cmp: all diff --git a/lang/pc/comp/proto.make b/lang/pc/comp/proto.make index c2a2decb8..321ee5af1 100644 --- a/lang/pc/comp/proto.make +++ b/lang/pc/comp/proto.make @@ -52,8 +52,6 @@ all: make.main make -f make.main main install: all - @-mkdir $(TARGET_HOME) - @-mkdir $(TARGET_HOME)/lib.bin cp main $(TARGET_HOME)/lib.bin/em_pc cmp: all diff --git a/mach/mantra/int/proto.make b/mach/mantra/int/proto.make index e4d1a48a2..55a4d941b 100644 --- a/mach/mantra/int/proto.make +++ b/mach/mantra/int/proto.make @@ -67,7 +67,9 @@ install: all ls em2_???? | sed 's:em2_\(.*\):cp & $b24/em_\1:' | sh ls em4_???? | sed 's:em4_\(.*\):cp & $b44/em_\1:' | sh cp em $(TARGET_HOME)/bin/em - cp em.1 $(TARGET_HOME)/man/em.1 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp em.1 $(TARGET_HOME)/man/em.1 ; \ + fi cmp: all -ls em2_???? | sed 's:em2_\(.*\):cmp & $b24/em_\1:' | sh diff --git a/mach/pdp/int/proto.make b/mach/pdp/int/proto.make index d92f39112..11a1d35f4 100644 --- a/mach/pdp/int/proto.make +++ b/mach/pdp/int/proto.make @@ -40,7 +40,9 @@ install: all -mkdir $b cp em_???? $b cp em eminform $(TARGET_HOME)/bin - cp $(SRC_DIR)/em.1 $(SRC_DIR)/eminform.1 $(TARGET_HOME)/man + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/em.1 $(SRC_DIR)/eminform.1 $(TARGET_HOME)/man ; \ + fi cmp: all -cmp em_t--- $b/em_t--- diff --git a/util/LLgen/proto.make b/util/LLgen/proto.make index 38a39be05..1ae13b278 100644 --- a/util/LLgen/proto.make +++ b/util/LLgen/proto.make @@ -14,20 +14,22 @@ clean: install: cd src; make - rm -f $(INSTALLDIR)/LLgen $(LIBDIR)/rec $(LIBDIR)/incl $(MANDIR)/LLgen.1 cp src/LLgen $(INSTALLDIR)/LLgen - cp $(SRC_HOME)/util/LLgen/lib/rec $(LIBDIR)/rec - cp $(SRC_HOME)/util/LLgen/lib/incl $(LIBDIR)/incl - cp $(SRC_HOME)/util/LLgen/LLgen.1 $(MANDIR)/LLgen.1 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_HOME)/util/LLgen/lib/rec $(LIBDIR)/rec ; \ + cp $(SRC_HOME)/util/LLgen/lib/incl $(LIBDIR)/incl ; \ + cp $(SRC_HOME)/util/LLgen/LLgen.1 $(MANDIR)/LLgen.1 ; \ + fi firstinstall: cd src; make first - rm -f $(INSTALLDIR)/LLgen $(LIBDIR)/rec $(LIBDIR)/incl $(MANDIR)/LLgen.1 cp src/LLgen $(INSTALLDIR)/LLgen - -mkdir $(LIBDIR) - cp $(SRC_HOME)/util/LLgen/lib/rec $(LIBDIR)/rec - cp $(SRC_HOME)/util/LLgen/lib/incl $(LIBDIR)/incl - cp $(SRC_HOME)/util/LLgen/LLgen.1 $(MANDIR)/LLgen.1 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then if [ -d $(LIBDIR) ] ; then : ; else mkdir $(LIBDIR) ; fi ; \ + cp $(SRC_HOME)/util/LLgen/lib/rec $(LIBDIR)/rec ; \ + cp $(SRC_HOME)/util/LLgen/lib/incl $(LIBDIR)/incl ; \ + cp $(SRC_HOME)/util/LLgen/LLgen.1 $(MANDIR)/LLgen.1 ; \ + fi cmp: cd src; make