From: fred Date: Sun, 19 Jan 1997 23:33:56 +0000 (+0000) Subject: lilypond-0.0.23 X-Git-Tag: release/1.5.59~6393 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e211eece021e5a2dd377a8236a72fcfe2c52186d;p=lilypond.git lilypond-0.0.23 --- diff --git a/Generate.make b/Generate.make new file mode 100644 index 0000000000..08d53ba78c --- /dev/null +++ b/Generate.make @@ -0,0 +1,26 @@ + +parsheadorig=$(CCDIR)/parser.tab.h +parsheadnew=$(HEADERDIR)/parser.hh + +# +# take some trouble to avoid overwriting the old y.tab.h +$(CCDIR)/parser.cc: $(CCDIR)/parser.y + $(BISON) -d $< + (if diff $(parsheadorig) $(parsheadnew)>/dev/null; then \ + echo leaving $(parsheadnew); \ + else \ + mv $(parsheadorig) $(parsheadnew); \ + fi ) + mv $(CCDIR)/parser.tab.c $@ + +$(parsheadnew): $(CCDIR)/parser.cc + +$(HEADERDIR)/version.hh: Variables.make make_version + make_version $(MAJVER) $(MINVER) $(PATCHLEVEL) "$(CXX) $(CXXVER)" > $@ + +$(CCDIR)/lexer.cc: $(CCDIR)/lexer.l + $(FLEX) -t $< > $@ + + + + diff --git a/Makefile b/Makefile index 5044425dcd..584d0dc60c 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,19 @@ include Variables.make .SUFFIXES: -.SUFFIXES: .cc .o .hh .y .l .pod .txt .1 +.SUFFIXES: .cc .o .hh .y .l .pod .txt .1 .dep $(exe): $(obs) $(CXX) -o $@ $^ $(LOADLIBES) +depend: ; # automatically by gnu make. clean: -# $(MAKE) -C objects clean rm -f $(exe) objects/*.o $(DOCDIR)/* core $(MAKE) -C $(CCDIR) clean $(MAKE) -C $(HEADERDIR) clean distclean: clean - rm -f depend version.hh $(gencc) .GENERATE *~ + rm -f version.hh $(gencc) .GENERATE *~ deps/*.dep all: kompijl doc @@ -25,62 +25,32 @@ docpp: $(progdocs) -mkdir $(DOCDIR) doc++ -p -I -d $(DOCDIR) $^ -depend: Sources.make .GENERATE - touch depend - $(MAKE) realdepend +%.o: $(CCDIR)/%.cc + $(DODEP)\ + $(CXX) -c $(CXXFLAGS) $^ -o $(OBJECTDIR)/$@ $(OBJECTDIR)/%.o: $(CCDIR)/%.cc - $(CXX) -c $(CXXFLAGS) $(OUTPUT_OPTION) + $(DODEP)\ + $(CXX) -c $(CXXFLAGS) $(OUTPUT_OPTION) -# hack to create these sources once, before the dependencies -.GENERATE: - touch .GENERATE depend - $(MAKE) version.hh - $(MAKE) $(gencc) - rm -f depend -realdepend: $(cc) - $(CXX) $(CXXFLAGS) -MM $^ | perl -ne 's#hdr/proto.hh##; s/^(.+)\.o/'$(OBJECTDIR)'\/\1.o/; print;' > depend - -include depend - -parsheadorig=$(CCDIR)/parser.tab.h -parsheadnew=$(HEADERDIR)/parser.hh - -# -# take some trouble to avoid overwriting the old y.tab.h -$(CCDIR)/parser.cc: parser.y - $(BISON) -d $< - (if diff -q $(parsheadorig) $(parsheadnew); then \ - echo leaving $(parsheadnew); \ - else \ - mv $(parsheadorig) $(parsheadnew); \ - fi ) - mv $(CCDIR)/parser.tab.c $@ - -$(parsheadnew): $(CCDIR)/parser.cc +include $(DEPDIR)/*.dep version.o: $(obs) version.hh -hdr/version.hh: Variables.make make_version - make_version $(MAJVER) $(MINVER) $(PATCHLEVEL) "$(CXX) $(CXXVER)" > $@ - -$(CCDIR)/lexer.cc: lexer.l - $(FLEX) -t $< > $@ +include Generate.make dist: -mkdir $(DDIR) ln $(DFILES) $(DDIR)/ - for a in $(SUBDIRS); \ - do mkdir $(DDIR)/$$a; \ - $(MAKE) -C $$a dist;\ + for SUBDIR in $(SUBDIRS); \ + do mkdir $(DDIR)/$$SUBDIR; \ + $(MAKE) SUBDIR=$$SUBDIR -C $$SUBDIR dist;\ done tar cfz $(DNAME).tar.gz $(DNAME)/ rm -rf $(DDIR)/ - - TAGS: $(MAKE) -C $(HEADERDIR) TAGS $(MAKE) -C $(CCDIR) TAGS