From: Todd C. Miller Date: Sun, 26 Aug 2007 21:10:33 +0000 (+0000) Subject: Remove *.lo for clean: X-Git-Tag: SUDO_1_7_0~402 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e90c326744b0f0c64c496d3d5b2675f720200c9a;p=sudo Remove *.lo for clean: When generating the parser, only move the generated files into place if they differ from the existing ones. --- diff --git a/Makefile.in b/Makefile.in index b5e37da50..56b85d270 100644 --- a/Makefile.in +++ b/Makefile.in @@ -198,14 +198,14 @@ sudo_noexec.la: sudo_noexec.lo # Uncomment the $(YACC) and mv lines if you intend to modify gram.y $(devdir)/gram.c $(devdir)/gram.h: $(srcdir)/gram.y @DEV@ $(YACC) -d $(srcdir)/gram.y -@DEV@ mv -f y.tab.c gram.c -@DEV@ mv -f y.tab.h gram.h +@DEV@ if `cmp -s y.tab.c gram.c`; then mv -f y.tab.c gram.c; else rm -f y.tab.c; fi +@DEV@ if `cmp -s y.tab.h gram.h`; then mv -f y.tab.h gram.h; else rm -f y.tab.h; fi -@true # Uncomment the $(LEX) and mv lines if you intend to modify toke.l $(devdir)/toke.c: $(srcdir)/toke.l @DEV@ $(LEX) $(srcdir)/toke.l -@DEV@ mv -f lex.yy.c toke.c +@DEV@ if `cmp -s lex.yy.c`; then mv -f lex.yy.c toke.c; else rm -f lex.yy.c; fi -@true # Uncomment the following if you intend to modify def_data.in @@ -415,7 +415,7 @@ check: @echo nothing to check clean: - -rm -f *.o $(PROGS) testsudoers core sudo.core visudo.core \ + -rm -f *.o *.lo $(PROGS) testsudoers core sudo.core visudo.core \ testsudoers.core mostlyclean: clean