]> git.donarmstrong.com Git - lilypond.git/blobdiff - Makefile
release: 0.0.15
[lilypond.git] / Makefile
index 9b1b762a3adb4e06b138d2a4bc21c0d634396223..219147706d905373374bd097e6cb383ee4a5df7d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,8 +4,8 @@ $(exe): $(obs)
        $(CXX) -o $@ $^ $(LOADLIBES)
 
 clean:
-       $(MAKE) -C objects clean
-       rm -f $(exe) *.o $(DOCDIR)/* core  
+#      $(MAKE) -C objects clean
+       rm -f $(exe) objects/*.o $(DOCDIR)/* core  
 
 distclean: clean
        rm -f  depend version.hh $(gencc) .GENERATE *~
@@ -37,9 +37,18 @@ realdepend: $(cc)
 
 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 $<
-       mv $(CCDIR)/parser.tab.h $(HEADERDIR)/parser.hh
+       (if diff -q $(parsheadorig) $(parsheadnew); then \
+               echo leaving $(parsheadnew);  \
+       else \
+               mv $(parsheadorig) $(parsheadnew); \
+       fi )
        mv $(CCDIR)/parser.tab.c $@
 
 parser.hh: parser.cc