[GRASS5] man error kills 5.3 compile using alt build sys on OS X

I'm dabbling at creating an automatic build of binaries on an OS X machine
from the 5.3cvs code, so I asked Markus for the script he uses for this on
Linux.

I've run into trouble with it bailing out early in the make, when
it's processing manual pages. I've never run into this before, but this
is also the first time I've used the alternate build system, so it all
looks different to me, adding confusion. As a result, I'm a little
baffled on how to start troubleshooting - any pointers/suggestions
would be most welcome.

It's starting to look like a bug or at least a peculiarity of Mac OS X,
since it seems to have got past the manual page part of the build fine on
my Linux system (still working through the rest of the build).

When I first run the build script, it configures find, then it does all of
the copying and converting steps of html->man pages, but then I get:

Converting: /Volumes/stipaUnix/cvsgrass/freshgrass/html/html/xganim.html
to
/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/man1/xganim.1
mkdir -p
/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/cat1
man
/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/man1/ascii_formats.1

/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/cat1/ascii_formats.1
No manual entry for
/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/man1/ascii_formats.1
make[1]: ***
[/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/cat1/ascii_formats.1]
Error 1
make: *** [docs] Error 2
ERROR: compilation error.

Does this rely on behaviour of GNU man ? Apple uses BSD man.

Unfortunately, this creates a zero byte file in the cat section, which
means subsequent makes just go on to the next file, creating more and more
zero byte preformatted output files.

Now I'm stuck - I thought I could compare to the traditional build system
to figure out the difference, but my ignorance of how the build system and
make work has brought me to a dead end.

Ideas/comments?

Thanks,
Scott

Scott W Mitchell wrote:

It's starting to look like a bug or at least a peculiarity of Mac OS X,
since it seems to have got past the manual page part of the build fine on
my Linux system (still working through the rest of the build).

When I first run the build script, it configures find, then it does all of
the copying and converting steps of html->man pages, but then I get:

Converting: /Volumes/stipaUnix/cvsgrass/freshgrass/html/html/xganim.html
to
/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/man1/xganim.1
mkdir -p
/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/cat1
man
/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/man1/ascii_formats.1
>
/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/cat1/ascii_formats.1
No manual entry for
/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/man1/ascii_formats.1
make[1]: ***
[/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/cat1/ascii_formats.1]
Error 1
make: *** [docs] Error 2
ERROR: compilation error.

Does this rely on behaviour of GNU man ?

It looks like it. It assumes that man will accept a full pathname to a
troff file in place of a simple name.

Apple uses BSD man.

Unfortunately, this creates a zero byte file in the cat section, which
means subsequent makes just go on to the next file, creating more and more
zero byte preformatted output files.

Now I'm stuck - I thought I could compare to the traditional build system
to figure out the difference, but my ignorance of how the build system and
make work has brought me to a dead end.

The original build system uses:

  man -M $(GISBASE)/man $tmpm

where $tmpm is the base name (without the directory or suffix) of the
troff file.

The alternate build system uses:

  MANDIR = ${GISBASE}/man/man${MANSECT}
  CATDIR = ${GISBASE}/man/cat${MANSECT}
  
  MAN2CAT = man
  
  ...
  
  ${catpages}: ${CATDIR}/%.${MANSECT}: ${MANDIR}/%.${MANSECT}
    ${MAN2CAT} $< > $@

If you can figure out a command which will accept the full pathname to
a troff file as an argument and output plain text, you can set MAN2CAT
to that command when running "make", e.g.

  make MAN2CAT='...'

On Linux, 'groff -Wall -t -Tlatin1 -mandoc' should provide an accurate
substitute for "man". Although g.html2man doesn't appear to use
tables, so the use of tbl shouldn't be necessary.

--
Glynn Clements <glynn.clements@virgin.net>

Works fine using the groff syntax you suggested. Thanks.

On 12-May-04, at 02:57, Glynn Clements wrote:

Scott W Mitchell wrote:

It's starting to look like a bug or at least a peculiarity of Mac OS X,
since it seems to have got past the manual page part of the build fine on
my Linux system (still working through the rest of the build).

When I first run the build script, it configures find, then it does all of
the copying and converting steps of html->man pages, but then I get:

Converting: /Volumes/stipaUnix/cvsgrass/freshgrass/html/html/xganim.html
to

...

/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/cat1/ascii_formats.1
No manual entry for
/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/man1/ascii_formats.1
make[1]: ***
[/Users/smitch/macgrass-build/dist.powerpc-apple-darwin7.3.0/man/cat1/ascii_formats.1]
Error 1
make: *** [docs] Error 2
ERROR: compilation error.

Does this rely on behaviour of GNU man ?

It looks like it. It assumes that man will accept a full pathname to a
troff file in place of a simple name.

Apple uses BSD man.

Unfortunately, this creates a zero byte file in the cat section, which
means subsequent makes just go on to the next file, creating more and more
zero byte preformatted output files.

Now I'm stuck - I thought I could compare to the traditional build system
to figure out the difference, but my ignorance of how the build system and
make work has brought me to a dead end.

...

If you can figure out a command which will accept the full pathname to
a troff file as an argument and output plain text, you can set MAN2CAT
to that command when running "make", e.g.

  make MAN2CAT='...'

On Linux, 'groff -Wall -t -Tlatin1 -mandoc' should provide an accurate
substitute for "man". Although g.html2man doesn't appear to use
tables, so the use of tbl shouldn't be necessary.

--
Glynn Clements <glynn.clements@virgin.net>

_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

------
Scott W. Mitchell Scott_Mitchell@carleton.ca
Department of Geography and Environmental Studies
Carleton University, B349 Loeb Building (Office A209)
1125 Colonel By Drive, Ottawa, ON Canada K1S 5B6
+1-613-520-2600 ext 2695 Fax: 1-613-520-4301