176 lines
4.9 KiB
Makefile
176 lines
4.9 KiB
Makefile
#
|
|
# 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
|
|
# copyright notice and this permission notice appear in all copies.
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
#
|
|
|
|
srcdir = @srcdir@
|
|
devdir = @devdir@
|
|
top_builddir = @top_builddir@
|
|
top_srcdir = @top_srcdir@
|
|
|
|
# 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@
|
|
|
|
# sudoers owner and mode for package building
|
|
sudoersdir = $(sysconfdir)
|
|
sudoers_uid = @SUDOERS_UID@
|
|
sudoers_gid = @SUDOERS_GID@
|
|
sudoers_mode = @SUDOERS_MODE@
|
|
|
|
SUBDIRS = compat common @ZLIB_SRC@ plugins/sudoers src include doc
|
|
|
|
SAMPLES = plugins/sample plugins/sample_group
|
|
|
|
VERSION = @PACKAGE_VERSION@
|
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
|
|
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
|
|
|
SHELL = @SHELL@
|
|
|
|
all: config.status
|
|
for d in $(SUBDIRS) $(SAMPLES); \
|
|
do (cd $$d && exec $(MAKE) $@) && continue; \
|
|
exit $$?; \
|
|
done
|
|
|
|
check update-po compile-po pre-install: config.status
|
|
for d in $(SUBDIRS); \
|
|
do (cd $$d && exec $(MAKE) $@) && continue; \
|
|
exit $$?; \
|
|
done
|
|
|
|
install-dirs install-binaries install-includes install-plugin install-nls uninstall: config.status pre-install
|
|
for d in $(SUBDIRS); \
|
|
do (cd $$d && exec $(MAKE) $@) && continue; \
|
|
exit $$?; \
|
|
done
|
|
|
|
install install-doc: config.status ChangeLog pre-install
|
|
for d in $(SUBDIRS); \
|
|
do (cd $$d && exec $(MAKE) $@) && continue; \
|
|
exit $$?; \
|
|
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
|
|
|
|
ChangeLog:
|
|
if test -d $(srcdir)/.hg && cd $(srcdir); then \
|
|
if hg log --style=changelog -b default > $@.tmp; then \
|
|
mv -f $@.tmp $@; \
|
|
else \
|
|
rm -f $@.tmp; \
|
|
fi; \
|
|
fi
|
|
|
|
config.status:
|
|
@if [ ! -s config.status ]; then \
|
|
echo "Please run configure first"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
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/
|
|
|
|
dist: ChangeLog $(srcdir)/MANIFEST
|
|
pax -w -x ustar -s '/^/$(PACKAGE_TARNAME)-$(VERSION)\//' \
|
|
-f ../$(PACKAGE_TARNAME)-$(VERSION).tar \
|
|
`sed 's/[ ].*//' $(srcdir)/MANIFEST`
|
|
gzip -9f ../$(PACKAGE_TARNAME)-$(VERSION).tar
|
|
ls -l ../$(PACKAGE_TARNAME)-$(VERSION).tar.gz
|
|
|
|
package: sudo.pp
|
|
DESTDIR=`cd $(top_builddir) && pwd`/destdir; rm -rf $$DESTDIR; \
|
|
$(MAKE) install DESTDIR=$$DESTDIR && \
|
|
$(SHELL) $(srcdir)/pp $(PPFLAGS) \
|
|
--destdir=$$DESTDIR \
|
|
$(srcdir)/sudo.pp \
|
|
bindir=$(bindir) \
|
|
sbindir=$(sbindir) \
|
|
libexecdir=$(libexecdir) \
|
|
includedir=$(includedir) \
|
|
timedir=$(timedir) \
|
|
mandir=$(mandir) \
|
|
localedir=$(localedir) \
|
|
docdir=$(docdir) \
|
|
sysconfdir=$(sysconfdir) \
|
|
sudoersdir=$(sudoersdir) \
|
|
sudoers_uid=$(sudoers_uid) \
|
|
sudoers_gid=$(sudoers_gid) \
|
|
sudoers_mode=$(sudoers_mode) \
|
|
version=$(VERSION) $(PPVARS)
|
|
|
|
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
|