Control the name of the dist directory

I'm trying to port Grass7 on the ports tree. The make command creates two folders:
  1. /usr/ports/../work/grass-7/dist.amd64
  2. /usr/ports/../work/grass-7/dist.amd64-portbld-freebsd10.3
All the includes files are located in the first directory. The second one is empty. A lot of main.c are looking for includes in this second directory but there's nothing there. Everything is in the first directory.

Do you know why does make create the dist.amd64-portbld-freebsd10.3 empty directory?
 
Aren't these directories simply part of the extracted archive? Do a make clean followed by make extract. The extract only does the extraction of the source distribution files, nothing else. Then have a look if the directories exist or not.
 
Aren't these directories simply part of the extracted archive? Do a make clean followed by make extract. The extract only does the extraction of the source distribution files, nothing else. Then have a look if the directories exist or not.

The directories aren't created after make extract. They are created during make build: dist.amd64 first. The dist.amd64-portbld-freebsd10.3 directory second.

Here is another finding. make configure creates ${WRKSRC}/include/Make/Platform.make. This file contains the the RUN_GISBASE environment variable which is assigned the value of dist.amd64-portbld-freebsd10.3.

Do you think the next step is to change this value?
 
Read the Makefile in the extracted source directory, it might have rules that creates those directories as part of the build.
 
Since there's an existing databases/grass, have a look how that's working. The files directory contains a bunch of FreeBSD specific patches, including one for the port's Makefile. They may not work as-is but you can certainly use them as an example.
 
Read the Makefile in the extracted source directory, it might have rules that creates those directories as part of the build.
I presume the ports framework overrides the value of the ARCH variable. This variable is defined in the Grass.make file. Here's what I found:
  • make in databases/grass creates only the dist.amd64 directory;
  • gmake in databases/grass7/work/grass7.0.4 creates only the dist.amd64-portbld-freebsd10.3 directory.
I don't understand the first case. Why does the ports tree create this directory while the ARCH variable is set to amd.64-portbld-freebsd10.3?

The post hereafter suggests that "issue may be with build system" and the previous findings strengthens this hypothesis (https://trac.osgeo.org/grass/ticket/3091).
 
Since there's an existing databases/grass, have a look how that's working. The files directory contains a bunch of FreeBSD specific patches, including one for the port's Makefile. They may not work as-is but you can certainly use them as an example.
Unfortunately, I didn't find anything in the existing patches that is modifying the value of the ARCH variable.
 
Could you please give me an example of a port using this technique?

SirDice correctly answered your question.

Please, note the ``--build'' prefix used in some examples to suit your needs.

Here is an example:
Code:
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 
To force the compilation to look for includes into the dist.amd64 directory, I tried:
Code:
CONFIGURE_TARGET=--build=dist.${MACHINE_ARCH}
Which raises: Invalid configuration `dist.amd64': machine `dist.amd64' not recognized. I'm not able to identify the source of the problem. The Makefile of the previous version of Grass (/usr/ports/databases/grass/Makefile) does not have the CONFIGURE_TARGET variable modified.

What could have happen between these two versions?
 
Back
Top