[GRASS-dev] trouble with man page generation

Glynn Clements glynn at gclements.plus.com
Mon Oct 8 18:46:32 EDT 2007


Moritz Lennert wrote:

> >> I have the feeling the latest change in the man/Makefile [1] has
> >> introduced a bug. When I run make in that directory nothing happens.
> >> When I use the previous version of the Makefile, man pages get created.
> >
> > Which version of make are you using?
> 
> GNU Make 3.81

Same here.

> > Also, do the manual pages already exist? They won't be re-created if
> > they're newer than the HTML files (the previous version would always
> > re-create them).
> 
> Running make distclean, then configure & make, I get no errors during
> compilation, but there is no man directory in dist.i486-pc-linux-gnu/.
> When I revert to the previous version of the Makefile, I get
> dist.i486-pc-linux-gnu/man/man1 populated with the man pages.

Duh; it's because I moved the "include" line (unnecessarily). The
MANDIR and HTMLDIR variables depend upon GISBASE, but it isn't set
until Dir.make gets included. I have GISBASE set in my normal shell
environment, and make was picking it up from there.

Fixed in CVS as:

--- man/Makefile	30 Sep 2007 12:10:30 -0000	1.6
+++ man/Makefile	8 Oct 2007 22:43:05 -0000
@@ -1,5 +1,7 @@
 MODULE_TOPDIR = ..
 
+include $(MODULE_TOPDIR)/include/Make/Dir.make
+
 # some definitions
 SECT = 1
 MANDIR  = $(GISBASE)/man/man$(SECT)
@@ -7,8 +9,6 @@
 HTML2MAN = GRASS_PERL=${PERL} VERSION_NUMBER=${GRASS_VERSION_NUMBER} sh $(GRASS_HOME)/tools/g.html2man/g.html2man
 
 MANPAGES := $(patsubst $(HTMLDIR)/%.html,$(MANDIR)/%.$(SECT),$(wildcard $(HTMLDIR)/*.html))
-
-include $(MODULE_TOPDIR)/include/Make/Dir.make
 
 default: $(MANPAGES)

I'm wondering if this has caused me to miss other build problems.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list