From: Todd C. Miller Date: Sun, 21 Feb 2010 21:12:01 +0000 (-0500) Subject: Fix up compat dependencies. X-Git-Tag: SUDO_1_8_0~875 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fadb324f1a14fd43b1dc53bec9ea6e7c119209bd;p=sudo Fix up compat dependencies. Fix distclean target in doc/Makefile.in --- diff --git a/Makefile b/Makefile index 44a49a7df..53a4679df 100644 --- a/Makefile +++ b/Makefile @@ -15,18 +15,26 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# XXX - add plugins/sudoers, compat +# XXX - add plugins/sudoers SUBDIRS = src plugins/sample doc -all clean install: +all install: config.status + for d in $(SUBDIRS); do (cd $$d && $(MAKE) $@); done + +config.status: @if [ ! -s config.status ]; then \ echo "Please run configure first"; \ exit 1; \ fi + +clean: config.status + -rm -f compat/*.o for d in $(SUBDIRS); do (cd $$d && $(MAKE) $@); done -distclean: - -rm -rf pathnames.h config.h config.status config.cache \ +mostlyclean: clean + +distclean: config.status + -rm -rf compat/*.o pathnames.h config.h config.status config.cache \ config.log libtool stamp-h* autom4te.cache for d in $(SUBDIRS); do (cd $$d && $(MAKE) $@); done diff --git a/configure b/configure index 5301187e7..09721ac7d 100755 --- a/configure +++ b/configure @@ -842,6 +842,7 @@ REPLAY LOGINCAP_USAGE NONUNIX_GROUPS_IMPL ZLIB +ac_config_libobj_dir timedir timeout password_timeout @@ -2131,6 +2132,7 @@ echo "$as_me: Configuring Sudo version $PACKAGE_VERSION" >&6;} + timeout=5 @@ -6491,7 +6493,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6494 "configure"' > conftest.$ac_ext + echo '#line 6496 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8355,11 +8357,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8358: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8360: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8362: \$? = $ac_status" >&5 + echo "$as_me:8364: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8645,11 +8647,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8648: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8650: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8652: \$? = $ac_status" >&5 + echo "$as_me:8654: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8749,11 +8751,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8752: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8754: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8756: \$? = $ac_status" >&5 + echo "$as_me:8758: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11109,7 +11111,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <conf$$subs.sed <<_ACEOF +runas_default!$runas_default$ac_delim env_editor!$env_editor$ac_delim passwd_tries!$passwd_tries$ac_delim tty_tickets!$tty_tickets$ac_delim @@ -27012,7 +27015,7 @@ KRB5CONFIG!$KRB5CONFIG$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 44; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 45; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.in b/configure.in index de5aea61e..989806c3d 100644 --- a/configure.in +++ b/configure.in @@ -53,6 +53,7 @@ AC_SUBST(REPLAY) AC_SUBST(LOGINCAP_USAGE) AC_SUBST(NONUNIX_GROUPS_IMPL) AC_SUBST(ZLIB) +AC_SUBST(ac_config_libobj_dir) dnl dnl Variables that get substituted in docs (not overridden by environment) dnl diff --git a/doc/Makefile.in b/doc/Makefile.in index 733fb6c78..7ecc08f18 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -140,7 +140,7 @@ clean: mostlyclean: clean distclean: clean - -rm -rf *.man + -rm -rf Makefile config.log *.man clobber: distclean diff --git a/src/Makefile.in b/src/Makefile.in index 3853516d3..26dbeb926 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -72,9 +72,11 @@ PROGS = sudo # sudo_edit.c selinux.c OBJS = sudo.o parse_args.o lbuf.o alloc.o error.o zero_bytes.o \ load_plugins.o conversation.o list.o fmt_string.o tgetpass.o \ - fileops.o term.o atobool.o script.o pty.o + fileops.o term.o atobool.o script.o pty.o $(LIBOBJS) -LIB_OBJS = @LIBOBJS@ +LIBOBJDIR = $(top_srcdir)/@ac_config_libobj_dir@/ + +LIBOBJS = @LIBOBJS@ VERSION = @PACKAGE_VERSION@ @@ -114,8 +116,6 @@ audit.o: $(srcdir)/audit.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/audit.c bsm_audit.o: $(srcdir)/bsm_audit.c $(SUDODEP) bsm_audit.h $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/bsm_audit.c -closefrom.o: $(srcdir)/closefrom.c $(top_builddir)/config.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/closefrom.c conversation.o: $(srcdir)/conversation.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/conversation.c error.o: $(srcdir)/error.c $(incdir)/compat.h $(incdir)/error.h $(top_builddir)/config.h @@ -124,46 +124,18 @@ fileops.o: $(srcdir)/fileops.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/fileops.c fmt_string.o: $(srcdir)/fmt_string.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/fmt_string.c -getcwd.o: $(srcdir)/getcwd.c $(incdir)/compat.h $(top_builddir)/config.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getcwd.c -getline.o: $(srcdir)/getline.c $(top_builddir)/config.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getline.c -getprogname.o: $(srcdir)/getprogname.c $(top_builddir)/config.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getprogname.c -isblank.o: $(srcdir)/isblank.c $(incdir)/compat.h $(top_builddir)/config.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/isblank.c lbuf.o: $(srcdir)/lbuf.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/lbuf.c list.o: $(srcdir)/list.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/list.c load_plugins.o: $(srcdir)/load_plugins.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/load_plugins.c -memrchr.o: $(srcdir)/memrchr.c $(SUDODEP) - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/memrchr.c -mkstemp.o: $(srcdir)/mkstemp.c $(SUDODEP) - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/mkstemp.c -nanosleep.o: $(srcdir)/nanosleep.c $(incdir)/compat.h $(top_builddir)/config.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/nanosleep.c parse_args.o: $(srcdir)/parse_args.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/parse_args.c pty.o: $(srcdir)/pty.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/pty.c script.o: $(srcdir)/script.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/script.c -sigaction.o: $(srcdir)/sigaction.c $(incdir)/compat.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sigaction.c -snprintf.o: $(srcdir)/snprintf.c $(incdir)/compat.h $(top_builddir)/config.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/snprintf.c -strcasecmp.o: $(srcdir)/strcasecmp.c $(incdir)/compat.h $(top_builddir)/config.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strcasecmp.c -strerror.o: $(srcdir)/strerror.c $(incdir)/compat.h $(top_builddir)/config.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strerror.c -strlcat.o: $(srcdir)/strlcat.c $(incdir)/compat.h $(top_builddir)/config.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strlcat.c -strlcpy.o: $(srcdir)/strlcpy.c $(incdir)/compat.h $(top_builddir)/config.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strlcpy.c -strsignal.o: $(srcdir)/strsignal.c $(incdir)/compat.h $(top_builddir)/config.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strsignal.c selinux.o: $(srcdir)/selinux.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/selinux.c sudo.o: $(srcdir)/sudo.c $(SUDODEP) sudo_usage.h @@ -176,11 +148,43 @@ term.o: $(srcdir)/term.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/term.c tgetpass.o: $(srcdir)/tgetpass.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/tgetpass.c -utimes.o: $(srcdir)/utimes.c $(incdir)/compat.h $(srcdir)/emul/utime.h $(top_builddir)/config.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/utimes.c zero_bytes.o: $(srcdir)/zero_bytes.c $(incdir)/compat.h $(top_builddir)/config.h $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/zero_bytes.c +# Compat dependencies +$(LIBOBJDIR)closefrom.o: $(top_srcdir)/compat/closefrom.c $(incdir)/compat.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/closefrom.c +$(LIBOBJDIR)getcwd.o: $(top_srcdir)/compat/getcwd.c $(incdir)/compat.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/getcwd.c +$(LIBOBJDIR)getline.o: $(top_srcdir)/compat/getline.c $(incdir)/compat.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/getline.c +$(LIBOBJDIR)getprogname.o: $(top_srcdir)/compat/getprogname.c $(incdir)/compat.h$(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/getprogname.c +$(LIBOBJDIR)isblank.o: $(top_srcdir)/compat/isblank.c $(incdir)/compat.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/isblank.c +$(LIBOBJDIR)memrchr.o: $(top_srcdir)/compat/memrchr.c $(incdir)/compat.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/memrchr.c +$(LIBOBJDIR)mkstemp.o: $(top_srcdir)/compat/mkstemp.c $(incdir)/compat.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/mkstemp.c +$(LIBOBJDIR)nanosleep.o: $(top_srcdir)/compat/nanosleep.c $(incdir)/compat.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/nanosleep.c +$(LIBOBJDIR)sigaction.o: $(top_srcdir)/compat/sigaction.c $(incdir)/compat.h $(incdir)/compat.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/sigaction.c +$(LIBOBJDIR)snprintf.o: $(top_srcdir)/compat/snprintf.c $(incdir)/compat.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/snprintf.c +$(LIBOBJDIR)strcasecmp.o: $(top_srcdir)/compat/strcasecmp.c $(incdir)/compat.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/strcasecmp.c +$(LIBOBJDIR)strerror.o: $(top_srcdir)/compat/strerror.c $(incdir)/compat.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/strerror.c +$(LIBOBJDIR)strlcat.o: $(top_srcdir)/compat/strlcat.c $(incdir)/compat.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/strlcat.c +$(LIBOBJDIR)strlcpy.o: $(top_srcdir)/compat/strlcpy.c $(incdir)/compat.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/strlcpy.c +$(LIBOBJDIR)strsignal.o: $(top_srcdir)/compat/strsignal.c $(incdir)/compat.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/strsignal.c +$(LIBOBJDIR)utimes.o: $(top_srcdir)/compat/utimes.c $(incdir)/compat.h $(top_srcdir)/compat/compat/utime.h $(top_builddir)/config.h + $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(top_srcdir)/compat/utimes.c + install: install-dirs install-binaries @INSTALL_NOEXEC@ install-dirs: