]> granicus.if.org Git - sudo/commitdiff
Remove the dependency of gram .h on gram.y, the .c dependency is enough.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 30 Aug 2007 16:45:28 +0000 (16:45 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 30 Aug 2007 16:45:28 +0000 (16:45 +0000)
Only move y.tab.h to gram.h if it is different; avoids needless rebuilding.

Makefile.in

index 3bc2f677408cf9a6d0c796d3f02dff5290916bf3..78f062082ec29d91022ef0c53bf93daa145fa697 100644 (file)
@@ -196,10 +196,10 @@ sudo_noexec.la: sudo_noexec.lo
 @DEV@GENERATED = gram.h gram.c toke.c def_data.c def_data.h
 
 # Uncomment the lines before -@true if you intend to modify gram.y
-$(devdir)/gram.c $(devdir)/gram.h: $(srcdir)/gram.y
+$(devdir)/gram.c: $(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 y.tab.h gram.h`; then mv -f y.tab.h gram.h; else rm -f y.tab.h; fi
        -@true
 
 # Uncomment the lines before -@true if you intend to modify toke.l