[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH 2/3] simplify man rules
From: |
Mike Frysinger |
Subject: |
Re: [Nano-devel] [PATCH 2/3] simplify man rules |
Date: |
Wed, 02 Apr 2014 05:09:09 -0400 |
User-agent: |
KMail/4.12.3 (Linux/3.13.0; KDE/4.12.3; x86_64; ; ) |
On Wed 02 Apr 2014 10:56:34 Benno Schulenberg wrote:
> On Sat, Mar 29, 2014, at 7:26, Mike Frysinger wrote:
> > diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
> > index a04710c..d360e10 100644
> > --- a/doc/man/Makefile.am
> > +++ b/doc/man/Makefile.am
>
> In this file it currently says:
>
> if GROFF_HTML
> dist_html_DATA = nano.1.html nanorc.5.html rnano.1.html
>
> nano.1.html: nano.1
> groff -t -mandoc -Thtml < $? > $@
> nanorc.5.html: nanorc.5
> groff -t -mandoc -Thtml < $? > $@
> rnano.1.html: rnano.1
> groff -t -mandoc -Thtml < $? > $@
> endif
>
> But should this not be instead:
>
> if GROFF_HTML
> dist_html_DATA = nano.1.html rnano.1.html
> nano.1.html: nano.1
> groff -t -mandoc -Thtml < $? > $@
> rnano.1.html: rnano.1
> groff -t -mandoc -Thtml < $? > $@
> if USE_NANORC
> dist_html_DATA += nanorc.5.html
> nanorc.5.html: nanorc.5
> groff -t -mandoc -Thtml < $? > $@
> endif
> endif
not a new issue, but yes, the inclusion of nanorc.5.html should be gated.
we already computed these values above, so how about this patch. it reduces
the if logic considerably and makes it easier to update imo.
-mike
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index d360e10..6bf32ea 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -5,27 +5,22 @@ endif
BUILT_SOURCES =
dist_man_MANS = nano.1 rnano.1
-
-if GROFF_HTML
-BUILT_SOURCES += nano.1.html rnano.1.html
-endif
+html_pages = nano.1.html rnano.1.html
if USE_NANORC
dist_man_MANS += nanorc.5
-if GROFF_HTML
-BUILT_SOURCES += nanorc.5.html
-endif
+html_pages += nanorc.5.html
endif
-if GROFF_HTML
-dist_html_DATA = nano.1.html nanorc.5.html rnano.1.html
-
nano.1.html: nano.1
groff -t -mandoc -Thtml < $? > $@
nanorc.5.html: nanorc.5
groff -t -mandoc -Thtml < $? > $@
rnano.1.html: rnano.1
groff -t -mandoc -Thtml < $? > $@
-endif
+if GROFF_HTML
+BUILT_SOURCES += $(html_pages)
+dist_html_DATA = $(html_pages)
+endif
EXTRA_DIST = $(BUILT_SOURCES)
diff --git a/doc/man/fr/Makefile.am b/doc/man/fr/Makefile.am
index 47c9f8d..b65d38a 100644
--- a/doc/man/fr/Makefile.am
+++ b/doc/man/fr/Makefile.am
@@ -3,27 +3,22 @@ htmldir = @htmldir@/fr
BUILT_SOURCES =
dist_man_MANS = nano.1 rnano.1
-
-if GROFF_HTML
-BUILT_SOURCES += nano.1.html rnano.1.html
-endif
+html_pages = nano.1.html rnano.1.html
if USE_NANORC
dist_man_MANS += nanorc.5
-if GROFF_HTML
-BUILT_SOURCES += nanorc.5.html
-endif
+html_pages += nanorc.5.html
endif
-if GROFF_HTML
-dist_html_DATA = nano.1.html nanorc.5.html rnano.1.html
-
nano.1.html: nano.1
groff -t -mandoc -Thtml < $? > $@
nanorc.5.html: nanorc.5
groff -t -mandoc -Thtml < $? > $@
rnano.1.html: rnano.1
groff -t -mandoc -Thtml < $? > $@
-endif
+if GROFF_HTML
+BUILT_SOURCES += $(html_pages)
+dist_html_DATA = $(html_pages)
+endif
EXTRA_DIST = $(BUILT_SOURCES)
signature.asc
Description: This is a digitally signed message part.