2010-02-21 13:37:52 -05:00
|
|
|
#
|
|
|
|
# Copyright (c) 2010 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.
|
|
|
|
#
|
|
|
|
# @configure_input@
|
|
|
|
#
|
|
|
|
|
|
|
|
#### Start of system configuration section. ####
|
|
|
|
|
|
|
|
srcdir = @srcdir@
|
|
|
|
top_builddir = @top_builddir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
|
|
|
|
# Tools to use
|
2010-06-04 09:40:01 -04:00
|
|
|
NROFF = @NROFFPROG@ -Tascii
|
2010-02-21 13:37:52 -05:00
|
|
|
|
|
|
|
# Our install program supports extra flags...
|
|
|
|
INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
|
|
|
|
|
|
|
|
# Where to install things...
|
|
|
|
prefix = @prefix@
|
|
|
|
datarootdir = @datarootdir@
|
|
|
|
mandir = @mandir@
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
#### End of system configuration section. ####
|
|
|
|
|
2010-05-21 21:29:44 -04:00
|
|
|
SHELL = @SHELL@
|
2010-02-21 13:37:52 -05:00
|
|
|
|
|
|
|
DOCS = sudo.man visudo.man sudoers.man sudoers.ldap.man sudoers.man \
|
2010-02-21 21:24:20 -05:00
|
|
|
sudoreplay.man sudo_plugin.man
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
@DEV@DEVDOCS = $(srcdir)/sudo.man.in $(srcdir)/sudo.cat \
|
|
|
|
$(srcdir)/visudo.man.in $(srcdir)/visudo.cat \
|
|
|
|
$(srcdir)/sudoers.man.in $(srcdir)/sudoers.cat \
|
|
|
|
$(srcdir)/sudoers.ldap.man.in $(srcdir)/sudoers.ldap.cat \
|
|
|
|
$(srcdir)/sudoers.man.in $(srcdir)/sudoers.cat \
|
|
|
|
$(srcdir)/sudoreplay.man.in $(srcdir)/sudoreplay.cat \
|
|
|
|
$(srcdir)/sudo_plugin.man.in $(srcdir)/sudo_plugin.cat \
|
|
|
|
$(srcdir)/HISTORY $(srcdir)/LICENSE
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
VERSION = @PACKAGE_VERSION@
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
all: $(DEVDOCS) $(DOCS)
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
.SUFFIXES:
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
varsub: $(top_srcdir)/configure.in
|
|
|
|
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;}' $(top_srcdir)/configure.in | sed -e '/^#/d' -e 's/^/s#@/' -e 's/=[\\"]*/@#/' -e 's/[\\"]*$$/#g/' >> $@
|
2010-04-08 20:08:30 -04:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
$(srcdir)/sudo.man.in: $(srcdir)/sudo.pod
|
|
|
|
@rm -f $(srcdir)/$@
|
|
|
|
( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudo.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudo.pod | sed -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" | perl -p sudo.man.pl >> $@ )
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-04-04 14:01:21 -04:00
|
|
|
sudo.man: $(srcdir)/sudo.man.in
|
2010-05-24 12:25:20 -04:00
|
|
|
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
$(srcdir)/sudo.cat: varsub $(srcdir)/sudo.man.in
|
|
|
|
sed -f varsub $(srcdir)/sudo.man.in | $(NROFF) -man > $@
|
2010-04-08 20:08:30 -04:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
visudo.man.in: $(srcdir)/visudo.man.in
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
$(srcdir)/visudo.man.in: $(srcdir)/visudo.pod
|
|
|
|
@rm -f $(srcdir)/$@
|
|
|
|
( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' visudo.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" visudo.pod | sed -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" -e 's|\\fI\\f\((CW*\)*I@\([^@]*\)\\fI@|\\fI@\2@|g' >> $@ )
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-04-04 14:01:21 -04:00
|
|
|
visudo.man: $(srcdir)/visudo.man.in
|
2010-05-24 12:25:20 -04:00
|
|
|
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
$(srcdir)/visudo.cat: varsub $(srcdir)/visudo.man.in
|
|
|
|
sed -f varsub $(srcdir)/visudo.man.in | $(NROFF) -man > $@
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
sudoers.man.in: $(srcdir)/sudoers.man.in
|
2010-04-08 20:08:30 -04:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
$(srcdir)/sudoers.man.in: $(srcdir)/sudoers.pod
|
|
|
|
@rm -f $(srcdir)/$@
|
|
|
|
( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudoers.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudoers.pod | sed -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" | perl -p sudoers.man.pl >> $@ )
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
sudoers.man: $(srcdir)/sudoers.man.in
|
2010-05-24 12:25:20 -04:00
|
|
|
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
$(srcdir)/sudoers.cat: varsub $(srcdir)/sudoers.man.in
|
|
|
|
sed -f varsub $(srcdir)/sudoers.man.in | $(NROFF) -man > $@
|
2010-04-08 20:08:30 -04:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
sudoers.ldap.man.in: $(srcdir)/sudoers.ldap.man.in
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
$(srcdir)/sudoers.ldap.man.in: $(srcdir)/sudoers.ldap.pod
|
|
|
|
@rm -f $(srcdir)/$@
|
|
|
|
( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudoers.ldap.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudoers.ldap.pod | sed -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" -e 's|\\fI\\f\((CW*\)*I@\([^@]*\)\\fI@|\\fI@\2@|g' >> $@ )
|
2010-04-08 20:08:30 -04:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
sudoers.ldap.man: $(srcdir)/sudoers.ldap.man.in
|
2010-05-24 12:25:20 -04:00
|
|
|
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
$(srcdir)/sudoers.ldap.cat: varsub $(srcdir)/sudoers.ldap.man.in
|
|
|
|
sed -f varsub $(srcdir)/sudoers.ldap.man.in | $(NROFF) -man > $@
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
sudoreplay.man.in: $(srcdir)/sudoreplay.man.in
|
2010-04-08 20:08:30 -04:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
$(srcdir)/sudoreplay.man.in: $(srcdir)/sudoreplay.pod
|
|
|
|
@rm -f $(srcdir)/$@
|
|
|
|
( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudoreplay.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudoreplay.pod | sed -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" -e 's|\\fI\\f\((CW*\)*I@\([^@]*\)\\fI@|\\fI@\2@|g' >> $@ )
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
sudoreplay.man: $(srcdir)/sudoreplay.man.in
|
2010-05-24 12:25:20 -04:00
|
|
|
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
$(srcdir)/sudoreplay.cat: varsub $(srcdir)/sudoreplay.man.in
|
|
|
|
sed -f varsub $(srcdir)/sudoreplay.man.in | $(NROFF) -man > $@
|
2010-02-21 21:24:20 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
sudo_plugin.man.in: $(srcdir)/sudo_plugin.man.in
|
2010-04-08 20:08:30 -04:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
$(srcdir)/sudo_plugin.man.in: $(srcdir)/sudo_plugin.pod
|
|
|
|
@rm -f $(srcdir)/$@
|
|
|
|
( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; sed -n -e '/^=pod/q' -e 's/^/.\\" /p' sudo_plugin.pod > $@; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudo_plugin.pod | sed -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" -e 's|\\fI\\f\((CW*\)*I@\([^@]*\)\\fI@|\\fI@\2@|g' >> $@ )
|
2010-02-21 21:24:20 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
sudo_plugin.man: $(srcdir)/sudo_plugin.man.in
|
2010-05-24 12:25:20 -04:00
|
|
|
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
|
2010-02-21 21:24:20 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
$(srcdir)/sudo_plugin.cat: varsub $(srcdir)/sudo_plugin.man.in
|
|
|
|
sed -f varsub $(srcdir)/sudo_plugin.man.in | $(NROFF) -man > $@
|
2010-04-08 20:08:30 -04:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
HISTORY: history.pod
|
|
|
|
pod2text -l -i0 $> > $@
|
2010-02-21 13:37:52 -05:00
|
|
|
|
2010-06-11 18:34:24 -04:00
|
|
|
LICENSE: license.pod
|
|
|
|
pod2text -l -i0 $> | sed '1,2d' > $@
|
2010-02-21 13:37:52 -05:00
|
|
|
|
|
|
|
install: install-dirs install-man
|
|
|
|
|
|
|
|
install-dirs:
|
|
|
|
$(SHELL) $(top_srcdir)/mkinstalldirs \
|
2010-05-11 10:07:12 -04:00
|
|
|
$(DESTDIR)$(mandirsu) $(DESTDIR)$(mandirform)
|
2010-02-21 13:37:52 -05:00
|
|
|
|
|
|
|
install-binaries:
|
|
|
|
|
2010-05-21 15:31:36 -04:00
|
|
|
install-includes:
|
|
|
|
|
2010-02-21 13:37:52 -05:00
|
|
|
install-man: install-dirs
|
|
|
|
$(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)
|
2010-05-05 16:19:02 -04:00
|
|
|
$(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudo_plugin.$(mantype) $(DESTDIR)$(mandirsu)/sudo_plugin.$(mansectsu)
|
2010-04-04 12:31:57 -04:00
|
|
|
$(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudoreplay.$(mantype) $(DESTDIR)$(mandirsu)/sudoreplay.$(mansectsu)
|
2010-02-21 13:37:52 -05:00
|
|
|
$(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@
|
|
|
|
|
2010-05-21 15:31:36 -04:00
|
|
|
install-plugin:
|
|
|
|
|
2010-02-21 13:37:52 -05:00
|
|
|
check:
|
|
|
|
@echo nothing to check
|
|
|
|
|
|
|
|
clean:
|
2010-06-11 18:34:24 -04:00
|
|
|
-rm -f varsub
|
2010-02-21 13:37:52 -05:00
|
|
|
|
|
|
|
mostlyclean: clean
|
|
|
|
|
|
|
|
distclean: clean
|
2010-02-21 16:12:01 -05:00
|
|
|
-rm -rf Makefile config.log *.man
|
2010-02-21 13:37:52 -05:00
|
|
|
|
|
|
|
clobber: distclean
|
|
|
|
|
|
|
|
realclean: distclean
|
|
|
|
|
|
|
|
cleandir: distclean
|