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

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -