From dd478032e68da051f59e5b1d4760cad16dca96c3 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 26 Aug 1991 16:21:27 +0000 Subject: [PATCH] New installation mechanism --- lang/cem/libcc.ansi/.distr | 4 +- lang/cem/libcc.ansi/proto.make | 10 ++++ modules/src/alloc/.distr | 2 +- modules/src/alloc/proto.make | 84 ++++++++++++++++++++++++++++++++++ modules/src/assert/.distr | 2 +- modules/src/assert/proto.make | 40 ++++++++++++++++ 6 files changed, 137 insertions(+), 5 deletions(-) create mode 100644 lang/cem/libcc.ansi/proto.make create mode 100644 modules/src/alloc/proto.make create mode 100644 modules/src/assert/proto.make diff --git a/lang/cem/libcc.ansi/.distr b/lang/cem/libcc.ansi/.distr index db8483e36..29afe426d 100644 --- a/lang/cem/libcc.ansi/.distr +++ b/lang/cem/libcc.ansi/.distr @@ -1,15 +1,13 @@ LIST -MakeArch -Makefile assert ctype errno head_ac.e headers locale -make.proto math misc +proto.make setjmp signal stdio diff --git a/lang/cem/libcc.ansi/proto.make b/lang/cem/libcc.ansi/proto.make new file mode 100644 index 000000000..2c6730269 --- /dev/null +++ b/lang/cem/libcc.ansi/proto.make @@ -0,0 +1,10 @@ +# $Header$ + +#PARAMS do not remove this line! + +all: + +install: + + -mkdir $(TARGET_HOME)/include/tail_ac + ( cd headers; tar cf - `cat LIST` ) | ( cd $(TARGET_HOME)/include/tail_ac ; tar xf - ) diff --git a/modules/src/alloc/.distr b/modules/src/alloc/.distr index 925c6c86f..e45a8e0cb 100644 --- a/modules/src/alloc/.distr +++ b/modules/src/alloc/.distr @@ -1,4 +1,4 @@ -Makefile +proto.make Malloc.c Srealloc.c Realloc.c diff --git a/modules/src/alloc/proto.make b/modules/src/alloc/proto.make new file mode 100644 index 000000000..282dc629f --- /dev/null +++ b/modules/src/alloc/proto.make @@ -0,0 +1,84 @@ +# $Header$ + +#PARAMS do not remove this line! + +SRC_DIR = $(SRC_HOME)/modules/src/alloc +MOD_DIR = $(TARGET_HOME)/modules +INCLUDES = -I$(SRC_DIR) -I$(MOD_DIR)/h +CFLAGS = $(INCLUDES) $(COPTIONS) + +CSRC = $(SRC_DIR)/Malloc.c\ + $(SRC_DIR)/Salloc.c\ + $(SRC_DIR)/Srealloc.c\ + $(SRC_DIR)/Realloc.c\ + $(SRC_DIR)/botch.c\ + $(SRC_DIR)/clear.c\ + $(SRC_DIR)/st_alloc.c\ + $(SRC_DIR)/std_alloc.c \ + $(SRC_DIR)/No_Mem.c +SOURCES = $(SRC_DIR)/alloc.h\ + $(CSRC) + +OBJECTS = botch.$(SUF) clear.$(SUF) st_alloc.$(SUF) Malloc.$(SUF) \ + Salloc.$(SUF) \ + Srealloc.$(SUF) Realloc.$(SUF) std_alloc.$(SUF) No_Mem.$(SUF) + + +LIBALLOC = liballoc.$(LIBSUF) + +all: $(LIBALLOC) + +$(LIBALLOC): $(OBJECTS) + rm -f $(LIBALLOC) + $(AR) r $(LIBALLOC) $(OBJECTS) + $(RANLIB) $(LIBALLOC) + +install: all lintlib + cp $(LIBALLOC) $(MOD_DIR)/lib/$(LIBALLOC) + $(RANLIB) $(MOD_DIR)/lib/$(LIBALLOC) + cp $(SRC_DIR)/alloc.3 $(MOD_DIR)/man/alloc.3 + cp $(SRC_DIR)/alloc.h $(MOD_DIR)/h/alloc.h + +cmp: all + -cmp $(LIBALLOC) $(MOD_DIR)/lib/$(LIBALLOC) + -cmp $(SRC_DIR)/alloc.3 $(MOD_DIR)/man/alloc.3 + -cmp $(SRC_DIR)/alloc.h $(MOD_DIR)/h/alloc.h + +pr: + @pr $(SRC_DIR)/proto.make $(SOURCES) + +opr: + make pr | opr + +clean: + rm -f *.$(SUF) *.$(LIBSUF) + +lintlib: + $(MK_LINT_LIB) alloc $(MOD_DIR)/lib $(INCLUDES) $(CSRC) + +st_alloc.$(SUF): $(SRC_DIR)/alloc.h $(SRC_DIR)/st_alloc.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/st_alloc.c + +std_alloc.$(SUF): $(SRC_DIR)/alloc.h $(SRC_DIR)/std_alloc.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/std_alloc.c + +Malloc.$(SUF): $(SRC_DIR)/alloc.h $(SRC_DIR)/Malloc.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/Malloc.c + +No_Mem.$(SUF): $(SRC_DIR)/No_Mem.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/No_Mem.c + +Realloc.$(SUF): $(SRC_DIR)/Realloc.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/Realloc.c + +Salloc.$(SUF): $(SRC_DIR)/Salloc.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/Salloc.c + +Srealloc.$(SUF): $(SRC_DIR)/Srealloc.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/Srealloc.c + +botch.$(SUF): $(SRC_DIR)/botch.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/botch.c + +clear.$(SUF): $(SRC_DIR)/clear.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/clear.c diff --git a/modules/src/assert/.distr b/modules/src/assert/.distr index bc39285d7..0403dc32f 100644 --- a/modules/src/assert/.distr +++ b/modules/src/assert/.distr @@ -1,4 +1,4 @@ BadAssert.c -Makefile +proto.make assert.3 assert.h diff --git a/modules/src/assert/proto.make b/modules/src/assert/proto.make new file mode 100644 index 000000000..cdfb24fc3 --- /dev/null +++ b/modules/src/assert/proto.make @@ -0,0 +1,40 @@ +# $Header$ + +#PARAMS do not remove this line! + +SRC_DIR = $(SRC_HOME)/modules/src/assert +MOD_DIR = $(TARGET_HOME)/modules +INCLUDES = -I$(SRC_DIR) -I$(MOD_DIR)/h +CFLAGS = $(COPTIONS) $(INCLUDES) + +all: libassert.$(LIBSUF) + +libassert.$(LIBSUF): BadAssert.$(SUF) + $(AR) r libassert.$(LIBSUF) BadAssert.$(SUF) + $(RANLIB) libassert.$(LIBSUF) + +install: all lintlib + cp libassert.$(LIBSUF) $(MOD_DIR)/lib/libassert.$(LIBSUF) + $(RANLIB) $(MOD_DIR)/lib/libassert.$(LIBSUF) + cp $(SRC_DIR)/assert.3 $(MOD_DIR)/man/assert.3 + cp $(SRC_DIR)/assert.h $(MOD_DIR)/h/assert.h + +cmp: all + -cmp libassert.$(LIBSUF) $(MOD_DIR)/lib/libassert.$(LIBSUF) + -cmp $(SRC_DIR)/assert.3 $(MOD_DIR)/man/assert.3 + -cmp $(SRC_DIR)/assert.h $(MOD_DIR)/h/assert.h + +pr: + @pr $(SRC_DIR)/proto.make $(SRC_DIR)/assert.h $(SRC_DIR)/BadAssert.c + +opr: + make pr | opr + +clean: + rm -f *.$(LIBSUF) *.$(SUF) + +lintlib: + $(MK_LINT_LIB) assert $(MOD_DIR)/lib $(INCLUDES) BadAssert.c + +BadAssert.$(SUF): $(SRC_DIR)/BadAssert.c + $(CC) -c $(CFLAGS) $(SRC_DIR)/BadAssert.c