trouble with short Makefile -



trouble with short Makefile -

i have short makefile. uname coming uname command, purposes of example, hardcoded. i'd check if uname starts string "mingw32_nt", code within if should execute.

uname := linux # mingw32_nt-6.1 ifneq ( $(findstr mingw32_nt, $(uname)) , "" ) uname := mingw32 endif info: @echo compiling "$(uname)"

edit: problem quotes , spaces. ;-)

ifneq ($(findstring mingw32_nt, $(uname)),)

assuming you're using gnu make, function should findstring.

also, rules strings , spaces little strict in makefile. next works:

uname := linux # mingw32_nt-6.1 ifneq ($(findstring mingw32_nt,$(uname)),) uname := mingw32 endif info: @echo compiling "$(uname)"

(note removed spurious spaces in ifneq test.)

makefile

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -