From f7cb73abdb079e15d3ad2d7eb95d0fb813c44107 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 26 May 2011 12:12:43 -0400 Subject: [PATCH] Add dependency for siglist.lo in compat. This is a generated file so "make depend" needs to depend on it. --- Makefile.in | 5 ++++- compat/Makefile.in | 2 ++ mkdep.pl | 13 +++++++++---- plugins/sudoers/Makefile.in | 26 -------------------------- 4 files changed, 15 insertions(+), 31 deletions(-) diff --git a/Makefile.in b/Makefile.in index 007794a34..0acfec814 100644 --- a/Makefile.in +++ b/Makefile.in @@ -78,7 +78,10 @@ install install-doc: config.status ChangeLog pre-install autoconf: autoconf -I m4 -depend: +siglist.c: + (cd compat && exec $(MAKE) $@) + +depend: siglist.c @if test "$(srcdir)" != "."; then \ echo "make depend only supported in the source directory"; \ exit 1; \ diff --git a/compat/Makefile.in b/compat/Makefile.in index a92b3ccbd..bd4634c4a 100644 --- a/compat/Makefile.in +++ b/compat/Makefile.in @@ -163,6 +163,8 @@ nanosleep.lo: $(srcdir)/nanosleep.c $(top_builddir)/config.h \ $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/nanosleep.c setenv.lo: $(srcdir)/setenv.c $(top_builddir)/config.h $(incdir)/missing.h $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/setenv.c +siglist.lo: siglist.c $(top_builddir)/config.h $(incdir)/missing.h + $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) siglist.c snprintf.lo: $(srcdir)/snprintf.c $(top_builddir)/config.h $(incdir)/missing.h $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/snprintf.c strlcat.lo: $(srcdir)/strlcat.c $(top_builddir)/config.h $(incdir)/missing.h diff --git a/mkdep.pl b/mkdep.pl index 9219d9df2..485f2210e 100755 --- a/mkdep.pl +++ b/mkdep.pl @@ -42,14 +42,14 @@ 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 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:; # Parse OBJS lines - my @objs; + my %objs; while ($makefile =~ /^[A-Z0-9_]*OBJS\s*=\s*(.*)/mg) { foreach (split/\s+/, $1) { next if /^\$[\(\{].*[\)\}]$/; # skip included vars for now - push(@objs, $_); + $objs{$_} = 1; } } @@ -82,7 +82,7 @@ sub mkdep { } # Do .lo files first - foreach my $obj (sort @objs) { + foreach my $obj (sort keys %objs) { next unless $obj =~ /(\S+)\.(l?o)$/; if ($2 eq "o" && exists($srcs{"$1.lo"})) { # If we have both .lo and .o files, make the .o depend on the .lo @@ -135,6 +135,11 @@ sub find_depends { my $src = $_[0]; my ($deps, $code, @headers); + if ($src !~ /\//) { + # XXX - want build dir not src dir + $src = "$dir_vars{'srcdir'}/$src"; + } + # resolve $(srcdir) etc. foreach (keys %dir_vars) { $src =~ s/\$[\(\{]$_[\)\}]/$dir_vars{$_}/g; diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index 0ea4c00f7..69c6f166e 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -454,15 +454,6 @@ env.lo: $(srcdir)/env.c $(top_builddir)/config.h $(srcdir)/sudoers.h \ error.o: $(top_srcdir)/src/error.c $(top_builddir)/config.h \ $(incdir)/missing.h $(incdir)/error.h $(incdir)/gettext.h $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(top_srcdir)/src/error.c -error.o: $(top_srcdir)/src/error.c $(top_builddir)/config.h \ - $(incdir)/missing.h $(incdir)/error.h $(incdir)/gettext.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(top_srcdir)/src/error.c -error.o: $(top_srcdir)/src/error.c $(top_builddir)/config.h \ - $(incdir)/missing.h $(incdir)/error.h $(incdir)/gettext.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(top_srcdir)/src/error.c -error.o: $(top_srcdir)/src/error.c $(top_builddir)/config.h \ - $(incdir)/missing.h $(incdir)/error.h $(incdir)/gettext.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(top_srcdir)/src/error.c find_path.lo: $(srcdir)/find_path.c $(top_builddir)/config.h \ $(srcdir)/sudoers.h $(top_builddir)/pathnames.h \ $(incdir)/missing.h $(incdir)/error.h $(incdir)/alloc.h \ @@ -525,13 +516,6 @@ iolog_path.lo: $(srcdir)/iolog_path.c $(top_builddir)/config.h \ $(srcdir)/def_data.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(incdir)/sudo_plugin.h $(incdir)/gettext.h $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/iolog_path.c -iolog_path.lo: $(srcdir)/iolog_path.c $(top_builddir)/config.h \ - $(srcdir)/sudoers.h $(top_builddir)/pathnames.h \ - $(incdir)/missing.h $(incdir)/error.h $(incdir)/alloc.h \ - $(incdir)/list.h $(incdir)/fileops.h $(srcdir)/defaults.h \ - $(srcdir)/def_data.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ - $(incdir)/sudo_plugin.h $(incdir)/gettext.h - $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/iolog_path.c kerb4.lo: $(authdir)/kerb4.c $(top_builddir)/config.h $(srcdir)/sudoers.h \ $(top_builddir)/pathnames.h $(incdir)/missing.h $(incdir)/error.h \ $(incdir)/alloc.h $(incdir)/list.h $(incdir)/fileops.h \ @@ -603,16 +587,6 @@ pwutil.lo: $(srcdir)/pwutil.c $(top_builddir)/config.h $(srcdir)/sudoers.h \ $(srcdir)/sudo_nss.h $(incdir)/sudo_plugin.h $(incdir)/gettext.h \ $(srcdir)/redblack.h $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/pwutil.c -pwutil.lo: $(srcdir)/pwutil.c $(top_builddir)/config.h $(srcdir)/sudoers.h \ - $(top_builddir)/pathnames.h $(incdir)/missing.h $(incdir)/error.h \ - $(incdir)/alloc.h $(incdir)/list.h $(incdir)/fileops.h \ - $(srcdir)/defaults.h $(srcdir)/def_data.h $(srcdir)/logging.h \ - $(srcdir)/sudo_nss.h $(incdir)/sudo_plugin.h $(incdir)/gettext.h \ - $(srcdir)/redblack.h - $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/pwutil.c -redblack.lo: $(srcdir)/redblack.c $(top_builddir)/config.h $(incdir)/missing.h \ - $(incdir)/alloc.h $(srcdir)/redblack.h - $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/redblack.c redblack.lo: $(srcdir)/redblack.c $(top_builddir)/config.h $(incdir)/missing.h \ $(incdir)/alloc.h $(srcdir)/redblack.h $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/redblack.c -- 2.40.0