mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-15 15:27:00 +00:00
make binary exec path dynamic in scripts referring to it
Everything should just work out of the box without poking. This change makes that goal to be yet agian one step closer. In same go make all autotools related variable substitutions better. Requested-by: Martijn van Brummelen <martijn@brumit.nl> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
c30c122027
commit
2528c4c9d6
12 changed files with 45 additions and 13 deletions
28
Makefile.am
28
Makefile.am
|
|
@ -16,9 +16,35 @@ $(top_srcdir)/.version:
|
|||
dist-hook:
|
||||
echo $(VERSION) > $(distdir)/.tarball-version
|
||||
|
||||
CLEANFILES =
|
||||
PATHFILES =
|
||||
CLEANFILES = $(PATHFILES)
|
||||
EXTRA_DIST += $(PATHFILES:=.in)
|
||||
CLEAN_LOCALS =
|
||||
|
||||
edit_cmd = sed \
|
||||
-e 's|@ALARM_CRIT[@]|$(ALARM_CRIT)|g' \
|
||||
-e 's|@ALARM_WARN[@]|$(ALARM_WARN)|g' \
|
||||
-e 's|@DHCPDCONF_FILE[@]|$(DHCPDCONF_FILE)|g' \
|
||||
-e 's|@DHCPDLEASE_FILE[@]|$(DHCPDLEASE_FILE)|g' \
|
||||
-e 's|@OUTPUT_FORMAT[@]|$(OUTPUT_FORMAT)|g' \
|
||||
-e 's|@OUTPUT_LIMIT[@]|$(OUTPUT_LIMIT)|g' \
|
||||
-e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
|
||||
-e 's|@PACKAGE_MAINTAINER[@]|$(PACKAGE_MAINTAINER)|g' \
|
||||
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
|
||||
-e 's|@PACKAGE_URL[@]|$(PACKAGE_URL)|g' \
|
||||
-e 's|@SHELL[@]|$(SHELL)|g' \
|
||||
-e 's|@VERSION[@]|$(VERSION)|g' \
|
||||
-e 's|@bindir[@]|$(bindir)|g' \
|
||||
-e 's|@top_srcdir[@]|$(top_srcdir)|g'
|
||||
|
||||
$(PATHFILES): Makefile
|
||||
@ rm -f $@ $@.tmp
|
||||
$(AM_V_at) test -d $(dir $@) || mkdir -p $(dir $@)
|
||||
$(AM_V_GEN) srcdir=''; \
|
||||
test -f ./$@.in || srcdir=$(srcdir)/; \
|
||||
$(edit_cmd) $${srcdir}$@.in >$@.tmp
|
||||
@ mv $@.tmp $@
|
||||
|
||||
include contrib/Makemodule.am
|
||||
include doc/Makemodule.am
|
||||
include man/Makemodule.am
|
||||
|
|
|
|||
|
|
@ -134,8 +134,7 @@ AM_CONDITIONAL([ENABLE_DOXYGEN], [test "x$enable_doxygen" = "xyes"])
|
|||
AS_IF([test x$enable_doxygen = xyes], [
|
||||
AC_CHECK_PROGS([DOXYGEN], [doxygen])
|
||||
AS_IF([test "x$DOXYGEN" = "x"],
|
||||
AC_MSG_ERROR([doxygen not in path]),
|
||||
AC_CONFIG_FILES([doc/doxy.conf])
|
||||
AC_MSG_ERROR([doxygen not in path])
|
||||
)
|
||||
|
||||
AC_CHECK_PROGS([DOXYGEN_DOT], [dot])
|
||||
|
|
@ -149,7 +148,6 @@ AM_CONDITIONAL([HAVE_DOXYGEN_DOT], [test "x$DOXYGEN_DOT" != "x"])
|
|||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
lib/Makefile
|
||||
man/dhcpd-pools.1
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
|
|
|
|||
2
contrib/.gitignore
vendored
Normal file
2
contrib/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/dhcpd-pools.cgi
|
||||
/nagios.conf
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
contribdir = $(datadir)/dhcpd-pools/
|
||||
PATHFILES += contrib/dhcpd-pools.cgi contrib/nagios.conf
|
||||
dist_contrib_SCRIPTS = contrib/dhcpd-pools.cgi contrib/snmptest.pl
|
||||
EXTRA_DIST += contrib/nagios.conf contrib/munin_plugins
|
||||
dist_contrib_DATA = contrib/nagios.conf
|
||||
EXTRA_DIST += contrib/munin_plugins
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!@SHELL@
|
||||
#
|
||||
# Simple CGI for dhcpd-pools.
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ echo "<p>This was situation at "
|
|||
date
|
||||
echo "</p>"
|
||||
|
||||
/usr/local/bin/dhcpd-pools --format html
|
||||
@bindir@/dhcpd-pools --format html
|
||||
|
||||
echo "</body>"
|
||||
echo "</html>"
|
||||
|
|
@ -1 +0,0 @@
|
|||
command[check_dhcpd_pools]=/usr/bin/dhcpd-pools --warning $ARG1$ --critical $ARG2$
|
||||
1
contrib/nagios.conf.in
Normal file
1
contrib/nagios.conf.in
Normal file
|
|
@ -0,0 +1 @@
|
|||
command[check_dhcpd_pools]=@bindir@/dhcpd-pools --warning $ARG1$ --critical $ARG2$
|
||||
1
doc/.gitignore
vendored
Normal file
1
doc/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/doxy.conf
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
PATHFILES += \
|
||||
doc/doxy.conf
|
||||
nodist_noinst_DATA = \
|
||||
doc/doxy.conf
|
||||
|
||||
EXTRA_DIST += \
|
||||
doc/doxy.conf.in \
|
||||
doc/introduction.dox
|
||||
|
||||
if ENABLE_DOXYGEN
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ PROJECT_NAME = @PACKAGE_NAME@
|
|||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = @PACKAGE_VERSION@
|
||||
PROJECT_NUMBER = @VERSION@
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
man_MANS = man/dhcpd-pools.1
|
||||
EXTRA_DIST += man/dhcpd-pools.1.in
|
||||
CLEANFILES += man/dhcpd-pools.1
|
||||
PATHFILES += man/dhcpd-pools.1
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.TH DHCPD-POOLS "1" "2015-09-04" "@PACKAGE_STRING@" "User Commands"
|
||||
.TH DHCPD-POOLS "1" "2015-09-04" "@VERSION@" "User Commands"
|
||||
.SH NAME
|
||||
dhcpd-pools \- ISC dhcpd pools usage analysis
|
||||
.SH SYNOPSIS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue