summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--doc/Makefile.am6
2 files changed, 8 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 5519b3b..423af03 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,10 @@ See the file COPYING for copying conditions.
included in the build/installation targets of flex since it was
unused.
+*** the distributed man page is only rebuilt when the relevant source
+ files change or when the binary doesn't exist. In particular, this
+ is friendlier to cross compilation. Resolves #108
+
* version 2.6.2 released 2016-10-24
** flex internals
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 882843c..7ad39c7 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,5 +1,7 @@
help2man = @HELP2MAN@
+FLEX = $(top_builddir)/src/flex$(EXEEXT)
+
info_TEXINFOS = flex.texi
dist_man_MANS = flex.1
DISTCLEANFILES = flex.1
@@ -23,8 +25,8 @@ CLEANFILES = \
flex.vr \
flex.vrs
-flex.1: ../src/flex$(EXEEXT)
+flex.1: $(top_srcdir)/configure.ac $(top_srcdir)/src/flex.skl $(top_srcdir)/src/options.c $(top_srcdir)/src/options.h | $(FLEX)
$(help2man) --name='$(PACKAGE_NAME)' --section=1 \
--source='The Flex Project' --manual='Programming' \
- --output=$@ $< \
+ --output=$@ $(FLEX) \
|| rm -f $@