Imported Upstream version 1.8.2
[debian/sudo] / Makefile.in
index b16338b12a3a2ae6a6b4260506067a9c5e7e0441..1f5f7139989e339a0399cfa491bae051177581d0 100644 (file)
@@ -1,6 +1,5 @@
 #
-# Copyright (c) 1996, 1998-2005, 2007-2011
-#      Todd C. Miller <Todd.Miller@courtesan.com>
+# Copyright (c) 2010-2011 Todd C. Miller <Todd.Miller@courtesan.com>
 #
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
-# Sponsored in part by the Defense Advanced Research Projects
-# Agency (DARPA) and Air Force Research Laboratory, Air Force
-# Materiel Command, USAF, under agreement number F39502-99-1-0512.
-#
-# @configure_input@
-#
-
-#### Start of system configuration section. ####
 
 srcdir = @srcdir@
 devdir = @devdir@
-authdir = $(srcdir)/auth
-top_builddir = .
-
-# Compiler & tools to use
-CC = @CC@
-FLEX = @FLEX@
-YACC = @YACC@
-NROFF = @NROFFPROG@ -Tascii
-LIBTOOL = @LIBTOOL@
-AR=@AR@
-RANLIB=@RANLIB@
-
-# Our install program supports extra flags...
-INSTALL = $(SHELL) $(srcdir)/install-sh -c
-
-# Libraries
-LIBS = @LIBS@
-NET_LIBS = @NET_LIBS@
-SUDO_LIBS = @SUDO_LIBS@ @AFS_LIBS@ @GETGROUPS_LIB@ $(LIBS) $(NET_LIBS)
-
-# C preprocessor flags
-CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 
-# Usually -O and/or -g
-CFLAGS = @CFLAGS@
-
-# Flags to pass to the link stage
-LDFLAGS = -L. @LDFLAGS@
-SUDO_LDFLAGS = @SUDO_LDFLAGS@ $(LDFLAGS)
-
-# Where to install things...
+# Installation paths for package building
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 bindir = @bindir@
 sbindir = @sbindir@
 sysconfdir = @sysconfdir@
 libexecdir = @libexecdir@
+includedir = @includedir@
 datarootdir = @datarootdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 docdir = @docdir@
 mandir = @mandir@
 timedir = @timedir@
-noexecfile = @NOEXECFILE@
-noexecdir = @NOEXECDIR@
-
-# Directory in which to install sudo.
-sudodir = $(bindir)
-
-# Directory in which to install visudo
-visudodir = $(sbindir)
-
-# Directory in which to install the sudoers file
-sudoersdir = $(sysconfdir)
-
-# Directory in which to install the man page
-mantype = @MANTYPE@
-mansectsu = @mansectsu@
-mansectform = @mansectform@
-mandirsu = $(mandir)/$(mantype)$(mansectsu)
-mandirform = $(mandir)/$(mantype)$(mansectform)
 
 # User and group ids the installed files should be "owned" by
 install_uid = 0
 install_gid = 0
 
-# User, group, and mode the sudoers file should be "owned" by (configure)
+# sudoers owner and mode for package building
+sudoersdir = $(sysconfdir)
 sudoers_uid = @SUDOERS_UID@
 sudoers_gid = @SUDOERS_GID@
 sudoers_mode = @SUDOERS_MODE@
 
-# Pass in paths and uid/gid + OS dependent defined
-DEFS = @OSDEFS@ -D_PATH_SUDOERS=\"$(sudoersdir)/sudoers\" -DSUDOERS_UID=$(sudoers_uid) -DSUDOERS_GID=$(sudoers_gid) -DSUDOERS_MODE=$(sudoers_mode)
-
-#### End of system configuration section. ####
-
-SHELL = @SHELL@
-
-PROGS = @PROGS@
-
-SRCS = aix.c alias.c alloc.c audit.c boottime.c bsm_audit.c check.c \
-       closefrom.c def_data.c defaults.c env.c error.c exec.c exec_pty.c \
-       fileops.c find_path.c fnmatch.c get_pty.c getcwd.c getprogname.c \
-       getspwuid.c gettime.c glob.c goodpath.c gram.c gram.y interfaces.c \
-       iolog.c isblank.c lbuf.c ldap.c linux_audit.c list.c logging.c match.c \
-       mksiglist.c mkstemps.c memrchr.c nanosleep.c parse.c parse_args.c \
-       pwutil.c set_perms.c setsid.c sigaction.c snprintf.c strcasecmp.c \
-       strerror.c strlcat.c strlcpy.c strsignal.c sudo.c sudo_noexec.c \
-       sudo_edit.c sudo_nss.c term.c testsudoers.c tgetpass.c toke.c toke.l \
-       toke_util.c tsgetgrpw.c utimes.c vasgroups.c visudo.c zero_bytes.c \
-       redblack.c selinux.c sesh.c sudoreplay.c getdate.c getdate.y getline.c \
-       timestr.c $(AUTH_SRCS)
-
-AUTH_SRCS = auth/afs.c auth/aix_auth.c auth/bsdauth.c auth/dce.c auth/fwtk.c \
-           auth/kerb4.c auth/kerb5.c auth/pam.c auth/passwd.c auth/rfc1938.c \
-           auth/secureware.c auth/securid.c auth/securid5.c auth/sia.c \
-           auth/sudo_auth.c
-
-HDRS = alloc.h bsm_audit.h def_data.h defaults.h error.h ins_2001.h \
-       ins_classic.h ins_csops.h ins_goons.h insults.h interfaces.h lbuf.h \
-       linux_audit.h list.h logging.h missing.h mksiglist.h nonunix.h \
-       redblack.h parse.h sudo.h sudo_exec.h sudo_nss.h gram.h toke.h \
-       auth/sudo_auth.h emul/charclass.h emul/fnmatch.h emul/glob.h \
-       emul/timespec.h emul/utime.h
-
-AUTH_OBJS = sudo_auth.o @AUTH_OBJS@
-
-COMMON_OBJS = alias.o alloc.o defaults.o error.o gram.o \
-             list.o match.o pwutil.o timestr.o toke.o toke_util.o redblack.o \
-             term.o zero_bytes.o @COMMON_OBJS@
-
-SUDO_OBJS = $(AUTH_OBJS) @SUDO_OBJS@ audit.o boottime.o check.o env.o \
-           exec.o gettime.o goodpath.o fileops.o find_path.o \
-           interfaces.o lbuf.o logging.o parse.o parse_args.o set_perms.o \
-           sudo.o sudo_edit.o sudo_nss.o tgetpass.o
-
-VISUDO_OBJS = visudo.o fileops.o gettime.o goodpath.o find_path.o
-
-REPLAY_OBJS = getdate.o sudoreplay.o
+SUBDIRS = compat common @ZLIB_SRC@ plugins/sudoers src include doc
 
