Fix cmp command when regenerating parser.

Make gram.o the first dependency for all programs so gram.h will
be generated before anything that needs it.
This commit is contained in:
Todd C. Miller
2007-08-31 21:21:01 +00:00
parent d56d0b1155
commit 07ebde4098

View File

@@ -119,18 +119,19 @@ HDRS = compat.h def_data.h defaults.h error.h ins_2001.h ins_classic.h \
AUTH_OBJS = sudo_auth.o @AUTH_OBJS@ AUTH_OBJS = sudo_auth.o @AUTH_OBJS@
COMMON_OBJS = alias.o alloc.o defaults.o error.o gram.o match.o toke.o \ # Note: gram.o must come first here
COMMON_OBJS = gram.o alias.o alloc.o defaults.o error.o match.o toke.o \
redblack.o zero_bytes.o redblack.o zero_bytes.o
SUDO_OBJS = check.o env.o getspwuid.o gettime.o goodpath.o fileops.o \ SUDO_OBJS = $(COMMON_OBJS) $(AUTH_OBJS) @SUDO_OBJS@ check.o env.o \
find_path.o interfaces.o lbuf.o logging.o parse.o pwutil.o \ getspwuid.o gettime.o goodpath.o fileops.o find_path.o \
set_perms.o sudo.o sudo_edit.o tgetpass.o @SUDO_OBJS@ $(AUTH_OBJS) \ interfaces.o lbuf.o logging.o parse.o pwutil.o set_perms.o \
$(COMMON_OBJS) sudo.o sudo_edit.o tgetpass.o
VISUDO_OBJS = visudo.o fileops.o gettime.o goodpath.o find_path.o pwutil.o \ VISUDO_OBJS = $(COMMON_OBJS) visudo.o fileops.o gettime.o goodpath.o \
$(COMMON_OBJS) find_path.o pwutil.o
TEST_OBJS = interfaces.o testsudoers.o tsgetgrpw.o tspwutil.o $(COMMON_OBJS) TEST_OBJS = $(COMMON_OBJS) interfaces.o testsudoers.o tsgetgrpw.o tspwutil.o
LIB_OBJS = @LIBOBJS@ @ALLOCA@ LIB_OBJS = @LIBOBJS@ @ALLOCA@
@@ -199,7 +200,7 @@ sudo_noexec.la: sudo_noexec.lo
$(devdir)/gram.c: $(srcdir)/gram.y $(devdir)/gram.c: $(srcdir)/gram.y
@DEV@ $(YACC) -d $(srcdir)/gram.y @DEV@ $(YACC) -d $(srcdir)/gram.y
@DEV@ mv -f y.tab.c gram.c @DEV@ mv -f y.tab.c gram.c
@DEV@ if `cmp y.tab.h gram.h`; then mv -f y.tab.h gram.h; else rm -f y.tab.h; fi @DEV@ if cmp y.tab.h gram.h; then rm -f y.tab.h; else mv -f y.tab.h gram.h; fi
-@true -@true
# Uncomment the lines before -@true if you intend to modify toke.l # Uncomment the lines before -@true if you intend to modify toke.l