Remove the old make-based build system, plus some big chunks of horribly

obsolete protomake build system.
This commit is contained in:
David Given
2016-09-02 22:17:51 +02:00
parent 96e7447bfa
commit 612e38f1c6
113 changed files with 0 additions and 9001 deletions

View File

@@ -1,50 +0,0 @@
D := util/topgen
# Rule to build topgen.
define build-topgen-impl
$(call reset)
$(eval cflags += -I$(OBJDIR)/$D -I$D)
$(call cfile, $D/LLlex.c)
$(call cfile, $D/hash.c)
$(call cfile, $D/main.c)
$(call cfile, $D/pattern.c)
$(call cfile, $D/symtab.c)
$(eval $q: $(OBJDIR)/$D/Lpars.h)
$(call llgen, $(OBJDIR)/$D, $D/topgen.g)
$(call rawfile, $(LIBASSERT))
$(call rawfile, $(LIBPRINT))
$(call rawfile, $(LIBALLOC))
$(call rawfile, $(LIBSYSTEM))
$(call rawfile, $(LIBSTRING))
$(call cprogram, $(BINDIR)/topgen)
TOPGEN := $o
endef
$(eval $(build-topgen-impl))
# Rule to invoke to *use* LLgen.
#
# $1: directory to put output files
# $2: input files
#
# Output files are *not* compiled (gen.c is expected to be included by
# something).
define topgen-impl
$(eval CLEANABLES += $1/gen.h $1/gen.c)
$1/gen.h: $1/gen.c
$1/gen.c: $2 $(TOPGEN)
@echo TOPGEN $$@
@mkdir -p $$(dir $$@)
$(hide) $(RM) $1/gen.h $1/gen.c
$(hide) cd $$(dir $$@) && $(abspath $(TOPGEN)) $(abspath $2)
endef
topgen = $(eval $(call topgen-impl,$1,$2))

View File

@@ -1,60 +0,0 @@
# $Id$
#PARAMS do not remove this line!
SRC_DIR = $(SRC_HOME)/util/topgen
INCLUDES = -I$(SRC_DIR) -I.
CFLAGS = $(COPTIONS) $(INCLUDES)
LDFLAGS = $(LDOPTIONS)
LINTFLAGS = $(LINTOPTIONS) $(INCLUDES)
SOURCE = $(SRC_DIR)/token.h $(SRC_DIR)/symtab.h $(SRC_DIR)/misc.h \
$(SRC_DIR)/tunable.h $(SRC_DIR)/main.c $(SRC_DIR)/topgen.g \
$(SRC_DIR)/LLlex.c $(SRC_DIR)/symtab.c $(SRC_DIR)/pattern.c \
$(SRC_DIR)/hash.c
CFILES = $(SRC_DIR)/main.c topgen.c Lpars.c $(SRC_DIR)/LLlex.c \
$(SRC_DIR)/symtab.c $(SRC_DIR)/pattern.c $(SRC_DIR)/hash.c
OFILES = main.$(SUF) topgen.$(SUF) Lpars.$(SUF) LLlex.$(SUF) \
symtab.$(SUF) pattern.$(SUF) hash.$(SUF)
all: parser
@make topgen
cmp: all
cmp topgen $(TARGET_HOME)/lib.bin/topgen
install: all
cp topgen $(TARGET_HOME)/lib.bin/topgen
clean:
rm -f topgen *.$(SUF) Lpars.c Lpars.h topgen.c parser
parser: $(SRC_DIR)/topgen.g
$(UTIL_HOME)/bin/LLgen $(SRC_DIR)/topgen.g
touch parser
topgen.$(SUF): $(SRC_DIR)/token.h Lpars.h $(SRC_DIR)/symtab.h $(SRC_DIR)/misc.h topgen.c
$(CC) -c $(CFLAGS) topgen.c
Lpars.$(SUF): Lpars.h Lpars.c
$(CC) -c $(CFLAGS) Lpars.c
LLlex.$(SUF): $(SRC_DIR)/token.h Lpars.h $(SRC_DIR)/tunable.h $(SRC_DIR)/LLlex.c
$(CC) -c $(CFLAGS) $(SRC_DIR)/LLlex.c
symtab.$(SUF): $(SRC_DIR)/symtab.h $(SRC_DIR)/symtab.c
$(CC) -c $(CFLAGS) $(SRC_DIR)/symtab.c
hash.$(SUF): $(SRC_DIR)/misc.h $(SRC_DIR)/hash.c
$(CC) -c $(CFLAGS) $(SRC_DIR)/hash.c
pattern.$(SUF): $(SRC_DIR)/misc.h $(SRC_DIR)/symtab.h $(SRC_DIR)/pattern.c
$(CC) -c $(CFLAGS) $(SRC_DIR)/pattern.c
main.$(SUF): $(SRC_DIR)/main.c
$(CC) -c $(CFLAGS) $(SRC_DIR)/main.c
topgen: $(OFILES)
$(CC) $(LDFLAGS) $(OFILES) -o topgen
lint: parser
$(LINT) $(LINTFLAGS) $(CFILES)
pr:
@pr $(SOURCE) $(SRC_DIR)/proto.make
opr:
make pr ^ opr