[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: [PATCH 2/4] build: look for Perl in configure
From: |
Akim Demaille |
Subject: |
FYI: [PATCH 2/4] build: look for Perl in configure |
Date: |
Sun, 8 Apr 2012 10:21:06 +0200 |
Installed in master.
From 5aaad6c43154f3e69c4e49616d29b1f95b012881 Mon Sep 17 00:00:00 2001
From: Akim Demaille <address@hidden>
Date: Sun, 8 Apr 2012 08:58:43 +0200
Subject: [PATCH 2/5] build: look for Perl in configure.
Bison uses "/usr/bin/perl" or "perl" in several places, and it does
not appear to be a problem. But, at least to make it simpler to
change PERL on the make command line, check for perl in configure.
* configure.ac (PERL): New.
* doc/Doxyfile.in, doc/local.mk, examples/local.mk,
* tests/bison.in: Use it.
---
configure.ac | 4 ++++
doc/Doxyfile.in | 2 +-
doc/local.mk | 3 ++-
examples/local.mk | 1 -
tests/bison.in | 2 +-
5 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index abe2a53..4005b50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,6 +122,10 @@ AC_PROG_GNU_M4
AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
AC_DEFINE_UNQUOTED([M4_GNU_OPTION], ["$M4_GNU"], [Define to "-g" if GNU M4
supports -g, otherwise to "".])
+AC_PATH_PROG([PERL], [perl])
+if test -z "$PERL"; then
+ AC_MSG_ERROR([perl not found])
+fi
AM_MISSING_PROG([HELP2MAN], [help2man])
AC_PATH_PROG([XSLTPROC], [xsltproc])
AC_SUBST([XSLTPROC])
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index 1c2fa95..d9264f0 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -1579,7 +1579,7 @@ EXTERNAL_GROUPS = YES
# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of `which perl').
-PERL_PATH = /usr/bin/perl
+PERL_PATH = @PERL@
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
diff --git a/doc/local.mk b/doc/local.mk
index d5f8d2a..f7a96c2 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -36,7 +36,7 @@ $(CROSS_OPTIONS_TEXI): doc/bison.help $(CROSS_OPTIONS_PL)
$(AM_V_GEN){ test ! -f $@ || cat $@; } >address@hidden
$(AM_V_at)test ! -f address@hidden || rm -f address@hidden
$(AM_V_at)src/bison$(EXEEXT) --help | \
- perl $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >address@hidden
+ $(PERL) $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l
>address@hidden
$(AM_V_at)diff -u address@hidden address@hidden || true
$(AM_V_at)mv address@hidden $@
MAINTAINERCLEANFILES = $(CROSS_OPTIONS_TEXI)
@@ -127,6 +127,7 @@ html-local: doc/Doxyfile
edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
-e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
+ -e 's,@PERL\@,$(PERL),g' \
-e 's,@top_builddir\@,$(top_builddir),g' \
-e 's,@top_srcdir\@,$(top_srcdir),g'
diff --git a/examples/local.mk b/examples/local.mk
index 680edfa..5ab8225 100644
--- a/examples/local.mk
+++ b/examples/local.mk
@@ -22,7 +22,6 @@ TEST_LOG_COMPILER = $(top_srcdir)/examples/test
doc = $(top_srcdir)/doc/bison.texinfo
extexi = $(top_srcdir)/examples/extexi
-PERL = perl
extract = VERSION="$(VERSION)" $(PERL) -f $(extexi) $(doc) --
extracted =
CLEANFILES += $(extracted) examples/extracted.stamp
diff --git a/tests/bison.in b/tests/bison.in
index 651178d..aedd75d 100644
--- a/tests/bison.in
+++ b/tests/bison.in
@@ -19,6 +19,7 @@
abs_top_srcdir='@abs_top_srcdir@'
abs_top_builddir='@abs_top_builddir@'
+: ${PERL='@perl@'}
# Use the shipped files, not those installed.
BISON_PKGDATADIR=$abs_top_srcdir/data
@@ -34,7 +35,6 @@ for i
do
case $i in
*/src/parse-gram.y)
- : ${PERL=perl}
if $PERL --version >/dev/null; then
# We are called by ylwrap which still uses y.tab.*, and
# post-processes the synclines on y.tab.c itself. Don't let it
--
1.7.9.5
- FYI: [PATCH 2/4] build: look for Perl in configure,
Akim Demaille <=