[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Testing gnuMake flags

From: pip9ball
Subject: Testing gnuMake flags
Date: Thu, 7 May 2009 19:30:51 -0700 (PDT)


I'm having some difficulty testing for flags used when executing gmake.  In
particular, if the user calls gmake with the "-j" parallel flag, I want to
set a variable differently.  The reason why I need this is we have a batch
system in place where I need to disable interactive jobs when running in
parallel so the stdout isn't inter-dispersed.  I've created a small
testcase, however I don't understand why this doesn't work.

ifeq (,$(filter j, $(MAKEFLAGS)))
        NC_RUN_EXE = nc run -I blah ...
        NC_RUN_EXE = nc run blah ...

a :
        @echo Makeflags = $(MAKEFLAGS)
        @echo $(NC_RUN_EXE)
        touch aa

address@hidden ~/mktest]$ gmake
Makeflags =
nc run -I blah ...
touch aa

address@hidden ~/mktest]$ gmake -j
Makeflags = j
nc run -I blah ...
touch aa

In both cases above, the ifeq ($findstring...) function is taking the 'true'

Any ideas on how to get around this another way?



View this message in context:
Sent from the Gnu - Make - Help mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]