include files for cgxCADTools

Ryan Schmidt ryandesign at macports.org
Mon Aug 8 00:18:04 UTC 2022


On Aug 6, 2022, at 09:47, Mark Brethen wrote:

> See log file for errors I’m getting with using build.env instead of build.args.

The log has errors like this:


Os -arch x86_64 -Wall -I../../FbdReader/inc -I/opt/local/include/opencascade  -c FbdReader.cpp  -o FbdReader.o
make: Os: No such file or directory


You asked for this to happen when you wrote in your patchfile:

CXX =

Don't do that. :)

Why not let make's default value for CXX be used if the user (or in this case MacPorts) doesn't specify it? To accomplish this, remove the "CXX =" line.



On Aug 6, 2022, at 16:58, Mark Brethen wrote:

> If passing build.env, need to remove cc, cxx, etc. assignments in makefile. Even ‘cc=‘ will cause those errors.

Variables that you specify in the environment (build.env) are defaults for make. Commands in the Makefile can override or append to values from the environment. When you wrote "CXX =" in the Makefile above, you instructed make to ignore any CXX set in the environment and replace it with the empty string.

Variables you specify in arguments (build.args) override anything set in the Makefile. Use this if a Makefile sets a variable incorrectly (for example if a Makefile sets "CC = something") and you want to override it in MacPorts without having to write a patchfile for it. (Ideally Makefiles would use e.g. "CC ?= something" which means "set CC to something if CC is not already set.")

So decide on a case by case basis, for each variable, what is the most appropriate thing to do.



More information about the macports-dev mailing list