diff options
Diffstat (limited to 'src/usr/errl/parser/makefile')
-rw-r--r-- | src/usr/errl/parser/makefile | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/usr/errl/parser/makefile b/src/usr/errl/parser/makefile index f0d8e180b..2a5b44417 100644 --- a/src/usr/errl/parser/makefile +++ b/src/usr/errl/parser/makefile @@ -13,23 +13,25 @@ all: code_pass gen_pass: -code_pass: bindir $(BIN)/errlparser +code_pass: $(BIN)/errlparser clean: rm -fr $(BIN) beam: -bindir: - mkdir -p $(BIN) +$(BIN)/comps.C: $(ROOTPATH)/src/include/usr/hbotcompid.H + mkdir -p $(BIN) + grep "const compId_t [A-Z0-9]*_COMP_ID" $^ | \ + grep -v MY_COMP_ID | \ + sed 's/const compId_t \([A-Z0-9]*\)_COMP_ID[ =\t]*\(0[xX][0-0a-fA-F]*\).*/{ "\1", \2 },/' \ + > $@ -$(BIN)/comps.C: $(ROOTPATH)/src/include/usr/hbotcompid.H readcomps.rex - rexx readcomps.rex $(ROOTPATH)/src/include/usr/hbotcompid.H >$(BIN)/comps.C - -$(BIN)/errlparser.o: errlparser.C $(ROOTPATH)/src/include/usr/errl/errltypes.H $(BIN)/comps.C - $(CC) -c $(CFLAGS) -I bin -o $(BIN)/errlparser.o errlparser.C +$(BIN)/errlparser.o: errlparser.C $(ROOTPATH)/src/include/usr/errl/errltypes.H $(BIN)/comps.C + mkdir -p $(BIN) + $(CC) -c $(CFLAGS) -I bin -o $@ $< $(BIN)/errlparser: $(BIN)/errlparser.o - $(CC) -o $(BIN)/errlparser $(BIN)/errlparser.o + $(CC) -o $@ $< |