how to handle this element in Makefile.config ?

macports at parvis.nl macports at parvis.nl
Mon Mar 26 18:03:42 UTC 2018


> On 2018-03-26, at 15:28, Rainer Müller <raimue at macports.org> wrote:
> 
> On 2018-03-26 14:31, macports at parvis.nl wrote:
>> I'm working on a port for munin 2.0.x
>> 
>> the munin-node component builds and installs java plugins if the Makefile can find the javac compiler.
>> 
>> on my system I need to have java but I want to ignore this feature.
>> 
>> code is:
>> -----
>> # Java compiler stuff - only needed on the buildhost
>> JC         := javac
>> JFLAGS     := -g -source 1.5 -target 1.5 -Xlint
>> JAR        := jar
>> 
>> # Check if the java compiler works
>> #    Note that we defer JCVALID evaluation to runtime,
>> #    since $(JC) can be redefined later in a specific Makefile.config
>> #    The core Makefile.config is then used as a Makefile.default
>> JCVALID    = $(shell $(JC) -version >/dev/null 2>/dev/null && echo "yes")
>> -----
>> 
>> I've tried:
>> - build.env JCVALID=no
>> - build.env JC=false
>> but both don't work.
> 
> make will not use these variables from the environment, as they are set
> explicitly in the Makefile. You can only override the variables on the
> make command line.
> 
> Try setting the variable in build.args instead:
> 
> build.args-append JCVALID=no
> 
> Rainer

no effect


More information about the macports-dev mailing list