Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jan 2002 20:19:55 -0300
From:      Fernan Aguero <fernan@iib.unsam.edu.ar>
To:        Alan Eldridge <alane@geeksrus.net>
Cc:        ports@FreeBSD.ORG
Subject:   Re: [porter's handbook] problems generating pkg-plist automagically
Message-ID:  <20020116201954.F2966@iib.unsam.edu.ar>
In-Reply-To: <20020116205553.GB3994@wwweasel.geeksrus.net>; from alane@geeksrus.net on Wed, Jan 16, 2002 at 03:55:53PM -0500
References:  <20020116160826.E2966@iib.unsam.edu.ar> <20020116205553.GB3994@wwweasel.geeksrus.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Alan, thanks again for a quick answer!

Here I go again with my ... improvements?

+----[ Alan Eldridge (alane@geeksrus.net) dijo sobre "Re: [porter's handbook] problems generating pkg-plist automagically":
|
| On Wed, Jan 16, 2002 at 04:08:26PM -0300, Fernan Aguero wrote:
| >Hi all!
| 
| >Regarding the documentation: there are no man pages in my port, but a
| >doc/ directory under WRKSRC with a Makefile, some subdeirectories,
| >each with their own Makefile ... everything is html, txt, images ...
| >
| >Question: Do I let the Makefiles do their job and put everything under
| >usr/local/doc)? AFAICS kaptain is the only subdir there and most ports
| >install documentation under /usr/local/share/doc
| 
| 1. /usr/local/share/doc.

That's what I thought.

| 2. does configure take a --docdir option?

Nope.

| 3. worst case you patch the Makefile.am or Makefile.in in the docsdir.

Now I am with that. Replaced all occurrences of $(prefix)/doc in
Makefile.am with $(prefix)/share/doc. 

However, now the make procedure fails:
===>  Building for kaptain-0.6
gmake  all-recursive
gmake[1]: Entering directory `/usr/ports/x11/kaptain/work/kaptain-0.6'
Making all in doc
gmake[2]: Entering directory `/usr/ports/x11/kaptain/work/kaptain-0.6/doc'
cd .. && automake --gnu --include-deps doc/Makefile
cd .. && perl am_edit kaptain-0.6/doc/Makefile.in
Can't open perl script "am_edit": No such file or directory
gmake[2]: *** [Makefile.in] Error 2
gmake[2]: Leaving directory `/usr/ports/x11/kaptain/work/kaptain-0.6/doc'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/x11/kaptain/work/kaptain-0.6'
gmake: *** [all-recursive-am] Error 2
*** Error code 2

The strange thing to me is that the Makefile.in is now changed. That
is to say: I patched Makefile.am but both Makefile.am and Makefile.in
are different than what they are if I don't apply the patches/changes.

Although I now have an idea about how I got into this, I am not seeing
clearly how to solve it.
I took a diff from a Makefile.in of the unpatched sources and a
Makefile.in from the patched sources, and got the following:

--- prepatch/Makefile.in	Wed Jan 16 19:57:53 2002
+++ postpatch/Makefile.in	Wed Jan 16 19:53:43 2002
@@ -1,7 +1,6 @@
-# KDE tags expanded automatically by am_edit - $Revision: 1.165 $ 
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
 
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
...
...

and lots of differences, including the offending line:
...
-all: docs-am  all-redirect
+all: all-redirect
 .SUFFIXES:
 $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
-#>- 	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile
-#>+ 2
 	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile
-	cd $(top_srcdir) && perl am_edit kaptain-0.6/doc/Makefile.in
...

This happens both using the ports Makefile and trying to build kaptain
on its own (configure + make, without freebsd ports overhead).

So clearly, the problem is that now that I patched the Makefile.am
file, another automake is called somehow (???).
Maybe the problem is restricted to my own setup? I've found both
/usr/local/bin/automake and /usr/local/bin/automake14. However when
running them with --version both print the same exact message:

[root@pi] /usr/local/bin/automake14 --version
automake (GNU automake) 1.4-p5

Copyright (C) 1999, 2001 Free Software Foundation, Inc.
...

So I don't know where to look for the 'other' automake, the one with
v1.4 but that lacks the (c) 2001.

Any help or insight is appreciated.


| >According to the porter's handbook, I could do something like:
| >post-install:
| >        .if !defined(NOPORTDOCS)
| >                ${MKDIR} ${PREFIX}/share/doc/${PORTNAME}
| >                ${INSTALL_DATA} ${WRKSRC}/docs/* ${PREFIX}/share/doc/${PORTNAME}
| >        .endif
| 
| Yes, that works, too.
| 
| >This is choking on me:
| >error: unexpected "(" in .if !defined(NOPORTDOCS)
| 
| Does your .if start in the first column? Sure there's no error on the
| line immediately above it? (That's a weird one.)

Right, my .if was not in the very beginning of the line. Now it works.
But now how do I stop the doc/Makefiles from working?



| -- 
| Alan Eldridge
|
+----]


It will take time, but I will get out a perfect port (:|)
Thanks again for all your help!

Fernan

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020116201954.F2966>