groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 05/16: [chem]: Move "chem.pic" to "tmac" directory.


From: G. Branden Robinson
Subject: [groff] 05/16: [chem]: Move "chem.pic" to "tmac" directory.
Date: Sun, 15 Dec 2024 16:34:38 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 5b3687ea94bf8ef21206318bba35d0289ce794e4
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Dec 12 03:46:07 2024 -0600

    [chem]: Move "chem.pic" to "tmac" directory.
    
    Move "chem.pic" from its own subdirectory (which has no other contents
    provided by groff) to the "tmac" directory.  The "eqnrc" file and
    groff's hyphenation pattern and exception files establish a precedent
    for using "tmac" for things that aren't "troff macro" files.  This makes
    it easier to run automated tests on GNU chem from the build tree.
    
    * chem.am (chempicdir, dist_chempic_DATA): Drop macros.
      (CHEMTMACFILES, chemtmacdir, dist_chemtmac_DATA): Add macros.
    
      (uninstall_chem_extra): Rename this...
      (uninstall_chem_hook): ...to this, for consistency with other groff
      Automake files.
    
    * chem.pl: If running as "built" version of script, locate "chem.pic"
      file relative to the build's "tmac" directory.
---
 contrib/chem/ChangeLog | 19 ++++++++++++++++++-
 contrib/chem/chem.am   | 24 ++++++++++--------------
 contrib/chem/chem.pl   |  4 ++--
 3 files changed, 30 insertions(+), 17 deletions(-)

diff --git a/contrib/chem/ChangeLog b/contrib/chem/ChangeLog
index 365fc6b0a..4b5f495e0 100644
--- a/contrib/chem/ChangeLog
+++ b/contrib/chem/ChangeLog
@@ -1,3 +1,20 @@
+2024-12-12  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       Move "chem.pic" from its own subdirectory (which has no other
+       contents provided by groff) to the "tmac" directory.  The
+       "eqnrc" file and groff's hyphenation pattern and exception files
+       establish a precedent for using "tmac" for things that aren't
+       "troff macro" files.  This makes it easier to run automated
+       tests on GNU chem from the build tree.
+
+       * chem.am (chempicdir, dist_chempic_DATA): Drop macros.
+       (CHEMTMACFILES, chemtmacdir, dist_chemtmac_DATA): Add macros.
+       (uninstall_chem_extra): Rename this...
+       (uninstall_chem_hook): ...to this, for consistency with other
+       groff Automake files.
+       * chem.pl: If running as "built" version of script, locate
+       "chem.pic" file relative to the build's "tmac" directory.
+
 2024-12-11  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * chem.pl: Revise approach to determining program name.  This
@@ -386,7 +403,7 @@
 ________________________________________________________________
 License
 
-Copyright (C) 2006-2020 Free Software Foundation, Inc.
+Copyright (C) 2006-2024 Free Software Foundation, Inc.
 Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 
 Copying and distribution of this file, with or without
diff --git a/contrib/chem/chem.am b/contrib/chem/chem.am
index 27c977640..0f1a58ce3 100644
--- a/contrib/chem/chem.am
+++ b/contrib/chem/chem.am
@@ -1,6 +1,4 @@
-# Automake rules for 'chem'
-
-# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# Copyright (C) 2006-2024 Free Software Foundation, Inc.
 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 # Moved to automake by Bertrand Garrigues
 #
@@ -18,14 +16,13 @@
 # The GPL2 license text is available in the internet at
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
-########################################################################
-
 chem_srcdir = $(top_srcdir)/contrib/chem
 prefixexecbin_SCRIPTS += chem
 
-# Files installed in $(datasubdir)/pic
-chempicdir = $(datasubdir)/pic
-dist_chempic_DATA = contrib/chem/chem.pic
+# chem.pic is not really a troff macro ("tmac") file.
+CHEMTMACFILES = $(chem_srcdir)/chem.pic
+chemtmacdir = $(tmacdir)
+dist_chemtmac_DATA = $(CHEMTMACFILES)
 
 CHEM_GENEXAMPLES = contrib/chem/examples/README
 CHEM_EXAMPLES =  \
@@ -42,8 +39,8 @@ chemexampledir = $(exampledir)/chem
 nodist_chemexample_DATA = $(CHEM_GENEXAMPLES)
 dist_chemexample_DATA = $(CHEM_EXAMPLES)
 
-# Files installed in $(exampledir)/chem/122. All the .chem files in 122 are 
-# lazily installed by the local install target
+# Files installed in $(exampledir)/chem/122.  All the .chem files in 122
+# are lazily installed by the local install target.
 chemexample122dir = $(chemexampledir)/122
 nodist_chemexample122_DATA = contrib/chem/examples/122/README
 EXTRA_DIST += \
@@ -81,7 +78,6 @@ chem: $(chem_srcdir)/chem.pl $(SH_DEPS_SED_SCRIPT)
               -e "s|[@]g[@]|$(g)|g" \
               -e "s|[@]BINDIR[@]|$(DESTDIR)$(bindir)|g" \
               -e "s|[@]MACRODIR[@]|$(DESTDIR)$(tmacdir)|g" \
-              -e "s|[@]PICDIR[@]|$(DESTDIR)$(datasubdir)/pic|g" \
               -e "s|[@]VERSION[@]|$(VERSION)|g" \
               -e "$(SH_SCRIPT_SED_CMD)" \
               $(chem_srcdir)/chem.pl \
@@ -97,13 +93,13 @@ install_chem_extra:
          $(INSTALL_DATA) $$i $(DESTDIR)$(chemexample122dir)/$$n; \
        done
 
-uninstall-local: uninstall_chem_extra
-uninstall_chem_extra:
+uninstall-local: uninstall_chem_hook
+uninstall_chem_hook:
        $(RM) $(DESTDIR)$(exampledir)/chem/122/*
        -rmdir $(DESTDIR)$(exampledir)/chem/122
        $(RM) $(DESTDIR)$(exampledir)/chem/*
        -rmdir $(DESTDIR)$(exampledir)/chem
-       -rmdir $(DESTDIR)$(datasubdir)/pic
+       -rmdir $(DESTDIR)$(tmacdir)
 
 dist-hook: dist_chem
 dist_chem:
diff --git a/contrib/chem/chem.pl b/contrib/chem/chem.pl
index 64cd1abe5..9c7eb5e03 100755
--- a/contrib/chem/chem.pl
+++ b/contrib/chem/chem.pl
@@ -61,8 +61,8 @@ if ($is_in_source_tree) {
 } else {
   $groff_version = '@VERSION@';
   $makevar{'G'} = '@g@';
-  $makevar{'PICDIR'} = '@PICDIR@';
-  $File_chem_pic = File::Spec->catfile($makevar{'PICDIR'}, 'chem.pic');
+  $makevar{'MACRODIR'} = '@MACRODIR@';
+  $File_chem_pic = File::Spec->catfile($makevar{'MACRODIR'}, 'chem.pic');
 }
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]