]> granicus.if.org Git - sudo/commitdiff
Clean up regress files
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 31 May 2011 13:58:41 +0000 (09:58 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 31 May 2011 13:58:41 +0000 (09:58 -0400)
Generate proper dependencies for regress objs in compat

compat/Makefile.in
mkdep.pl
plugins/sudoers/Makefile.in

index 8206a9e86c0c6f5795f8641279bbb937eacee7ce..d34ba77e9ef717203d8980bb9d5dbf3bbffcd1bf 100644 (file)
@@ -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
index 485f2210e3d7e04952ea9643a685654c4499770a..9d12702a44cb95090a7375d7d9634bbf5c4b3518 100755 (executable)
--- 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;
index 48298cb619e03261bc7dc74c36c5a152ee328441..049f1392cf052c8d859ff65974bd5ac8d8340f25 100644 (file)
@@ -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