2 # Copyright (c) 2010-2011 Todd C. Miller <Todd.Miller@courtesan.com>
4 # Permission to use, copy, modify, and distribute this software for any
5 # purpose with or without fee is hereby granted, provided that the above
6 # copyright notice and this permission notice appear in all copies.
8 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20 top_builddir = @top_builddir@
21 top_srcdir = @top_srcdir@
23 # Installation paths for package building
25 exec_prefix = @exec_prefix@
28 sysconfdir = @sysconfdir@
29 libexecdir = @libexecdir@
30 includedir = @includedir@
31 datarootdir = @datarootdir@
32 localstatedir = @localstatedir@
37 # sudoers owner and mode for package building
38 sudoersdir = $(sysconfdir)
39 sudoers_uid = @SUDOERS_UID@
40 sudoers_gid = @SUDOERS_GID@
41 sudoers_mode = @SUDOERS_MODE@
43 SUBDIRS = compat common @ZLIB_SRC@ plugins/sudoers src include doc
45 SAMPLES = plugins/sample plugins/sample_group
47 VERSION = @PACKAGE_VERSION@
48 PACKAGE_TARNAME = @PACKAGE_TARNAME@
50 LIBTOOL_DEPS = @LIBTOOL_DEPS@
55 for d in $(SUBDIRS) $(SAMPLES); \
56 do (cd $$d && exec $(MAKE) $@) && continue; \
60 check pre-install: config.status
61 for d in $(SUBDIRS); \
62 do (cd $$d && exec $(MAKE) $@) && continue; \
66 install-dirs install-binaries install-includes install-plugin uninstall: config.status pre-install
67 for d in $(SUBDIRS); \
68 do (cd $$d && exec $(MAKE) $@) && continue; \
72 install install-doc: config.status ChangeLog pre-install
73 for d in $(SUBDIRS); \
74 do (cd $$d && exec $(MAKE) $@) && continue; \
81 # The 1.8 branch started February 25, 2011
83 if test -d $(srcdir)/.hg && cd $(srcdir); then \
84 if hg log --style=changelog -b 1.8 > $@.tmp && hg log --style=changelog -b default --date '<2011-02-25 21:30:00' >> $@.tmp; then \
92 @if [ ! -s config.status ]; then \
93 echo "Please run configure first"; \
97 libtool: $(LIBTOOL_DEPS)
98 $(SHELL) ./config.status --recheck
100 Makefile: $(srcdir)/Makefile.in
101 ./config.status --file Makefile
103 dist: ChangeLog $(srcdir)/MANIFEST
104 pax -w -x ustar -s '/^/$(PACKAGE_TARNAME)-$(VERSION)\//' \
105 -f ../$(PACKAGE_TARNAME)-$(VERSION).tar \
106 `sed 's/[ ].*//' $(srcdir)/MANIFEST`
107 gzip -9f ../$(PACKAGE_TARNAME)-$(VERSION).tar
108 ls -l ../$(PACKAGE_TARNAME)-$(VERSION).tar.gz
111 DESTDIR=`cd $(top_builddir) && pwd`/destdir; rm -rf $$DESTDIR; \
112 $(MAKE) install DESTDIR=$$DESTDIR && \
113 $(SHELL) $(srcdir)/pp $(PPFLAGS) \
114 --destdir=$$DESTDIR \
118 libexecdir=$(libexecdir) \
119 includedir=$(includedir) \
123 sysconfdir=$(sysconfdir) \
124 sudoersdir=$(sudoersdir) \
125 sudoers_uid=$(sudoers_uid) \
126 sudoers_gid=$(sudoers_gid) \
127 sudoers_mode=$(sudoers_mode) \
128 version=$(VERSION) $(PPVARS)
131 for d in $(SUBDIRS) $(SAMPLES); do \
132 (cd $$d && exec $(MAKE) $@); \
137 distclean: config.status
138 for d in $(SUBDIRS) $(SAMPLES); do \
139 (cd $$d && exec $(MAKE) $@); \
141 -rm -rf Makefile pathnames.h config.h config.status config.cache \
142 config.log libtool stamp-* autom4te.cache