diff options
Diffstat (limited to 'src/usr/errl/parser/makefile')
| -rw-r--r-- | src/usr/errl/parser/makefile | 67 |
1 files changed, 38 insertions, 29 deletions
diff --git a/src/usr/errl/parser/makefile b/src/usr/errl/parser/makefile index c030b646c..dd9f132bf 100644 --- a/src/usr/errl/parser/makefile +++ b/src/usr/errl/parser/makefile @@ -21,41 +21,50 @@ # # IBM_PROLOG_END -# makefile for errlparser, -# a 32-bit x86 linux binary suitable for running on GFW pool machines. +# makefile for errlparser a 32-bit x86 linux binary +# to extract the PEL of an error log and +# put it in a temporary file so that the +# FipS errl tool can format and display it. +# "Pretty printing" of those error logs is the +# function of FipS 'errl' and its plugins, not this program. +# +# This makefile runs 'scanforsrc.pl' which generates +# hostBootSrcParse.H, a file that hostboot plugins will include. + + ROOTPATH=../../../.. -include ${ROOTPATH}/src/usr/parser.mk +GENDIR = ${ROOTPATH}/obj/genfiles +IMGDIR = ${ROOTPATH}/img +OBJDIR = ${ROOTPATH}/obj/modules/errl/parser -OBJFILES = errlparserbase.o errlusrparser.o SRCPARSE_HEADER_TARGET = \ ${GENDIR}/hostBootSrcParse.H + CC=i686-mcp6-g++ -m32 -CFLAGS:=-g -O0 -I $(ROOTPATH)/src/include/usr -D PARSER +CFLAGS:=-g -O0 -I $(ROOTPATH)/src/include/usr -I ${GENDIR} all: gen_pass code_pass -gen_pass: +gen_pass: mkdirs ${SRCPARSE_HEADER_TARGET} ${GENDIR}/comps.C -code_pass: makeobjdir ${IMGDIR}/errlparser ${SRCPARSE_HEADER_TARGET} +code_pass: ${IMGDIR}/errlparser -## errlparserbase and errlusrparser -%.o : %.C - $(CC) -c $(CFLAGS) -o $@ $< +# errlparserbase and errlusrparser are plugins stuff, not errlparser. +# OBJFILES = ${OBJDIR}/errlparserbase.o ${OBJDIR}/errlusrparser.o +# %.o : %.C +# $(CC) -c $(CFLAGS) -o $@ $< -clean: - rm -fr ${SRCPARSE_HEADER_TARGET} - rm -fr ${OBJDIR}/errlparser.o - rm -fr ${GENDIR}/errlparser - rm -fr ${GENDIR}/comps.C - rm -fr ${OBJDIR}/*.o - rm -fr *.o - -makeobjdir: +mkdirs: mkdir -p ${OBJDIR} + mkdir -p ${GENDIR} + +# Parse for error log tags in the Hostboot code, and generate hostBootSrcParse.H +${SRCPARSE_HEADER_TARGET} : + ./scanforsrcs.pl -b ${ROOTPATH} -o ${GENDIR} ${GENDIR}/comps.C: ${ROOTPATH}/src/include/usr/hbotcompid.H grep "const compId_t [A-Z0-9]*_COMP_ID" $^ | \ @@ -63,23 +72,23 @@ ${GENDIR}/comps.C: ${ROOTPATH}/src/include/usr/hbotcompid.H sed 's/const compId_t \([A-Z0-9]*\)_COMP_ID[ =\t]*\(0[xX][0-9a-fA-F]*\).*/{ "\1", \2 },/' \ > $@ -${OBJDIR}/errlparser.o: errlparser.C ${ROOTPATH}/src/include/usr/errl/errltypes.H ${GENDIR}/comps.C ${SRCPARSE_HEADER_TARGET} - $(CC) -c $(CFLAGS) -I${ROOTPATH}/obj/genfiles -o $@ $< +${OBJDIR}/errlparser.o: errlparser.C ${ROOTPATH}/src/include/usr/errl/hberrltypes.H ${GENDIR}/comps.C + $(CC) -c $(CFLAGS) -o $@ $< -${IMGDIR}/errlparser: ${OBJDIR}/errlparser.o ${OBJFILES} ${UD_FILES} - $(CC) -o $@ $? - -## TODO add link step to link in UD_FILES +${IMGDIR}/errlparser: ${OBJDIR}/errlparser.o + $(CC) -o $@ $< -${SRCPARSE_HEADER_TARGET} : - ./scanforsrcs.pl -b ${ROOTPATH} -o ${GENDIR} +clean: + rm -f ${SRCPARSE_HEADER_TARGET} + rm -f ${GENDIR}/comps.C + rm -f ${IMGDIR}/errlparser + rm -fr ${OBJDIR} debug: ls -l ${GENDIR} ls -l ${OBJDIR} ls -l ${IMGDIR} - ls -l ${UD_DIR} beam: - # dummy
\ No newline at end of file + # dummy |

