[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 27/35: [chem]: Rely on build system to define `PERL`.
From: |
G. Branden Robinson |
Subject: |
[groff] 27/35: [chem]: Rely on build system to define `PERL`. |
Date: |
Tue, 10 Dec 2024 16:35:36 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit cf00457c283d7fd3c6c6bbf888ac2a3fcfce00a3
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Dec 9 02:54:51 2024 -0600
[chem]: Rely on build system to define `PERL`.
* contrib/chem/chem.am (chem): Use sed to replace magic token `@PERL@`
with contents of `PERL` macro, determined by groff configure script.
* contrib/chem/chem.pl: Rewrite shebang line to use the magic token.
---
contrib/chem/ChangeLog | 6 ++++++
contrib/chem/chem.am | 2 +-
contrib/chem/chem.pl | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/contrib/chem/ChangeLog b/contrib/chem/ChangeLog
index ecedb1410..45e37a721 100644
--- a/contrib/chem/ChangeLog
+++ b/contrib/chem/ChangeLog
@@ -1,3 +1,9 @@
+2024-12-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * chem.am (chem): Use sed to replace magic token `@PERL@` with
+ contents of `PERL` macro, determined by groff configure script.
+ * chem.pl: Rewrite shebang line to use the magic token.
+
2023-07-17 G. Branden Robinson <g.branden.robinson@gmail.com>
* chem.pl: Stop endorsing shebang line space myth. See
diff --git a/contrib/chem/chem.am b/contrib/chem/chem.am
index abee480f0..27c977640 100644
--- a/contrib/chem/chem.am
+++ b/contrib/chem/chem.am
@@ -27,7 +27,6 @@ prefixexecbin_SCRIPTS += chem
chempicdir = $(datasubdir)/pic
dist_chempic_DATA = contrib/chem/chem.pic
-
CHEM_GENEXAMPLES = contrib/chem/examples/README
CHEM_EXAMPLES = \
contrib/chem/examples/atp.chem \
@@ -78,6 +77,7 @@ contrib/chem/examples/122/README:
$(chem_srcdir)/examples/122/README.txt
chem: $(chem_srcdir)/chem.pl $(SH_DEPS_SED_SCRIPT)
$(AM_V_GEN)$(RM) $@ \
&& sed -f "$(SH_DEPS_SED_SCRIPT)" \
+ -e "s|[@]PERL[@]|$(PERL)|" \
-e "s|[@]g[@]|$(g)|g" \
-e "s|[@]BINDIR[@]|$(DESTDIR)$(bindir)|g" \
-e "s|[@]MACRODIR[@]|$(DESTDIR)$(tmacdir)|g" \
diff --git a/contrib/chem/chem.pl b/contrib/chem/chem.pl
index 1a2c1b6ff..d91d6ff4a 100755
--- a/contrib/chem/chem.pl
+++ b/contrib/chem/chem.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl
+#!@PERL@
# chem - a groff preprocessor for producing chemical structure diagrams
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 27/35: [chem]: Rely on build system to define `PERL`.,
G. Branden Robinson <=