-TEST_OBJS = interfaces.o testsudoers.o tsgetgrpw.o
-
-LIB_OBJS = @LIBOBJS@
-
-ZLIB_OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o \
-           gzread.o gzwrite.o infback.o inffast.o inflate.o inftrees.o \
-           trees.o uncompr.o zutil.o
+SAMPLES = plugins/sample plugins/sample_group
 
 VERSION = @PACKAGE_VERSION@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 
-DISTFILES = $(SRCS) $(HDRS) ChangeLog HISTORY INSTALL INSTALL.configure \
-           LICENSE Makefile.in NEWS PORTING README README.LDAP \
-           TROUBLESHOOTING UPGRADE aclocal.m4 aixcrypt.exp config.guess \
-           config.h.in config.sub configure configure.in def_data.in \
-           indent.pro install-sh ltmain.sh m4 mkdefaults mkinstalldirs \
-           mkpkg pathnames.h.in pp sample.pam sample.syslog.conf \
-           sample.sudoers schema.ActiveDirectory schema.OpenLDAP \
-           schema.iPlanet siglist.in sudo.cat sudo.man.in sudo.pod sudo.pp \
-           sudo_usage.h.in sudoers.in sudoers.cat sudoers.man.in sudoers.pod \
-           sudoers.ldap.cat sudoers.ldap.man.in sudoers.ldap.pod \
-           sudoers2ldif sudoreplay.cat sudoreplay.man.in sudoreplay.pod \
-           visudo.cat visudo.man.in visudo.pod auth/API sudo.man.pl \
-           sudoers.man.pl $(ZLIB_FILES)
-
-ZLIB_FILES = zlib/adler32.c zlib/compress.c zlib/crc32.c zlib/crc32.h \
-            zlib/deflate.c zlib/deflate.h zlib/gzclose.c zlib/gzguts.h \
-            zlib/gzlib.c zlib/gzread.c zlib/gzwrite.c zlib/infback.c \
-            zlib/inffast.c zlib/inffast.h zlib/inffixed.h zlib/inflate.c \
-            zlib/inflate.h zlib/inftrees.c zlib/inftrees.h zlib/trees.c \
-            zlib/trees.h zlib/uncompr.c zlib/zconf.h.in zlib/zlib.h \
-            zlib/zutil.c zlib/zutil.h
-
-SUDODEP = $(srcdir)/sudo.h $(srcdir)/alloc.h $(srcdir)/defaults.h \
-         $(srcdir)/error.h $(srcdir)/list.h $(srcdir)/logging.h \
-         $(srcdir)/missing.h $(srcdir)/sudo_nss.h $(devdir)/def_data.h \
-         pathnames.h config.h
-
-AUTHDEP = $(SUDODEP) $(authdir)/sudo_auth.h
-
-INSDEP = $(srcdir)/ins_2001.h $(srcdir)/ins_classic.h $(srcdir)/ins_csops.h \
-        $(srcdir)/ins_goons.h $(srcdir)/insults.h
-
-all: $(PROGS)
-
-.SUFFIXES: .o .c .h .l .y .lo
-
-.c.o:
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $<
-
-.c.lo:
-       $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $<
-
-libsudo.a: $(LIB_OBJS) $(COMMON_OBJS)
-       $(AR) rv $@ $(LIB_OBJS) $(COMMON_OBJS)
-       $(RANLIB) $@
-
-libz.a: $(ZLIB_OBJS)
-       $(AR) rv $@ $(ZLIB_OBJS)
-       $(RANLIB) $@
-
-sudo: libsudo.a @ZLIB_DEP@ $(SUDO_OBJS)
-       $(CC) -o $@ $(SUDO_OBJS) $(SUDO_LDFLAGS) -lsudo $(SUDO_LIBS) @ZLIB@
-
-visudo: libsudo.a $(VISUDO_OBJS)
-       $(CC) -o $@ $(VISUDO_OBJS) $(LDFLAGS) -lsudo $(LIBS) $(NET_LIBS)
-
-sudoreplay: libsudo.a @ZLIB_DEP@ $(REPLAY_OBJS)
-       $(CC) -o $@ $(REPLAY_OBJS) $(LDFLAGS) -lsudo $(LIBS) @ZLIB@
-
-testsudoers: $(TEST_OBJS)
-       $(CC) -o $@ $(TEST_OBJS) $(LDFLAGS) -lsudo $(LIBS) $(NET_LIBS)
-
-sudo_noexec.lo: $(srcdir)/sudo_noexec.c
-       $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo_noexec.c
-
-libsudo_noexec.la: sudo_noexec.lo
-       $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ sudo_noexec.lo -avoid-version -rpath $(noexecdir)
-
-# Uncomment the following if you want "make distclean" to clean the parser
-@DEV@GENERATED = gram.h gram.c toke.c def_data.c def_data.h getdate
-
-# Uncomment the lines before -@true if you intend to modify gram.y
-$(devdir)/gram.c $(devdir)/gram.h: $(srcdir)/gram.y
-@DEV@  $(YACC) -d $(srcdir)/gram.y
-@DEV@  echo "#include <config.h>" > $(devdir)/gram.c
-@DEV@  cat y.tab.c >> $(devdir)/gram.c
-@DEV@  rm -f y.tab.c
-@DEV@  mv -f y.tab.h $(devdir)/gram.h
-       -@true
-
-# Uncomment the lines before -@true if you intend to modify toke.l
-$(devdir)/toke.c: $(srcdir)/toke.l
-@DEV@  $(FLEX) $(srcdir)/toke.l
-@DEV@  echo "#include <config.h>" > $(devdir)/toke.c
-@DEV@  cat lex.yy.c >> $(devdir)/toke.c
-@DEV@  rm -f lex.yy.c
-       -@true
-
-# Uncomment the lines before -@true if you intend to modify getdate.y
-$(devdir)/getdate.c: $(srcdir)/getdate.y
-@DEV@  echo "expect 10 shift/reduce conflicts"
-@DEV@  $(YACC) $(srcdir)/getdate.y
-@DEV@  echo "#include <config.h>" > $(devdir)/getdate.c
-@DEV@  cat y.tab.c >> $(devdir)/getdate.c
-@DEV@  rm -f y.tab.c
-       -@true
-
-# Uncomment the following if you intend to modify def_data.in
-@DEV@$(devdir)/def_data.h $(devdir)/def_data.c: $(srcdir)/def_data.in
-@DEV@  perl $(srcdir)/mkdefaults -o def_data $(srcdir)/def_data.in
-
-siglist.c: mksiglist
-       ./mksiglist > $@
-
-mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(srcdir)/missing.h config.h
-       $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
-
-@DEV@$(srcdir)/mksiglist.h: $(srcdir)/siglist.in
-@DEV@  awk 'BEGIN {print "/* public domain */\n"} /^    [A-Z]/ {printf("#ifdef SIG%s\n    if (my_sys_siglist[SIG%s] == NULL)\n\tmy_sys_siglist[SIG%s] = \"%s\";\n#endif\n", $$1, $$1, $$1, substr($$0, 13))}' < $(srcdir)/siglist.in > $@
-
-# Dependencies (not counting auth functions)
-aix.o: $(srcdir)/aix.c
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/aix.c
-alias.o: $(srcdir)/alias.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(srcdir)/redblack.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/alias.c
-alloc.o: $(srcdir)/alloc.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/alloc.c
-audit.o: $(srcdir)/audit.c $(SUDODEP) $(srcdir)/bsm_audit.h $(srcdir)/linux_audit.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/audit.c
-boottime.o: $(srcdir)/boottime.c config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/boottime.c
-bsm_audit.o: $(srcdir)/bsm_audit.c $(SUDODEP) $(srcdir)/bsm_audit.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/bsm_audit.c
-check.o: $(srcdir)/check.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/check.c
-closefrom.o: $(srcdir)/closefrom.c config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/closefrom.c
-defaults.o: $(srcdir)/defaults.c $(SUDODEP) $(srcdir)/def_data.c $(authdir)/sudo_auth.h $(devdir)/gram.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/defaults.c
-env.o: $(srcdir)/env.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/env.c
-error.o: $(srcdir)/error.c $(srcdir)/missing.h $(srcdir)/error.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/error.c
-exec.o: $(srcdir)/exec.c $(SUDODEP) $(srcdir)/sudo_exec.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/exec.c
-exec_pty.o: $(srcdir)/exec.c $(SUDODEP) $(srcdir)/sudo_exec.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/exec_pty.c
-fileops.o: $(srcdir)/fileops.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/fileops.c
-find_path.o: $(srcdir)/find_path.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/find_path.c
-fnmatch.o: $(srcdir)/fnmatch.c $(srcdir)/emul/fnmatch.h $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/fnmatch.c
-get_pty.o: $(srcdir)/get_pty.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/get_pty.c
-getcwd.o: $(srcdir)/getcwd.c $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getcwd.c
-getdate.o: $(srcdir)/getdate.c $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getdate.c
-getline.o: $(srcdir)/getline.c config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getline.c
-getprogname.o: $(srcdir)/getprogname.c config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getprogname.c
-getspwuid.o: $(srcdir)/getspwuid.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getspwuid.c
-gettime.o: $(srcdir)/gettime.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/gettime.c
-glob.o: $(srcdir)/glob.c $(srcdir)/emul/glob.h $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/glob.c
-goodpath.o: $(srcdir)/goodpath.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/goodpath.c
-gram.o: $(devdir)/gram.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(devdir)/gram.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(devdir)/gram.c
-interfaces.o: $(srcdir)/interfaces.c $(SUDODEP) $(srcdir)/interfaces.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/interfaces.c
-iolog.o: $(srcdir)/iolog.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/iolog.c
-isblank.o: $(srcdir)/isblank.c $(srcdir)/missing.h 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
-ldap.o: $(srcdir)/ldap.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/ldap.c
-linux_audit.o: $(srcdir)/linux_audit.c $(SUDODEP) $(srcdir)/linux_audit.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/linux_audit.c
-list.o: $(srcdir)/list.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/list.c
-logging.o: $(srcdir)/logging.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/logging.c
-match.o: $(srcdir)/match.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(srcdir)/interfaces.h $(devdir)/gram.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/match.c
-memrchr.o: $(srcdir)/memrchr.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/memrchr.c
-mkstemps.o: $(srcdir)/mkstemps.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/mkstemps.c
-nanosleep.o: $(srcdir)/nanosleep.c $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/nanosleep.c
-parse.o: $(srcdir)/parse.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(devdir)/gram.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/parse.c
-parse_args.o: $(srcdir)/parse_args.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/parse_args.c
-pwutil.o: $(srcdir)/pwutil.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/pwutil.c
-redblack.o: $(srcdir)/redblack.c $(SUDODEP) $(srcdir)/redblack.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/redblack.c
-set_perms.o: $(srcdir)/set_perms.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/set_perms.c
-setsid.o: $(srcdir)/setsid.c $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/setsid.c
-sigaction.o: $(srcdir)/sigaction.c $(srcdir)/missing.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sigaction.c
-siglist.o: siglist.c $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/siglist.c
-snprintf.o: $(srcdir)/snprintf.c $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/snprintf.c
-strcasecmp.o: $(srcdir)/strcasecmp.c $(srcdir)/missing.h  config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strcasecmp.c
-strerror.o: $(srcdir)/strerror.c $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strerror.c
-strlcat.o: $(srcdir)/strlcat.c $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strlcat.c
-strlcpy.o: $(srcdir)/strlcpy.c $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strlcpy.c
-strsignal.o: $(srcdir)/strsignal.c $(srcdir)/missing.h 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 $(srcdir)/interfaces.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo.c
-sudoreplay.o: $(srcdir)/sudoreplay.c $(srcdir)/alloc.h $(srcdir)/missing.h $(srcdir)/error.h $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudoreplay.c
-sudo_edit.o: $(srcdir)/sudo_edit.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo_edit.c
-sudo_noexec.o: $(srcdir)/sudo_noexec.c $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo_noexec.c
-sudo_nss.o: $(srcdir)/sudo_nss.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo_nss.c
-term.o: $(srcdir)/term.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/term.c
-testsudoers.o: $(srcdir)/testsudoers.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(srcdir)/interfaces.h $(devdir)/gram.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/testsudoers.c
-tgetpass.o: $(srcdir)/tgetpass.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/tgetpass.c
-timestr.o: $(srcdir)/timestr.c $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/timestr.c
-toke.o: $(devdir)/toke.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(srcdir)/toke.h $(devdir)/gram.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(devdir)/toke.c
-toke_util.o: $(srcdir)/toke_util.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(srcdir)/toke.h $(devdir)/gram.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/toke_util.c
-tsgetgrpw.o: $(srcdir)/tsgetgrpw.c $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/tsgetgrpw.c
-utimes.o: $(srcdir)/utimes.c $(srcdir)/missing.h $(srcdir)/emul/utime.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/utimes.c
-vasgroups.o: $(srcdir)/vasgroups.c $(srcdir)/nonunix.h $(SUDODEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/vasgroups.c
-visudo.o: $(srcdir)/visudo.c $(SUDODEP) $(devdir)/gram.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/visudo.c
-zero_bytes.o: $(srcdir)/zero_bytes.c $(srcdir)/missing.h config.h
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/zero_bytes.c
-sudo_auth.o: $(authdir)/sudo_auth.c $(AUTHDEP) $(INSDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/sudo_auth.c
-afs.o: $(authdir)/afs.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/afs.c
-aix_auth.o: $(authdir)/aix_auth.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/aix_auth.c
-bsdauth.o: $(authdir)/bsdauth.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/bsdauth.c
-dce.o: $(authdir)/dce.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/dce.c
-fwtk.o: $(authdir)/fwtk.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/fwtk.c
-kerb4.o: $(authdir)/kerb4.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/kerb4.c
-kerb5.o: $(authdir)/kerb5.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/kerb5.c
-pam.o: $(authdir)/pam.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/pam.c
-passwd.o: $(authdir)/passwd.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/passwd.c
-rfc1938.o: $(authdir)/rfc1938.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/rfc1938.c
-secureware.o: $(authdir)/secureware.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/secureware.c
-securid.o: $(authdir)/securid.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/securid.c
-securid5.o: $(authdir)/securid5.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/securid5.c
-sia.o: $(authdir)/sia.c $(AUTHDEP)
-       $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/sia.c
-
-# Zlib dependencies
-adler32.o: $(srcdir)/zlib/zutil.h $(srcdir)/zlib/zlib.h zlib/zconf.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/adler32.c
-compress.o: $(srcdir)/zlib/zlib.h zlib/zconf.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/compress.c
-crc32.o: $(srcdir)/zlib/zutil.h $(srcdir)/zlib/zlib.h zlib/zconf.h $(srcdir)/zlib/crc32.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/crc32.c
-deflate.o: $(srcdir)/zlib/deflate.h $(srcdir)/zlib/zutil.h $(srcdir)/zlib/zlib.h zlib/zconf.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/deflate.c
-gzclose.o: $(srcdir)/zlib/zlib.h zlib/zconf.h $(srcdir)/zlib/gzguts.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/gzclose.c
-gzlib.o: $(srcdir)/zlib/zlib.h zlib/zconf.h $(srcdir)/zlib/gzguts.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/gzlib.c
-gzread.o: $(srcdir)/zlib/zlib.h zlib/zconf.h $(srcdir)/zlib/gzguts.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/gzread.c
-gzwrite.o: $(srcdir)/zlib/zlib.h zlib/zconf.h $(srcdir)/zlib/gzguts.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/gzwrite.c
-infback.o: $(srcdir)/zlib/zutil.h $(srcdir)/zlib/zlib.h zlib/zconf.h $(srcdir)/zlib/inftrees.h $(srcdir)/zlib/inflate.h $(srcdir)/zlib/inffast.h $(srcdir)/zlib/inffixed.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/infback.c
-inffast.o: $(srcdir)/zlib/zutil.h $(srcdir)/zlib/zlib.h zlib/zconf.h $(srcdir)/zlib/inftrees.h $(srcdir)/zlib/inflate.h $(srcdir)/zlib/inffast.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/inffast.c
-inflate.o: $(srcdir)/zlib/zutil.h $(srcdir)/zlib/zlib.h zlib/zconf.h $(srcdir)/zlib/inftrees.h $(srcdir)/zlib/inflate.h $(srcdir)/zlib/inffast.h $(srcdir)/zlib/inffixed.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/inflate.c
-inftrees.o: $(srcdir)/zlib/zutil.h $(srcdir)/zlib/zlib.h zlib/zconf.h $(srcdir)/zlib/inftrees.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/inftrees.c
-trees.o: $(srcdir)/zlib/deflate.h $(srcdir)/zlib/zutil.h $(srcdir)/zlib/zlib.h zlib/zconf.h $(srcdir)/zlib/trees.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/trees.c
-uncompr.o: $(srcdir)/zlib/zlib.h zlib/zconf.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/uncompr.c
-zutil.o: $(srcdir)/zlib/zutil.h $(srcdir)/zlib/zlib.h zlib/zconf.h
-       $(CC) -c -I. -I$(srcdir)/zlib $(CFLAGS) $(srcdir)/zlib/zutil.c
-
-@DEV@varsub: $(srcdir)/configure.in
-@DEV@  printf 's#@%s@#1#\ns#@%s@#1#\ns#@%s@#1#\ns#@%s@#/etc#g\ns#@%s@#/usr/local#g\ns#@%s@#4#g\ns#@%s@#1m#g\n' SEMAN BAMAN LCMAN sysconfdir prefix mansectform mansectsu > $@; sed -n '/Begin initial values for man page substitution/,/End initial values for man page substitution/{;p;}' $(srcdir)/configure.in | sed -e '/^#/d' -e 's/^/s#@/' -e 's/=[\\"]*/@#/' -e 's/[\\"]*$$/#g/' >> $@
-
-@DEV@$(srcdir)/sudo.man.in: $(srcdir)/sudo.pod
-@DEV@  mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' $(srcdir)/sudo.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" $(srcdir)/sudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" | perl -p $(srcdir)/sudo.man.pl >> $@
-
-sudo.man: $(srcdir)/sudo.man.in
-       $(SHELL) config.status --file=$@
-
-@DEV@$(srcdir)/sudo.cat: varsub $(srcdir)/sudo.man.in
-@DEV@  sed -f varsub $(srcdir)/sudo.man.in | $(NROFF) -man > $@
-
-@DEV@$(srcdir)/visudo.man.in: $(srcdir)/visudo.pod
-@DEV@  mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' $(srcdir)/visudo.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" $(srcdir)/visudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" -e 's|\\fI\\f\((CW*\)*I@\([^@]*\)\\fI@|\\fI@\2@|g' >> $@
-
-visudo.man: $(srcdir)/visudo.man.in
-       $(SHELL) config.status --file=$@
-
-@DEV@$(srcdir)/visudo.cat: varsub $(srcdir)/visudo.man.in
-@DEV@  sed -f varsub $(srcdir)/visudo.man.in | $(NROFF) -man > $@
-
-@DEV@$(srcdir)/sudoers.man.in: $(srcdir)/sudoers.pod
-@DEV@  mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' $(srcdir)/sudoers.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" $(srcdir)/sudoers.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" | perl -p $(srcdir)/sudoers.man.pl >> $@
-
-sudoers.man: $(srcdir)/sudoers.man.in
-       $(SHELL) config.status --file=$@
-
-@DEV@$(srcdir)/sudoers.cat: varsub $(srcdir)/sudoers.man.in
-@DEV@  sed -f varsub $(srcdir)/sudoers.man.in | $(NROFF) -man > $@
-
-@DEV@$(srcdir)/sudoers.ldap.man.in: $(srcdir)/sudoers.ldap.pod
-@DEV@  mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' $(srcdir)/sudoers.ldap.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" $(srcdir)/sudoers.ldap.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" -e 's|\\fI\\f\((CW*\)*I@\([^@]*\)\\fI@|\\fI@\2@|g' >> $@
-
-sudoers.ldap.man: $(srcdir)/sudoers.ldap.man.in
-       $(SHELL) config.status --file=$@
-
-@DEV@$(srcdir)/sudoers.ldap.cat: varsub $(srcdir)/sudoers.ldap.man.in
-@DEV@  sed -f varsub $(srcdir)/sudoers.ldap.man.in | $(NROFF) -man > $@
-
-@DEV@$(srcdir)/sudoreplay.man.in: $(srcdir)/sudoreplay.pod
-@DEV@  mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' $(srcdir)/sudoreplay.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" $(srcdir)/sudoreplay.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" -e 's|\\fI\\f\((CW*\)*I@\([^@]*\)\\fI@|\\fI@\2@|g' >> $@
-
-sudoreplay.man: $(srcdir)/sudoreplay.man.in
-       $(SHELL) config.status --file=$@
-
-@DEV@$(srcdir)/sudoreplay.cat: varsub $(srcdir)/sudoreplay.man.in
-@DEV@  sed -f varsub $(srcdir)/sudoreplay.man.in | $(NROFF) -man > $@
-
-@DEV@HISTORY: $(srcdir)/history.pod
-@DEV@  pod2text -l -i0 $(srcdir)/history.pod > $@
-@DEV@
-@DEV@LICENSE: $(srcdir)/license.pod
-@DEV@  pod2text -l -i0 $(srcdir)/license.pod | sed '1,2d' > $@
-
-sudoers: $(srcdir)/sudoers.in
-       (cd $(top_builddir) && $(SHELL) config.status --file=plugins/sudoers/$@)
-
-# The 1.7 branch started Jan 18, 2010
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+
+SHELL = @SHELL@
+
+INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
+
+ECHO_N = @ECHO_N@
+ECHO_C = @ECHO_C@
+
+# Message catalog support
+NLS = @SUDO_NLS@
+POTFILES = src/po/sudo.pot plugins/sudoers/po/sudoers.pot
+MSGFMT = msgfmt
+MSGMERGE = msgmerge
+XGETTEXT = xgettext
+XGETTEXT_OPTS = -k_ -kN_ --copyright-holder="Todd C. Miller" \
+               "--msgid-bugs-address=http://www.sudo.ws/bugs" \
+               --package-name=@PACKAGE_NAME@ --package-version=$(VERSION) \
+               --flag warning:1:c-format --flag warningx:1:c-format \
+               --flag error:2:c-format --flag errorx:2:c-format \
+               --flag easprintf:3:c-format --flag lbuf_append:2:c-format \
+               --flag lbuf_append_quoted:3:c-format --foreign-user
+
+all: config.status
+       for d in $(SUBDIRS) $(SAMPLES); \
+           do (cd $$d && exec $(MAKE) $@) && continue; \
+           exit $$?; \
+       done
+
+check pre-install: config.status
+       for d in $(SUBDIRS); \
+           do (cd $$d && exec $(MAKE) $@) && continue; \
+           exit $$?; \
+       done
+
+install-dirs install-binaries install-includes install-plugin: config.status pre-install
+       for d in $(SUBDIRS); \
+           do (cd $$d && exec $(MAKE) $@) && continue; \
+           exit $$?; \
+       done
+
+install-doc: config.status ChangeLog
+       for d in $(SUBDIRS); \
+           do (cd $$d && exec $(MAKE) $@) && continue; \
+           exit $$?; \
+       done
+
+install: config.status pre-install install-nls
+       for d in $(SUBDIRS); \
+           do (cd $$d && exec $(MAKE) $@) && continue; \
+           exit $$?; \
+       done
+
+uninstall: uninstall-nls
+       for d in $(SUBDIRS); \
+           do (cd $$d && exec $(MAKE) $@) && continue; \
+           exit $$?; \
+       done
+
+uninstall-nls:
+       for pot in $(POTFILES); do \
+           domain=`basename $$pot .pot`; \
+           podir=`dirname $$pot`; \
+           for po in $$podir/*.po; do \
+               lang=`basename $$po .po`; \
+               rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$$domain.mo; \
+           done; \
+       done
+
+autoconf:
+       autoconf -I m4
+
+siglist.c:
+       (cd compat && exec $(MAKE) $@)
+
+depend: siglist.c
+       @if test "$(srcdir)" != "."; then \
+           echo "make depend only supported in the source directory"; \
+           exit 1; \
+       fi; \
+       $(srcdir)/mkdep.pl $(srcdir)/common/Makefile.in \
+           $(srcdir)/compat/Makefile.in $(srcdir)/plugins/sample/Makefile.in \
+           $(srcdir)/plugins/sample_group/Makefile.in \
+           $(srcdir)/plugins/sudoers/Makefile.in \
+           $(srcdir)/src/Makefile.in $(srcdir)/zlib/Makefile.in; \
+       ./config.status --file $(srcdir)/common/Makefile \
+           --file $(srcdir)/compat/Makefile \
+           --file $(srcdir)/plugins/sample/Makefile \
+           --file $(srcdir)/plugins/sample_group/Makefile \
+           --file $(srcdir)/plugins/sudoers/Makefile \
+           --file $(srcdir)/src/Makefile --file $(srcdir)/zlib/Makefile
+
+# The 1.8 branch started February 25, 2011
 ChangeLog:
        if test -d $(srcdir)/.hg && cd $(srcdir); then \
-           if hg log --style=changelog -b 1.7 > $@.tmp && hg log --style=changelog -b default --date '<2010-01-18 00:00:00' >> $@.tmp; then \
+           if hg log --style=changelog -b 1.8 > $@.tmp && hg log --style=changelog -b default --date '<2011-02-25 21:30:00' >> $@.tmp; then \
                mv -f $@.tmp $@; \
            else \
                rm -f $@.tmp; \
            fi; \
        fi
 
-pre-install:
-       @if test -r $(DESTDIR)$(sudoersdir)/sudoers; then \
-           echo "Checking existing sudoers file for syntax errors."; \
-           ./visudo -c -f $(DESTDIR)$(sudoersdir)/sudoers; \
+config.status:
+       @if [ ! -s config.status ]; then \
+               echo "Please run configure first"; \
+               exit 1; \
        fi
 
-install: pre-install install-dirs install-binaries @INSTALL_NOEXEC@ install-sudoers install-doc
-
-install-dirs:
-       $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(sudodir) \
-           $(DESTDIR)$(visudodir) $(DESTDIR)$(noexecdir) \
-           $(DESTDIR)$(sudoersdir) $(DESTDIR)$(docdir) \
-           $(DESTDIR)$(mandirsu) $(DESTDIR)$(mandirform)
-       $(SHELL) $(srcdir)/mkinstalldirs -m 0700 $(DESTDIR)$(timedir)
-
-install-binaries: install-dirs $(PROGS)
-       $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -M 04111 sudo $(DESTDIR)$(sudodir)/sudo
-       rm -f $(DESTDIR)$(sudodir)/sudoedit
-       ln $(DESTDIR)$(sudodir)/sudo $(DESTDIR)$(sudodir)/sudoedit
-       if [ -f sudoreplay ]; then $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -M 0111 sudoreplay $(DESTDIR)$(sudodir)/sudoreplay; fi
-       $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -M 0111 visudo $(DESTDIR)$(visudodir)/visudo
-       if [ -f sesh ]; then $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -M 0111 sesh $(DESTDIR)$(libexecdir)/sesh; fi
-
-install-noexec: install-dirs libsudo_noexec.la
-       if [ -f .libs/lib$(noexecfile) ]; then $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -M 0755 .libs/lib$(noexecfile) $(DESTDIR)$(noexecdir)/$(noexecfile); fi
-
-install-sudoers: install-dirs
-       $(INSTALL) -d -O $(sudoers_uid) -G $(sudoers_gid) -M 0750 \
-           $(DESTDIR)$(sudoersdir)/sudoers.d
-       test -f $(DESTDIR)$(sudoersdir)/sudoers || \
-           $(INSTALL) -O $(sudoers_uid) -G $(sudoers_gid) -M $(sudoers_mode) \
-               sudoers $(DESTDIR)$(sudoersdir)/sudoers
-
-install-doc: install-dirs ChangeLog
-       (cd $(srcdir) && for f in ChangeLog HISTORY LICENSE NEWS README TROUBLESHOOTING UPGRADE sample.*; do $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 $$f $(DESTDIR)$(docdir); done)
-       @LDAP@(cd $(srcdir) && for f in README.LDAP schema.* sudoers2ldif; do $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 $$f $(DESTDIR)$(docdir); done)
-       $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudo.$(mantype) $(DESTDIR)$(mandirsu)/sudo.$(mansectsu)
-       @rm -f $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)
-       ln $(DESTDIR)$(mandirsu)/sudo.$(mansectsu) $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)
-       @REPLAY@$(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudoreplay.$(mantype) $(DESTDIR)$(mandirsu)/sudoreplay.$(mansectsu)
-       $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/visudo.$(mantype) $(DESTDIR)$(mandirsu)/visudo.$(mansectsu)
-       $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudoers.$(mantype) $(DESTDIR)$(mandirform)/sudoers.$(mansectform)
-       @LDAP@$(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudoers.ldap.$(mantype) $(DESTDIR)$(mandirform)/sudoers.ldap.$(mansectform)
-@MAN_POSTINSTALL@
-
-check:
-       @echo nothing to check
-
-clean:
-       -rm -f *.a *.o *.lo stamp-* varsub $(PROGS) testsudoers core *.core core.*
-
-mostlyclean: clean
+libtool: $(LIBTOOL_DEPS)
+       $(SHELL) ./config.status --recheck
+
+Makefile: $(srcdir)/Makefile.in
+       ./config.status --file Makefile
+
+sync-po:
+       rsync -Lrtvz  translationproject.org::tp/latest/sudo/ src/po/
+       rsync -Lrtvz  translationproject.org::tp/latest/sudoers/ plugins/sudoers/po/
+
+update-pot:
+       @if $(XGETTEXT) --help >/dev/null 2>&1; then \
+           cd $(top_srcdir); \
+           for pot in $(POTFILES); do \
+               echo "Updating $$pot"; \
+               domain=`basename $$pot .pot`; \
+               case "$$domain" in \
+                   sudo) cfiles="src/*c common/*c compat/*c";; \
+                   sudoers) cfiles="plugins/sudoers/*.c plugins/sudoers/auth/*.c";; \
+                   *) echo unknown domain $$domain; continue;; \
+               esac; \
+               $(XGETTEXT) $(XGETTEXT_OPTS) -d$$domain $$cfiles -o $$pot.tmp; \
+               if diff -I'^.POT-Creation-Date' $$pot.tmp $$pot >/dev/null; then \
+                   rm -f $$pot.tmp; \
+               else \
+                   mv -f $$pot.tmp $$pot; \
+               fi; \
+           done; \
+       fi
 
-distclean: clean
-       -rm -rf Makefile pathnames.h config.h config.status config.cache \
-               config.log libtool sudoers sudo_noexec.lo .libs $(GENERATED) \
-               sudo.man sudoers.man sudoers.ldap.man sudoreplay.man \
-               visudo.man sudo_usage.h Makefile.binary zlib/zconf.h
+update-po: update-pot
+       @if $(MSGFMT) --help >/dev/null 2>&1; then \
+           cd $(top_srcdir); \
+           for pot in $(POTFILES); do \
+               podir=`dirname $$pot`; \
+               for po in $$podir/*.po; do \
+                   echo $(ECHO_N) "Updating $$po$(ECHO_C)"; \
+                   $(MSGMERGE) --update $$po $$pot; \
+                   $(MSGFMT) --output /dev/null --check-format $$po || exit 1; \
+               done; \
+           done; \
+       fi
 
-clobber: distclean
+compile-po:
+       @if $(MSGFMT) --help >/dev/null 2>&1; then \
+           cd $(top_srcdir); \
+           rm -f Makefile.$$$$; \
+           POFILES=""; \
+           for pot in $(POTFILES); do \
+               podir=`dirname $$pot`; \
+               for po in $$podir/*.po; do \
+                   POFILES="$$POFILES $$po"; \
+               done; \
+           done; \
+           echo "all: `echo $$POFILES | sed 's/\.po/.mo/g'`" >> Makefile.$$$$; \
+           echo "" >> Makefile.$$$$; \
+           for po in $$POFILES; do \
+               mo=`echo $$po | sed 's/po$$/mo/'`; \
+               echo "$$mo: $$po" >> Makefile.$$$$; \
+               echo "  $(MSGFMT) --statistics -c -o $$mo $$po" >> Makefile.$$$$; \
+           done; \
+           make -f Makefile.$$$$; \
+           rm -f Makefile.$$$$; \
+       fi
 
-realclean: distclean
-       rm -f TAGS tags
+install-nls:
+       @if test "$(NLS)" = "enabled"; then \
+           cd $(top_srcdir); \
+           for pot in $(POTFILES); do \
+               podir=`dirname $$pot`; \
+               domain=`basename $$pot .pot`; \
+               echo $(ECHO_N) "Installing $$domain message catalogs:$(ECHO_C)"; \
+               for mo in $$podir/*.mo; do \
+                   lang=`basename $$mo .mo`; \
+                   echo $(ECHO_N) " $$lang$(ECHO_C)"; \
+                   $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
+                   $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0644 $$mo $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$$domain.mo; \
+               done; \
+               echo ""; \
+           done; \
+       fi
 
-cleandir: realclean
+check-dist: update-pot compile-po
+       @if [ -d .hg ]; then \
+           if hg stat -am | grep '\.[mp]ot*$$'; then \
+               echo "Uncommitted message catalog changes" 1>&2; \
+               false; \
+           fi; \
+       fi
 
-dist: ChangeLog
+dist: check-dist ChangeLog $(srcdir)/MANIFEST
        pax -w -x ustar -s '/^/$(PACKAGE_TARNAME)-$(VERSION)\//' \
-           -f ../$(PACKAGE_TARNAME)-$(VERSION).tar $(DISTFILES)
+           -f ../$(PACKAGE_TARNAME)-$(VERSION).tar \
+           `sed 's/[   ].*//' $(srcdir)/MANIFEST`
        gzip -9f ../$(PACKAGE_TARNAME)-$(VERSION).tar
        ls -l ../$(PACKAGE_TARNAME)-$(VERSION).tar.gz
 
@@ -616,8 +266,10 @@ package: sudo.pp
            bindir=$(bindir) \
            sbindir=$(sbindir) \
            libexecdir=$(libexecdir) \
+           includedir=$(includedir) \
            timedir=$(timedir) \
            mandir=$(mandir) \
+           localedir=$(localedir) \
            docdir=$(docdir) \
            sysconfdir=$(sysconfdir) \
            sudoersdir=$(sudoersdir) \
@@ -626,4 +278,24 @@ package: sudo.pp
            sudoers_mode=$(sudoers_mode) \
            version=$(VERSION) $(PPVARS)
 
-.PHONY:        ChangeLog
+clean: config.status
+       for d in $(SUBDIRS) $(SAMPLES); do \
+           (cd $$d && exec $(MAKE) $@); \
+       done
+
+mostlyclean: clean
+
+distclean: config.status
+       for d in $(SUBDIRS) $(SAMPLES); do \
+           (cd $$d && exec $(MAKE) $@); \
+       done
+       -rm -rf Makefile pathnames.h config.h config.status config.cache \
+               config.log libtool stamp-* autom4te.cache
+
+cleandir: distclean
+
+clobber: distclean
+
+realclean: distclean
+
+.PHONY: ChangeLog