]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.23
authorfred <fred>
Sun, 19 Jan 1997 23:33:56 +0000 (23:33 +0000)
committerfred <fred>
Sun, 19 Jan 1997 23:33:56 +0000 (23:33 +0000)
Generate.make [new file with mode: 0644]
Makefile

diff --git a/Generate.make b/Generate.make
new file mode 100644 (file)
index 0000000..08d53ba
--- /dev/null
@@ -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 $< > $@
+
+
+
+
index 5044425dcdbb399e9853dc453b0fccdbb1c98264..584d0dc60c2db92312a496c58d73839824b9094a 100644 (file)
--- 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