From 7199afec891dee60736bc48c8834efa1b21b22d2 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 31 May 2011 09:58:41 -0400 Subject: [PATCH] Clean up regress files Generate proper dependencies for regress objs in compat --- compat/Makefile.in | 21 +++++++++++++-------- mkdep.pl | 2 +- plugins/sudoers/Makefile.in | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/compat/Makefile.in b/compat/Makefile.in index 8206a9e86..d34ba77e9 100644 --- a/compat/Makefile.in +++ b/compat/Makefile.in @@ -42,6 +42,8 @@ DEFS = @OSDEFS@ SHELL = @SHELL@ +TEST_PROGS = fnm_test globtest + LIBOBJDIR = LTLIBOBJS = @LTLIBOBJS@ @@ -53,6 +55,9 @@ Makefile: $(srcdir)/Makefile.in .SUFFIXES: .o .c .h .lo +.c.o: + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $< + .c.lo: $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $< @@ -65,15 +70,9 @@ siglist.c: mksiglist mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/missing.h $(top_builddir)/config.h $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@ -fnm_test.o: $(srcdir)/regress/fnmatch/fnm_test.c - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/regress/fnmatch/fnm_test.c - fnm_test: fnm_test.o libreplace.la $(LIBTOOL) --mode=link $(CC) -o $@ fnm_test.o libreplace.la -globtest.o: $(srcdir)/regress/glob/globtest.c - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/regress/glob/globtest.c - globtest: globtest.o libreplace.la $(LIBTOOL) --mode=link $(CC) -o $@ globtest.o libreplace.la @@ -102,7 +101,7 @@ install-nls: uninstall: -check: fnm_test globtest +check: $(TEST_PROGS) @./fnm_test $(srcdir)/regress/fnmatch/fnm_test.in @mkdir -p `sed 's@/[^/]*$$@@' $(srcdir)/regress/glob/files | sort -u` @touch `cat $(srcdir)/regress/glob/files` @@ -113,7 +112,7 @@ check: fnm_test globtest @rm -rf fake clean: - -$(LIBTOOL) --mode=clean rm -f mksiglist siglist.c *.lo *.o *.la *.a stamp-* core *.core core.* + -$(LIBTOOL) --mode=clean rm -f $(TEST_PROGS) mksiglist siglist.c *.lo *.o *.la *.a stamp-* core *.core core.* mostlyclean: clean @@ -133,6 +132,9 @@ closefrom.lo: $(srcdir)/closefrom.c $(top_builddir)/config.h $(incdir)/missing.h dlopen.lo: $(srcdir)/dlopen.c $(top_builddir)/config.h \ $(top_srcdir)/compat/dlfcn.h $(incdir)/missing.h $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/dlopen.c +fnm_test.o: $(srcdir)/regress/fnmatch/fnm_test.c $(top_builddir)/config.h \ + $(top_srcdir)/compat/fnmatch.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/regress/fnmatch/fnm_test.c fnmatch.lo: $(srcdir)/fnmatch.c $(top_builddir)/config.h $(incdir)/missing.h \ $(top_srcdir)/compat/charclass.h $(top_srcdir)/compat/fnmatch.h $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/fnmatch.c @@ -149,6 +151,9 @@ getprogname.lo: $(srcdir)/getprogname.c $(top_builddir)/config.h \ glob.lo: $(srcdir)/glob.c $(top_builddir)/config.h $(incdir)/missing.h \ $(top_srcdir)/compat/glob.h $(top_srcdir)/compat/charclass.h $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/glob.c +globtest.o: $(srcdir)/regress/glob/globtest.c $(top_builddir)/config.h \ + $(top_srcdir)/compat/glob.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/regress/glob/globtest.c isblank.lo: $(srcdir)/isblank.c $(top_builddir)/config.h $(incdir)/missing.h $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/isblank.c memrchr.lo: $(srcdir)/memrchr.c $(top_builddir)/config.h $(incdir)/missing.h diff --git a/mkdep.pl b/mkdep.pl index 485f2210e..9d12702a4 100755 --- a/mkdep.pl +++ b/mkdep.pl @@ -42,7 +42,7 @@ sub mkdep { $makefile =~ s:\@SUDOERS_OBJS\@:bsm_audit.lo linux_audit.lo ldap.lo plugin_error.lo:; # XXX - fill in AUTH_OBJS from contents of the auth dir instead $makefile =~ s:\@AUTH_OBJS\@:afs.lo aix_auth.lo bsdauth.lo dce.lo fwtk.lo kerb4.lo kerb5.lo pam.lo passwd.lo rfc1938.lo secureware.lo securid.lo securid5.lo sia.lo:; - $makefile =~ s:\@LTLIBOBJS\@:closefrom.lo dlopen.lo fnmatch.lo getcwd.lo getgrouplist.lo getline.lo getprogname.lo glob.lo isblank.lo memrchr.lo mksiglist.lo mktemp.lo nanosleep.lo setenv.lo siglist.lo snprintf.lo strlcat.lo strlcpy.lo strsignal.lo unsetenv.lo utimes.lo:; + $makefile =~ s:\@LTLIBOBJS\@:closefrom.lo dlopen.lo fnmatch.lo getcwd.lo getgrouplist.lo getline.lo getprogname.lo glob.lo isblank.lo memrchr.lo mksiglist.lo mktemp.lo nanosleep.lo setenv.lo siglist.lo snprintf.lo strlcat.lo strlcpy.lo strsignal.lo unsetenv.lo utimes.lo globtest.o fnm_test.o:; # Parse OBJS lines my %objs; diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index 48298cb61..049f1392c 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -370,7 +370,7 @@ check: $(TEST_PROGS) visudo testsudoers rval=`expr $$rval + $$failed`; exit $$rval clean: - -$(LIBTOOL) --mode=clean rm -f $(PROGS) *.lo *.o *.la *.a stamp-* core *.core core.* *.out + -$(LIBTOOL) --mode=clean rm -f $(PROGS) $(TEST_PROGS) *.lo *.o *.la *.a stamp-* core *.core core.* *.out *.toke *.err mostlyclean: clean -- 2.40.0