How to set MAKEFLAGS from Makefile, in order to remove default implicit-rules -


i try following makefile:

makeflags += s makeflags += r  configure: 

then, when run make, following errors, if wants compile 'configure', per default implicit-rule:

/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 11 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 3 has invalid symbol index 2 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 4 has invalid symbol index 11 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 5 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 6 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 7 has invalid symbol index 13 

if run:

make -r 

i not above errors, instead, get:

make: nothing done 'configure'. 

i got idea define makeflags here:

the 'makeflags' variable can useful if want have options, such '-k' (*note summary of options: options summary.), set each time run 'make'. put value 'makeflags' in environment. can set 'makeflags' in makefile, specify additional flags should in effect makefile. (note cannot use 'mflags' way. variable set compatibility; 'make' not interpret value set in way.)

when 'make' interprets value of 'makeflags' (either environment or makefile), first prepends hyphen if value not begin one. chops value words separated blanks, , parses these words if options given on command line (except '-c', '-f', '-h', '-o', '-w', , long-named versions ignored; , there no error invalid option).

you don't say, you're using too-old version of gnu make. ability remove built-in rules adding -r makeflags inside makefile added in gnu make 4.0, released in october 2013.

it's important remember when @ manual on gnu website you're looking @ documentation latest version of gnu make. it's better read documentation comes distribution, correct version of manual associated version of gnu make you're using.

eta:

you have use real flags in makeflags. can't use single letter versions. time single-letter options allowed in first word of variable value (i have removed if weren't required standard). you've written:

makeflags += s makeflags += r 

which gives value makeflags (if run make no other options) of s r. make add dash first word, not other words, interpreted -s r , r not -r option. also, if happened run make option, make -k makeflags k s r , make interpret -k s r, , -s flag not set either.

in short, prepend options dashes always when want modify makeflags:

makeflags += -s makeflags += -r 

Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -