# Generate.make ?
-# -> Rules.make: containing all compile/flex/bison/... rules (jcn)
parsheadorig=$(CCDIR)/parser.tab.h
parsheadnew=$(HEADERDIR)/parser.hh
#
-# take some trouble to avoid overwriting the old y.tab.h
-# why? (jcn)
+# take some trouble to avoid overwriting the old y.tab.h,
+# because otherwise all dependants would be remade.
$(CCDIR)/parser.cc: $(CCDIR)/parser.y
$(BISON) -d $<
+ mv $(CCDIR)/parser.tab.c $@
(if diff $(parsheadorig) $(parsheadnew)>/dev/null; then \
echo Ignoring $(parsheadorig); \
else \
mv $(parsheadorig) $(parsheadnew); \
fi )
- mv $(CCDIR)/parser.tab.c $@
$(parsheadnew): $(CCDIR)/parser.cc
.PHONY: clean docxx
clean:
- rm -f $(allexe) $(DOCDIR)/* core $(allobs) $(ALLDEPS)
+ rm -f $(allexe) $(DOCDIR)/* core $(allobs)
for SUBDIR in $(SUBDIRS); \
do \
$(MAKE) SUBDIR=$$SUBDIR -C $$SUBDIR clean;\
done
distclean: clean
- rm -f version.hh $(gencc) .GENERATE *~ $(ALLDEPS)
+ rm -f version.hh $(gencc) .GENERATE *~ $(ALLDEPS)
all: $(exe) $(m2m) doc
-# value of $(OSTYPE) on windhoos; "make $OSTYPE" if u use bash :-)
+# value of $(OSTYPE) on windhoos; "make $OSTYPE" if you use bash :-)
win32:
$(MAKE) -C . CXX=g++
docxx: $(progdocs)
doc++ -kp -d $(DOCDIR) $^
+
+include $(DEPDIR)/*.dep
+
$(OBJECTDIR)/%.o: $(CCDIR)/%.cc
$(DODEP)\
$(CXX) -c $(CXXFLAGS) $(OUTPUT_OPTION)
-
-include $(DEPDIR)/*.dep
-
$(OBJECTDIR)/version.o: $(obs) $(HEADERDIR)/version.hh
include Generate.make