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
[pip9b...@fbsd ~/mktest]$ gmake
Makeflags =
nc run -I blah ...
touch aa
[pip9b...@fbsd ~/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.
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make