Follow-up Comment #2, bug #27609 (project make): If I have two different yacc files that generate different parsers in the same directory, then I'm going to be aware of that situation and resolve it. If I don't resolve it, then they will both clobber y.tab.c, which is my fault. I'm bitten by my own folly, and not by some hidden rule that destroys source code.
That the yacc program clobbers y.tab.c is not the result of some secret rule which only emerges when you've created an important file (not by means of yacc) and named it y.tab.c! Everyone knows that yacc makes a y.tab.c file. Not everyone knows that make will clobber your foo.c, because a foo.y exists. There are going to be other issues anyway. If I have two parsers that go into the same link, there will be clashes on all the YY stuff. It's not enough to just rename the files. If I don't like the name y.tab.c, I can easily write a rule like this: myparser.c: myparser.y $(YACC) $(YFLAGS) -o $@ $< If I want that to be an implicit rule for general .y -> .c conversion, I can do it like this: %.c: %.y $(YACC) $(YFLAGS) -o $@ $< Now I have a rule which clobbers .c files. I wrote it; it's spelled out in my Makefile. If that overwrites a non-generated .c file, it serves me right! _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?27609> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make