reduce-algebra portfile dev

Ryan Schmidt ryandesign at macports.org
Sat Aug 20 17:41:24 PDT 2011


On Aug 20, 2011, at 19:05, Mark Brethen wrote:

> I thought Makefile is created from Makefile.am and Makefile.in,

That is generally true. Before packaging up a distfile of an autoconf-based project, a developer will usually run "autoconf" (or in the case of reduce-algebra, a wrapper script around autoconf and other utilities, which they've called autogen.sh), which will generate Makefile.in from Makefile.am and its include files, and generate configure from configure.ac and its include files. Then, when the user is building the software, the user will run ./configure, which will generate Makefile from Makefile.in. So usually, when modifying a Makefile and wanting to submit those changes to the developer, you would patch Makefile.am, since that is the only file that would usually be in the source repository.


> but in the Makefile it says it is a hand-written top-level Makefile. Do I patch all 3 makefiles?

I checked out their source, and it does indeed say that. They have Makefile.am, Makefile.in and Makefile in their repository, and Makefile does not appear to have been generated from Makefile.in but written by hand. This is unusual and I'm not sure why they've done that.

In your portfile, you wrote:


configure.cmd       ./autogen.sh
configure.args      --with-csl


This will get MacPorts to run autogen.sh, but remember that this only regenerates the configure script. You still need to run the configure script. You should let the configure phase be for running the configure script, and you can use "use_autoconf yes" to get MacPorts to run autoconf before the configure phase. Usually MacPorts would run "autoconf", but you can tell it to run a different script instead, like this:


use_autoconf        yes
autoconf.cmd        ./autogen.sh

configure.args      --with-csl


Doing this, I see that the hand-written Makefile has not been regenerated. So in this special case, you would apply the patch we've been discussing directly to Makefile. Although I'm not totally clear how "make install" is being handled, since that Makefile doesn't have an "install" target at all. Perhaps it's one of the several other Makefiles that needs to be patch. You can narrow your search down to those Makefiles that are in the same directory as an INSTALL file:


$ find trunk -name INSTALL
trunk/csl/cslbase/cm-unicode/INSTALL
trunk/csl/cslbase/INSTALL
trunk/csl/fox/INSTALL
trunk/generic/redfront/INSTALL
trunk/INSTALL







More information about the macports-dev mailing list