Merge commit 'upstream/1.8.1p2'
[debian/sudo] / Makefile.in
1 #
2 # Copyright (c) 2010-2011 Todd C. Miller <Todd.Miller@courtesan.com>
3 #
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.
7 #
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.
16 #
17
18 srcdir = @srcdir@
19 devdir = @devdir@
20 top_builddir = @top_builddir@
21 top_srcdir = @top_srcdir@
22
23 # Installation paths for package building
24 prefix = @prefix@
25 exec_prefix = @exec_prefix@
26 bindir = @bindir@
27 sbindir = @sbindir@
28 sysconfdir = @sysconfdir@
29 libexecdir = @libexecdir@
30 includedir = @includedir@
31 datarootdir = @datarootdir@
32 localstatedir = @localstatedir@
33 docdir = @docdir@
34 mandir = @mandir@
35 timedir = @timedir@
36
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@
42
43 SUBDIRS = compat common @ZLIB_SRC@ plugins/sudoers src include doc
44
45 SAMPLES = plugins/sample plugins/sample_group
46
47 VERSION = @PACKAGE_VERSION@
48 PACKAGE_TARNAME = @PACKAGE_TARNAME@
49
50 LIBTOOL_DEPS = @LIBTOOL_DEPS@
51
52 SHELL = @SHELL@
53
54 all: config.status
55         for d in $(SUBDIRS) $(SAMPLES); \
56             do (cd $$d && exec $(MAKE) $@) && continue; \
57             exit $$?; \
58         done
59
60 check pre-install: config.status
61         for d in $(SUBDIRS); \
62             do (cd $$d && exec $(MAKE) $@) && continue; \
63             exit $$?; \
64         done
65
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; \
69             exit $$?; \
70         done
71
72 install install-doc: config.status ChangeLog pre-install
73         for d in $(SUBDIRS); \
74             do (cd $$d && exec $(MAKE) $@) && continue; \
75             exit $$?; \
76         done
77
78 autoconf:
79         autoconf -I m4
80
81 # The 1.8 branch started February 25, 2011
82 ChangeLog:
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 \
85                 mv -f $@.tmp $@; \
86             else \
87                 rm -f $@.tmp; \
88             fi; \
89         fi
90
91 config.status:
92         @if [ ! -s config.status ]; then \
93                 echo "Please run configure first"; \
94                 exit 1; \
95         fi
96
97 libtool: $(LIBTOOL_DEPS)
98         $(SHELL) ./config.status --recheck
99
100 Makefile: $(srcdir)/Makefile.in
101         ./config.status --file Makefile
102
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
109
110 package: sudo.pp
111         DESTDIR=`cd $(top_builddir) && pwd`/destdir; rm -rf $$DESTDIR; \
112         $(MAKE) install DESTDIR=$$DESTDIR && \
113         $(SHELL) $(srcdir)/pp $(PPFLAGS) \
114             --destdir=$$DESTDIR \
115             $(srcdir)/sudo.pp \
116             bindir=$(bindir) \
117             sbindir=$(sbindir) \
118             libexecdir=$(libexecdir) \
119             includedir=$(includedir) \
120             timedir=$(timedir) \
121             mandir=$(mandir) \
122             docdir=$(docdir) \
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)
129
130 clean: config.status
131         for d in $(SUBDIRS) $(SAMPLES); do \
132             (cd $$d && exec $(MAKE) $@); \
133         done
134
135 mostlyclean: clean
136
137 distclean: config.status
138         for d in $(SUBDIRS) $(SAMPLES); do \
139             (cd $$d && exec $(MAKE) $@); \
140         done
141         -rm -rf Makefile pathnames.h config.h config.status config.cache \
142                 config.log libtool stamp-* autom4te.cache
143
144 cleandir: distclean
145
146 clobber: distclean
147
148 realclean: distclean
149
150 .PHONY: ChangeLog