mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 07:47:00 +00:00
build-sys: use non-recursive build
For reasons see excellent paper 'Recursive Make Considered Harmful' by Peter Miller. References: http://miller.emu.id.au/pmiller/books/rmch/ Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
0495ea4edf
commit
30238e9d1c
18 changed files with 102 additions and 115 deletions
38
.gitignore
vendored
38
.gitignore
vendored
|
|
@ -1,30 +1,30 @@
|
|||
/.tarball-version
|
||||
# Wildcard + in any subdir.
|
||||
*.o
|
||||
|
||||
# Exact filename in any subdir.
|
||||
.deps
|
||||
.dirstamp
|
||||
Makefile
|
||||
Makefile.in
|
||||
|
||||
# Exact wildcard, e.g., not in subdirs.
|
||||
/tests/*.log
|
||||
/tests/*.trs
|
||||
|
||||
# Exact match, if a directory then everything in directory.
|
||||
/.version
|
||||
/aclocal.m4
|
||||
/autom4te.cache/
|
||||
/autoscan.log
|
||||
/config.guess
|
||||
/config.h
|
||||
/config.h.in
|
||||
/config.h.in~
|
||||
/config.log
|
||||
/config.status
|
||||
/config.sub
|
||||
/configure
|
||||
/configure.scan
|
||||
/contrib/Makefile
|
||||
/contrib/Makefile.in
|
||||
/depcomp
|
||||
/gnulib/
|
||||
/dhcpd-pools
|
||||
/INSTALL
|
||||
/install-sh
|
||||
/libtool
|
||||
/ltmain.sh
|
||||
/m4
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/man/Makefile
|
||||
/man/Makefile.in
|
||||
/missing
|
||||
/m4/
|
||||
/man/dhcpd-pools.1
|
||||
/stamp-h1
|
||||
/tags
|
||||
/test-suite.log
|
||||
/tests/outputs/
|
||||
|
|
|
|||
13
Makefile.am
13
Makefile.am
|
|
@ -8,10 +8,21 @@ EXTRA_DIST = \
|
|||
build-aux/git-version-gen \
|
||||
m4/gnulib-cache.m4
|
||||
|
||||
SUBDIRS = doc lib src man tests contrib
|
||||
SUBDIRS = lib
|
||||
|
||||
BUILT_SOURCES = $(top_srcdir)/.version
|
||||
$(top_srcdir)/.version:
|
||||
echo $(VERSION) > $@-t && mv $@-t $@
|
||||
dist-hook:
|
||||
echo $(VERSION) > $(distdir)/.tarball-version
|
||||
|
||||
CLEANFILES =
|
||||
CLEAN_LOCALS =
|
||||
|
||||
include contrib/Makemodule.am
|
||||
include doc/Makemodule.am
|
||||
include man/Makemodule.am
|
||||
include src/Makemodule.am
|
||||
include tests/Makemodule.am
|
||||
|
||||
clean-local: $(CLEAN_LOCALS)
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ AC_INIT([dhcpd-pools],
|
|||
PACKAGE_MAINTAINER="Sami Kerola"
|
||||
AC_SUBST([PACKAGE_MAINTAINER])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AM_INIT_AUTOMAKE([-Wall -Wextra-portability foreign 1.10 tar-pax no-dist-gzip dist-xz
|
||||
parallel-tests])
|
||||
AM_INIT_AUTOMAKE([-Wall -Wextra-portability foreign 1.10 tar-pax
|
||||
no-dist-gzip dist-xz parallel-tests subdir-objects])
|
||||
AC_CONFIG_SRCDIR([src/dhcpd-pools.h])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
|
|
@ -143,12 +143,7 @@ AM_CONDITIONAL([HAVE_DOXYGEN_DOT], [test "x$DOXYGEN_DOT" != "x"])
|
|||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
lib/Makefile
|
||||
src/Makefile
|
||||
man/Makefile
|
||||
man/dhcpd-pools.1
|
||||
tests/Makefile
|
||||
doc/Makefile
|
||||
contrib/Makefile
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
contribdir = $(datadir)/dhcpd-pools/
|
||||
dist_contrib_SCRIPTS = dhcpd-pools.cgi snmptest.pl
|
||||
EXTRA_DIST = nagios.conf munin_plugins
|
||||
3
contrib/Makemodule.am
Normal file
3
contrib/Makemodule.am
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
contribdir = $(datadir)/dhcpd-pools/
|
||||
dist_contrib_SCRIPTS = contrib/dhcpd-pools.cgi contrib/snmptest.pl
|
||||
EXTRA_DIST += contrib/nagios.conf contrib/munin_plugins
|
||||
5
doc/.gitignore
vendored
5
doc/.gitignore
vendored
|
|
@ -1,5 +0,0 @@
|
|||
/Makefile
|
||||
/Makefile.in
|
||||
/doxy.conf
|
||||
/doxyfile.stamp
|
||||
/html
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
EXTRA_DIST = doxy.conf.in introduction.dox
|
||||
|
||||
if ENABLE_DOXYGEN
|
||||
|
||||
doxyfile.stamp:
|
||||
$(DOXYGEN) doxy.conf
|
||||
date > doxyfile.stamp
|
||||
|
||||
CLEANFILES = doxyfile.stamp
|
||||
|
||||
all-local: doxyfile.stamp
|
||||
|
||||
clean-local: clean-local-check
|
||||
.PHONY: clean-local-check
|
||||
clean-local-check:
|
||||
-rm -rf html
|
||||
|
||||
endif
|
||||
20
doc/Makemodule.am
Normal file
20
doc/Makemodule.am
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
EXTRA_DIST += \
|
||||
doc/doxy.conf.in \
|
||||
doc/introduction.dox
|
||||
|
||||
if ENABLE_DOXYGEN
|
||||
|
||||
doxyfile.stamp:
|
||||
$(DOXYGEN) doc/doxy.conf
|
||||
date > doc/doxyfile.stamp
|
||||
|
||||
CLEANFILES += doc/doxyfile.stamp
|
||||
|
||||
all-local: doc/doxyfile.stamp
|
||||
|
||||
clean-local-doc:
|
||||
-rm -rf doc/*html
|
||||
|
||||
CLEAN_LOCALS += clean-local-doc
|
||||
|
||||
endif
|
||||
1
man/.gitignore
vendored
1
man/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
/dhcpd-pools.1
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
man_MANS = dhcpd-pools.1
|
||||
EXTRA_DIST = dhcpd-pools.1.in
|
||||
CLEANFILES = dhcpd-pools.1
|
||||
3
man/Makemodule.am
Normal file
3
man/Makemodule.am
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
man_MANS = man/dhcpd-pools.1
|
||||
EXTRA_DIST += man/dhcpd-pools.1.in
|
||||
CLEANFILES += man/dhcpd-pools.1
|
||||
12
src/.gitignore
vendored
12
src/.gitignore
vendored
|
|
@ -1,12 +0,0 @@
|
|||
gmon.out
|
||||
gmon.sum
|
||||
*.c.gcov
|
||||
*.gcda
|
||||
*.gcno
|
||||
*~
|
||||
*.o
|
||||
.deps/
|
||||
dhcpd-pools
|
||||
Makefile
|
||||
Makefile.in
|
||||
tags
|
||||
|
|
@ -7,12 +7,12 @@ AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib -I$(top_builddir)/lib
|
|||
dhcpd_pools_LDADD = $(top_builddir)/lib/libdhcpd_pools.la
|
||||
|
||||
dhcpd_pools_SOURCES = \
|
||||
analyze.c \
|
||||
defaults.h \
|
||||
dhcpd-pools.c \
|
||||
dhcpd-pools.h \
|
||||
getdata.c \
|
||||
hash.c \
|
||||
other.c \
|
||||
output.c \
|
||||
sort.c
|
||||
src/analyze.c \
|
||||
src/defaults.h \
|
||||
src/dhcpd-pools.c \
|
||||
src/dhcpd-pools.h \
|
||||
src/getdata.c \
|
||||
src/hash.c \
|
||||
src/other.c \
|
||||
src/output.c \
|
||||
src/sort.c
|
||||
5
tests/.gitignore
vendored
5
tests/.gitignore
vendored
|
|
@ -1,5 +0,0 @@
|
|||
/Makefile
|
||||
/Makefile.in
|
||||
/outputs
|
||||
/*.log
|
||||
/*.trs
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
TESTS = \
|
||||
bootp \
|
||||
complete \
|
||||
empty \
|
||||
full-json \
|
||||
leading0 \
|
||||
one-ip \
|
||||
same-twice \
|
||||
simple \
|
||||
v6
|
||||
|
||||
EXTRA_DIST = \
|
||||
confs \
|
||||
expected \
|
||||
leases \
|
||||
test.sh \
|
||||
$(TESTS)
|
||||
|
||||
TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=../src$(PATH_SEPARATOR)$$PATH
|
||||
|
||||
check-local: $(SHELL) $(top_srcdir)/tests/test.sh
|
||||
|
||||
clean-local:
|
||||
rm -rf $(top_builddir)/tests/outputs
|
||||
26
tests/Makemodule.am
Normal file
26
tests/Makemodule.am
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
TESTS = \
|
||||
tests/bootp \
|
||||
tests/complete \
|
||||
tests/empty \
|
||||
tests/full-json \
|
||||
tests/leading0 \
|
||||
tests/one-ip \
|
||||
tests/same-twice \
|
||||
tests/simple \
|
||||
tests/v6
|
||||
|
||||
EXTRA_DIST += \
|
||||
tests/confs \
|
||||
tests/expected \
|
||||
tests/leases \
|
||||
tests/test.sh \
|
||||
$(TESTS)
|
||||
|
||||
TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=$(top_builddir)$(PATH_SEPARATOR)$$PATH
|
||||
|
||||
check-local: $(SHELL) $(top_srcdir)/tests/test.sh
|
||||
|
||||
clean-local-tests:
|
||||
rm -rf $(top_builddir)/tests/outputs
|
||||
|
||||
CLEAN_LOCALS += clean-local-tests
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
#
|
||||
# Minimal regression test suite.
|
||||
|
||||
if [ ! -d outputs ]; then
|
||||
mkdir outputs
|
||||
if [ ! -d tests/outputs ]; then
|
||||
mkdir tests/outputs
|
||||
fi
|
||||
|
||||
dhcpd-pools -f J -c $top_srcdir/tests/confs/same-twice \
|
||||
-l $top_srcdir/tests/leases/same-twice \
|
||||
-o outputs/same-twice-json
|
||||
diff -u $top_srcdir/tests/expected/same-twice-json outputs/same-twice-json
|
||||
-o tests/outputs/same-twice-json
|
||||
diff -u $top_srcdir/tests/expected/same-twice-json tests/outputs/same-twice-json
|
||||
exit $?
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
IAM=$(basename $0)
|
||||
|
||||
if [ ! -d outputs ]; then
|
||||
mkdir outputs
|
||||
if [ ! -d tests/outputs ]; then
|
||||
mkdir tests/outputs
|
||||
fi
|
||||
|
||||
dhcpd-pools -c $top_srcdir/tests/confs/$IAM \
|
||||
-l $top_srcdir/tests/leases/$IAM -o outputs/$IAM
|
||||
diff -u $top_srcdir/tests/expected/$IAM outputs/$IAM
|
||||
-l $top_srcdir/tests/leases/$IAM -o tests/outputs/$IAM
|
||||
diff -u $top_srcdir/tests/expected/$IAM tests/outputs/$IAM
|
||||
exit $?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue