groff
[Top][All Lists]
Advanced

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

do not install *.in files (was: building groff without makeinfo)


From: Ingo Schwarze
Subject: do not install *.in files (was: building groff without makeinfo)
Date: Wed, 30 Mar 2022 13:25:24 +0200

Hi Branden,

i have two items of good news.

G. Branden Robinson wrote on Tue, Mar 29, 2022 at 06:15:51AM +1100:

> Building groff from a distribution archive (_not_ from Git),
> should NOT require makeinfo(1) anymore.
> Can you confirm that this is the case on OpenBSD?

Fist good news:
After some more testing, i can now definitely confirm that this works.

Second good news:
Earlier, i mentioned that i saw a few instances of unclean behaviour
in the build that i didn't investigate at that point.  Fortunately,
closer inspection revealed that all but one of those were only
related to building the OpenBSD port and only a single one is
relevant for upstream.


That one issue is that "make install" installs the following files:

  meintro.me.in meintro_fr.me.in meref.me.in msboxes.ms.in

in addition to the processed versions without the *.in suffix.


Resolving that requires tweaking some automake(1) variables
in the *.am input files.

 1. dist_sboxesexample_DATA is completely bogus, so delete it.
    In automake(1), the _DATA suffix means "install this",
    and *.in files obviously must not be installed.

 2. Instead, the file msboxes.ms.in only needs to be packaged
    in the distribution tarball.  The way to do that in automake(1)
    is adding the file to EXTRA_DIST.  Actually, the required
    EXTRA_DIST line is already there by hidden by an "#if".
    It needs to be set unconditionally because that file always
    needs to be added to distribution tarballs.

 3. These changes make the preceding comment inaccurate because
    msboxes.ms.in is no longer installed.
    Trying to reaword the comment, i found that all of it was
    obviosly written by Captain Obvious:
    "SBOXES_EXAMPLEFILES are located in the source tree"
      That is obvious from "SBOXES_EXAMPLEFILES = $(sboxes_srcdir)/...".
    "SBOXESPROCESSEDEXAMPLEFILES are generated in the build tree"
      Obvious from "SBOXES_PROCESSEDEXAMPLEFILES = $(sboxes_builddir)/...".
    So let's just delete the whole comment with no replacement.

 4. In doc.am, split DOCFILES into those files that have to be
    installed and those that don't.

 5. The _DATA installation variable gets only DOCFILES_INST.

 6. DOCFILES_NOINST needs to be added to EXTRA_DIST unconditionally.

Tested in builds both from git and from tarballs.

When committing, i will include ChangeLog entries.

OK to push?
  Ingo


diff --git a/contrib/sboxes/sboxes.am b/contrib/sboxes/sboxes.am
index 8eaf3a698..f3fb63dba 100644
--- a/contrib/sboxes/sboxes.am
+++ b/contrib/sboxes/sboxes.am
@@ -29,21 +29,16 @@ EXTRA_DIST += \
     contrib/sboxes/ChangeLog \
     contrib/sboxes/notquine.sed
 
-# Files installed in $(examplesdir)/sboxes.  SBOXES_EXAMPLEFILES are
-# located in the source tree, while SBOXESPROCESSEDEXAMPLEFILES are
-# generated in the build tree.
 SBOXES_EXAMPLEFILES = $(sboxes_srcdir)/msboxes.ms.in
 if BUILD_EXAMPLES
 sboxesexampledir = $(exampledir)/sboxes
-dist_sboxesexample_DATA = $(SBOXES_EXAMPLEFILES)
 SBOXES_PROCESSEDEXAMPLEFILES = $(sboxes_builddir)/msboxes.ms \
     $(sboxes_builddir)/msboxes.pdf
 sboxesprocessedexampledir = $(exampledir)/sboxes
 nodist_sboxesprocessedexample_DATA = $(SBOXES_PROCESSEDEXAMPLEFILES)
-else
+endif
 EXTRA_DIST += \
     contrib/sboxes/msboxes.ms.in
-endif
 
 MOSTLYCLEANFILES += msboxes.ms \
     $(SBOXES_PROCESSEDEXAMPLEFILES)
diff --git a/doc/doc.am b/doc/doc.am
index 544fe147a..0c8c4daae 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -51,13 +51,14 @@ DOC_GROFF = nlinit=`echo 'nl="'; echo '"'`; eval 
"$$nlinit"; \
 # Other doc, installed in $(docdir)
 if BUILD_OTHERDOC
 # Files located in the source tree
-DOCFILES= \
+DOCFILES_INST= \
   doc/me-revisions \
-  doc/meintro.me.in \
-  doc/meintro_fr.me.in \
-  doc/meref.me.in \
   doc/ms.ms \
   doc/pic.ms
+DOCFILES_NOINST= \
+  doc/meintro.me.in \
+  doc/meintro_fr.me.in \
+  doc/meref.me.in
 # Files that undergo a transformation prior to groff processing
 GENERATEDDOCFILES = \
   $(DOC_GNU_EPS) \
@@ -76,12 +77,13 @@ PROCESSEDDOCFILES = $(PROCESSEDDOCFILES_PS) \
   doc/groff-man-pages.utf8.txt
 
 otherdocdir = $(docdir)
-dist_otherdoc_DATA = $(DOCFILES) $(GENERATEDDOCFILES)
+dist_otherdoc_DATA = $(DOCFILES_INST) $(GENERATEDDOCFILES)
 nodist_otherdoc_DATA = $(PROCESSEDDOCFILES)
 MOSTLYCLEANFILES += $(PROCESSEDDOCFILES)
 else
-EXTRA_DIST += $(DOCFILES) $(GENERATEDDOCFILES)
+EXTRA_DIST += $(DOCFILES_INST) $(GENERATEDDOCFILES)
 endif
+EXTRA_DIST += $(DOCFILES_NOINST)
 
 # pdf doc, written in mom and therefore using contrib/mom/mom.am
 # definitions



reply via email to

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