LOGvsNLOGImakefile.dif: From bdemakelinuxstatus050810.1515.txt: Imakefiles work with -DLOG but not without it. =--------------------------------- mercury.cs.uml.edu(397)> diff $PRLOG/Imakefile $PRNLOG/Imakefile|wc diff $PRLOG/Imakefile $PRNLOG/Imakefile | wc 93 391 2880 mercury.cs.uml.edu(398)> diff $PRLOG/Imakefile $PRNLOG/Imakefile >LOGvsNLOGImakefile.dif ------------------------------- 7c7 < * This Imakefile is for bde/pr_util_log. - RJL050805 --- > * This Imakefile is for bde/pr_util_nolog. - RJL050805 8a9 > /* See -r 1.16 of bde/pr_util/Imakefile for earlier revs. 41a43,44 > /* configure.h #defines GENVxx, GENLOG, and ... */ > /* PRDIR BINDIR PROBJDIR are defined in bde/Imakefile */ 47,48d49 < SCHEMASRCS = $(TOP)/schema/94sbde_schema.sch < 56,57d56 < #undef GENLOG < #undef BDELOG 65,66c64 < /* Defined in bde/Imakefile: PROBJDIR, PRDIR */ < --- > SCHEMASRCS = $(TOP)/schema/94sbde_schema.sch 67a66 > 68a68 > 71a72 > 95,97c96,97 < #endif < < #ifndef GENLOG --- > #else > /* omit pr_log.c */ 121c121,147 < CP = cp -p --- > > /* Below, '$(PRDIR)/$(*).c' selects current source file */ > /* In $(*).c, parens are ESSENTIAL! -RJL050806 */ > /* src/Imakefile Ptrn rules: $(OBJDIR)%.o : $(SRCDIR)%.cc */ > /* $PR[N]LOG/Imakefile : $(PROBJDIR)%.o : $(PRDIR)%.c */ > /*$(GENOBJS):$(GENSRCS) @@\ > $(CC) -g -c -Wall $(GENDEFINES) $< -o $(@) @@\ > [$(<) -o $(@)] works on mercury, not on saturn!-RJL050807] > */ > /* empty rule to cancel default rule: */ > > /* (*) does not include .c in CC command */ > /* Pattern rule for gnu make only: don't forget '/': */ > /* Didn't work on mercury: > $(CC)...$(PRDIR)/%.c -o $(PROBJDIR)/%.o @@\ > $(PRDIR)/%.c not found > $(CC) ... $(<).c -o $(@) > ($(PROBJDIR)/%.c not found - wrong dir'y) > $(CC) -g -c -Wall $( (infile was '.c') > $(CC) -g -c -Wall $(<) -o $(@) > (infile was $(PROBJDIR)/_*.c) > ----------------------------------------------- > chgen/src/Makefiles use either $< or $*.c on Linux only: > $(CC) -c $(CFLAGS) -DGENPR $(SRCDIR)/$< -o $@ > ${CC} -c $(CFLAGS) -DGENPR $(SRCDIR)/$*.c -o $@ > */ 124,125d149 < /*XCOMM echo "linuxArchitecture is #defined."*/ < #endif 127,130c151,152 < $(GENOBJS):$(GENSRCS) @@\ < $(CP) $(PRDIR)/*.h $(PRDIR)/$HOSTTYPE @@\ < $(CP) $(PRDIR)/$(*) $(PROBJDIR) @@\ < $(CC) -g -c -Wall $(GENDEFINES) $(PRDIR)/$(*).c -o $(@) @@\ --- > $(PROBJDIR)/%.o : %.c @@\ > ${CC} -c -g -Wall $*.c -o $@ @@\ 144c166 < #endif --- > #else 146,147d167 < #ifndef linuxArchitecture < /*XCOMM echo "linuxArchitecture is NOT #defined."*/ 149,152c169,170 < $(GENOBJS):$(GENSRCS) @@\ < $(CP) $(PRDIR)/*.h $(PRDIR)/$HOSTTYPE @@\ < $(CP) $(PRDIR)/$(*) $(PROBJDIR) @@\ < $(CC) -g -c -Wall $(GENDEFINES) $(PROBJDIR)/$(*) -o $(@) @@\ --- > $(PROBJDIR)/%.o : %.c @@\ > ${CC} -c -g -Wall $*.c -o $@ @@\ 166a185 > 167a187 >