ossp-pkg/snmpdx/Makefile.in
##
## OSSP snmpdx - SNMP Daemon Extension
## Copyright (c) 2003-2007 The OSSP Project <http://www.ossp.org/>
## Copyright (c) 2003-2007 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 2003-2005 Cable & Wireless <http://www.cw.com/>
##
## This file is part of OSSP snmpdx, a SNMP daemon extension which
## can be found at http://www.ossp.org/pkg/tool/snmpdx/.
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version
## 2.0 of the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this file; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
## USA, or contact Ralf S. Engelschall <rse@engelschall.com>.
##
## Makefile.in: build procedure source (syntax: make)
##
@SET_MAKE@
SHELL = /bin/sh
SHTOOL = ./shtool
RM = rm -f
SED = sed
POD2MAN = @PATH_POD2MAN@
PERL = @PATH_PERL@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libdir = @libdir@
sysconfdir = @sysconfdir@
libexecdir = @libexecdir@
includedir = @includedir@
mandir = @mandir@
datadir = @datadir@
localstatedir = @localstatedir@
snmpmibdir = @snmpmibdir@
openpkg = @openpkg@
DESTDIR =
all: snmpdx snmpdx.cfg snmpdx.8
snmpdx: snmpdx.pl
@$(SHTOOL) echo -e "%Bgenerating snmpdx%b"
V=`$(SHTOOL) version -l txt -d short VERSION`; \
D=`$(SHTOOL) version -l txt -d long VERSION | $(SED) -e 's;.*(;;' -e 's;).*;;'`; \
$(SED) \
-e "s;#!\@PERL\@;#!$(PERL);" \
-e "s;\@V\@;$$V;" \
-e "s;\@D\@;$$D;" \
-e "s;\@bindir\@;$(bindir);" \
-e "s;\@sysconfdir\@;$(sysconfdir);" \
-e "s;\@libexecdir\@;$(libexecdir);" \
-e "s;\@datadir\@;$(datadir);" \
-e "s;\@localstatedir\@;$(localstatedir);" \
-e "s;\@snmpmibdir\@;$(snmpmibdir);" \
-e "s;\@openpkg\@;$(openpkg);" \
<snmpdx.pl >snmpdx && \
chmod a+x snmpdx
snmpdx.cfg: snmpdx.cfg.in
@$(SHTOOL) echo -e "%Bgenerating snmpdx.cfg%b"
$(SED) \
-e 's;\@libexecdir\@;$(libexecdir);g' \
-e 's;\@datadir\@;$(datadir);g' \
-e 's;\@localstatedir\@;$(localstatedir);g' \
-e "s;\@snmpmibdir\@;$(snmpmibdir);" \
-e "s;\@openpkg\@;$(openpkg);" \
<snmpdx.cfg.in >snmpdx.cfg
snmpdx.8: snmpdx.pod
@$(SHTOOL) echo -e "%Bgenerating snmpdx.8%b"
V=`$(SHTOOL) version -l txt -d short VERSION`; \
D=`$(SHTOOL) version -l txt -d long VERSION | $(SED) -e 's;.*(;;' -e 's;).*;;'`; \
$(POD2MAN) --section=8 --center="SNMP Daemon Extension" \
--release="$$D" --date="OSSP snmpdx $$V" snmpdx.pod >snmpdx.8
install: all
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(sbindir)
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(sysconfdir)/snmpdx
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(datadir)/snmpdx
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(libexecdir)/snmpdx
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man8
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(localstatedir)/snmpdx
$(SHTOOL) install -c -m 755 snmpdx $(DESTDIR)$(sbindir)/snmpdx
$(SHTOOL) install -c -m 644 snmpdx.cfg $(DESTDIR)$(sysconfdir)/snmpdx/snmpdx.cfg
$(SHTOOL) install -c -m 644 snmpdx.mib/*.mib $(DESTDIR)$(datadir)/snmpdx/
$(SHTOOL) install -c -m 644 snmpdx.d/*.pm $(DESTDIR)$(libexecdir)/snmpdx/
$(SHTOOL) install -c -m 644 snmpdx.8 $(DESTDIR)$(mandir)/man8/snmpdx.8
clean:
$(RM) snmpdx snmpdx.cfg snmpdx.8
distclean: clean
$(RM) config.cache config.status config.log
$(RM) Makefile