help-make
[Top][All Lists]
Advanced

[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)

Hi,

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 ...
else
        NC_RUN_EXE = nc run blah ...
endif

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'
branch.

Any ideas on how to get around this another way?

Thanks,

Phil

-- 
View this message in context: 
http://www.nabble.com/Testing-gnuMake-flags-tp23439038p23439038.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.





reply via email to

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