aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-10-26 16:06:37 -0700
committerBen Pfaff <blp@nicira.com>2011-10-26 16:06:37 -0700
commit6ca376775ecae19df72324bb8212e70467795450 (patch)
tree342388b80b4023ab6901045b8ed047fcc2da095a /Makefile.am
parent94512c4abe1062ad18cb32fbf1f4947fda06a9cd (diff)
Implement automatic dependency generation for manpages.
This ensures that manpages actually get rebuilt if any of the lib/*.man fragments that they depend upon are modified.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am16
1 files changed, 15 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 0e2c6d79..d7144282 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,8 +46,10 @@ EXTRA_DIST = \
SubmittingPatches \
WHY-OVS \
boot.sh \
+ build-aux/sodepends.pl \
build-aux/soexpand.pl \
- $(MAN_FRAGMENTS)
+ $(MAN_FRAGMENTS) \
+ $(MAN_ROOTS)
bin_PROGRAMS =
sbin_PROGRAMS =
bin_SCRIPTS =
@@ -61,6 +63,7 @@ INSTALL_DATA_LOCAL =
UNINSTALL_LOCAL =
man_MANS =
MAN_FRAGMENTS =
+MAN_ROOTS =
noinst_DATA =
noinst_HEADERS =
noinst_LIBRARIES =
@@ -160,6 +163,17 @@ manpage-check: $(MANS) $(MAN_FRAGMENTS)
CLEANFILES += manpage-check
endif
+include $(srcdir)/manpages.mk
+$(srcdir)/manpages.mk: $(MAN_ROOTS) build-aux/sodepends.pl
+ @$(PERL) $(srcdir)/build-aux/sodepends.pl -I. -I$(srcdir) $(MAN_ROOTS) >$(@F).tmp
+ @if cmp -s $(@F).tmp $@; then \
+ touch $@; \
+ rm -f $(@F).tmp; \
+ else \
+ mv $(@F).tmp $@; \
+ fi
+CLEANFILES += manpage-dep-check
+
dist-hook: $(DIST_HOOKS)
all-local: $(ALL_LOCAL)
clean-local: $(CLEAN_LOCAL)