From 33ec8e07ed3c738018d7b80eb6da57d124b7500b Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 14 Oct 1991 09:38:04 +0000 Subject: [PATCH] improved installation mechanism --- util/amisc/proto.make | 4 +++- util/ass/proto.make | 6 +++--- util/byacc/proto.make | 4 +++- util/cmisc/proto.make | 4 +++- util/cpp/proto.make | 6 +++--- util/flex/proto.make | 10 ++++++---- util/grind/proto.make | 4 +++- util/int/proto.make | 4 +++- util/led/proto.make | 7 ++++--- util/misc/proto.make | 7 ++++--- util/ncgg/proto.make | 6 +++--- util/opt/proto.make | 7 +++---- 12 files changed, 41 insertions(+), 28 deletions(-) diff --git a/util/amisc/proto.make b/util/amisc/proto.make index 7ac19b586..0046ba0b1 100644 --- a/util/amisc/proto.make +++ b/util/amisc/proto.make @@ -28,7 +28,9 @@ ashow: $(SRC_DIR)/ashow.c install: all for i in $(ALL); do rm -f $(BINDIR)/$$i; cp $$i $(BINDIR)/$$i; done - for i in anm.1 asize.1 astrip.1; do rm -f $(MANDIR)/$$i; cp $(SRC_DIR)/$$i $(MANDIR)/$$i; done + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then for i in anm.1 asize.1 astrip.1; do rm -f $(MANDIR)/$$i; cp $(SRC_DIR)/$$i $(MANDIR)/$$i; done ; \ + fi cmp: all -for i in $(ALL); do cmp $$i $(BINDIR)/$$i; done diff --git a/util/ass/proto.make b/util/ass/proto.make index 24166864c..4cababc62 100644 --- a/util/ass/proto.make +++ b/util/ass/proto.make @@ -24,10 +24,10 @@ clean: -rm -f ass *.$(SUF) maktab *.old asstb.c install : all - rm -f $(TARGET_HOME)/lib.bin/em_ass cp ass $(TARGET_HOME)/lib.bin/em_ass - rm -f $(TARGET_HOME)/man/em_ass.6 - cp $(SRC_DIR)/em_ass.6 $(TARGET_HOME)/man/em_ass.6 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/em_ass.6 $(TARGET_HOME)/man/em_ass.6 ; \ + fi cmp : all -cmp ass $(TARGET_HOME)/lib.bin/em_ass diff --git a/util/byacc/proto.make b/util/byacc/proto.make index 52deca649..8a02982f5 100644 --- a/util/byacc/proto.make +++ b/util/byacc/proto.make @@ -51,7 +51,9 @@ clean: install: $(PROGRAM) cp $(PROGRAM) $(DEST)/$(PROGRAM) - cp $(SRC_DIR)/manpage $(MAN)/yacc.1 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/manpage $(MAN)/yacc.1 ; \ + fi cmp: $(PROGRAM) -cmp $(PROGRAM) $(DEST)/$(PROGRAM) diff --git a/util/cmisc/proto.make b/util/cmisc/proto.make index bbfdf968b..7058f0cbe 100644 --- a/util/cmisc/proto.make +++ b/util/cmisc/proto.make @@ -13,7 +13,9 @@ all: cid cclash prid tabgen install: all cp cid cclash prid tabgen $(TARGET_BIN) - cp $(SRC_DIR)/cid.1 $(SRC_DIR)/cclash.1 $(SRC_DIR)/prid.1 $(SRC_DIR)/tabgen.1 $(TARGET_MAN) + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/cid.1 $(SRC_DIR)/cclash.1 $(SRC_DIR)/prid.1 $(SRC_DIR)/tabgen.1 $(TARGET_MAN) ; \ + fi cmp: all -cmp cid $(TARGET_BIN)/cid diff --git a/util/cpp/proto.make b/util/cpp/proto.make index 1be32655b..052ad644f 100644 --- a/util/cpp/proto.make +++ b/util/cpp/proto.make @@ -112,10 +112,10 @@ cfiles: hfiles LLfiles $(GSRC) @touch cfiles install: all - rm -f $(CEMPP) cp cpp $(CEMPP) - rm -f $(MANDIR)/cpp.6 - cp $(SRC_DIR)/cpp.6 $(MANDIR)/cpp.6 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/cpp.6 $(MANDIR)/cpp.6 ; \ + fi cmp: all -cmp cpp $(CEMPP) diff --git a/util/flex/proto.make b/util/flex/proto.make index 05f6cd832..0bd3afe3a 100644 --- a/util/flex/proto.make +++ b/util/flex/proto.make @@ -144,10 +144,12 @@ lint : $(FLEX_C_SOURCES) install: first_flex $(SRC_DIR)/flex.skel rm -f $(BINDIR)/flex cp flex $(BINDIR)/flex - cp $(SRC_DIR)/flex.skel $(AUXDIR)/flex.skel - cp $(SRC_DIR)/flex.1 $(MANDIR)/flex.1 - cp $(SRC_DIR)/flexdoc.1 $(MANDIR)/flexdoc.1 - + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/flex.skel $(AUXDIR)/flex.skel ; \ + cp $(SRC_DIR)/flex.1 $(MANDIR)/flex.1 ; \ + cp $(SRC_DIR)/flexdoc.1 $(MANDIR)/flexdoc.1 ; \ + fi + clean : rm -f core errs flex *.$(SUF) parse.c *.lint parse.h tags diff --git a/util/grind/proto.make b/util/grind/proto.make index 501478b6d..9291baee5 100644 --- a/util/grind/proto.make +++ b/util/grind/proto.make @@ -68,7 +68,9 @@ all: make.main install: all cp grind $(TARGET_HOME)/bin/grind - cp $(SRC_DIR)/grind.1 $(TARGET_HOME)/man/grind.1 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/grind.1 $(TARGET_HOME)/man/grind.1 ; \ + fi cmp: all -cmp grind $(TARGET_HOME)/bin/grind diff --git a/util/int/proto.make b/util/int/proto.make index 39bc0fd6b..b00ef6a8b 100644 --- a/util/int/proto.make +++ b/util/int/proto.make @@ -91,7 +91,9 @@ all: test install: $(INT) cp $(INT) $(TARGET_HOME)/bin/int - cp $(SRC_DIR)/int.1 $(TARGET_HOME)/man/int.1 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/int.1 $(TARGET_HOME)/man/int.1 ; \ + fi cmp: $(INT) -cmp $(INT) $(TARGET_HOME)/bin/int diff --git a/util/led/proto.make b/util/led/proto.make index 66e72f171..3937ccf10 100644 --- a/util/led/proto.make +++ b/util/led/proto.make @@ -50,10 +50,11 @@ led: $(OFILES) $(CC) $(LDFLAGS) $(OFILES) $(LDLIBS) -o led install:led - rm -f $(LIBDIR)/em_led $(TARGET_HOME)/man/led.6 $(TARGET_HOME)/man/ack.out.5 cp led $(LIBDIR)/em_led - cp $(SRC_DIR)/led.6 $(TARGET_HOME)/man/led.6 - cp $(SRC_DIR)/ack.out.5 $(TARGET_HOME)/man/ack.out.5 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/led.6 $(TARGET_HOME)/man/led.6 ; \ + cp $(SRC_DIR)/ack.out.5 $(TARGET_HOME)/man/ack.out.5 ; \ + fi cmp: led -cmp led $(LIBDIR)/em_led diff --git a/util/misc/proto.make b/util/misc/proto.make index 449686693..bd2dd4b7d 100644 --- a/util/misc/proto.make +++ b/util/misc/proto.make @@ -61,12 +61,13 @@ clean: rm -f $(DEC_PATH) $(ENC_PATH) esize *.$(SUF) *.old install : all - rm -f $l/em_$(DEC_PATH) $l/em_$(ENC_PATH) $(TARGET_HOME)/bin/esize $(TARGET_HOME)/man/em_decode.6 $(TARGET_HOME)/man/esize.1 cp $(DEC_PATH) $l/em_$(DEC_PATH) cp $(ENC_PATH) $l/em_$(ENC_PATH) cp esize $(TARGET_HOME)/bin/esize - cp $(SRC_DIR)/em_decode.6 $(TARGET_HOME)/man/em_decode.6 - cp $(SRC_DIR)/esize.1 $(TARGET_HOME)/man/esize.1 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/em_decode.6 $(TARGET_HOME)/man/em_decode.6 ; \ + cp $(SRC_DIR)/esize.1 $(TARGET_HOME)/man/esize.1 ; \ + fi cmp : all -cmp $(DEC_PATH) $l/em_$(DEC_PATH) diff --git a/util/ncgg/proto.make b/util/ncgg/proto.make index dc6467fe7..aabc88130 100644 --- a/util/ncgg/proto.make +++ b/util/ncgg/proto.make @@ -32,10 +32,10 @@ cgg: cgg.$(SUF) $(OFILES) output.$(SUF) $(CC) $(LDFLAGS) $(OFILES) output.$(SUF) $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF) -o cgg install: cgg - rm -f $(TARGET_HOME)/lib.bin/ncgg cp cgg $(TARGET_HOME)/lib.bin/ncgg - rm -f $(MANDIR)/ncgg.6 - cp $(SRC_DIR)/ncgg.6 $(MANDIR)/ncgg.6 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/ncgg.6 $(MANDIR)/ncgg.6 ; \ + fi cmp: cgg -cmp cgg $(TARGET_HOME)/lib.bin/ncgg diff --git a/util/opt/proto.make b/util/opt/proto.make index ab4d70476..70cb301a1 100644 --- a/util/opt/proto.make +++ b/util/opt/proto.make @@ -43,12 +43,11 @@ cmp: all -cmp $(SRC_DIR)/em_opt.6 $(TARGET_HOME)/man/em_opt.6 install:all - rm -f $(TARGET_HOME)/lib.bin/em_opt cp opt $(TARGET_HOME)/lib.bin/em_opt - rm -f $(TARGET_HOME)/lib.bin/em_opt2 cp opt2 $(TARGET_HOME)/lib.bin/em_opt2 - rm -f $(TARGET_HOME)/man/em_opt.6 - cp $(SRC_DIR)/em_opt.6 $(TARGET_HOME)/man/em_opt.6 + if [ $(DO_MACHINE_INDEP) = y ] ; \ + then cp $(SRC_DIR)/em_opt.6 $(TARGET_HOME)/man/em_opt.6 ; \ + fi pattern.c: $(SRC_DIR)/patterns mktab $(CPP) $(SRC_DIR)/patterns | mktab > pattern.c