Index: Mk/Uses/compiler.mk =================================================================== --- Mk/Uses/compiler.mk (revision 384088) +++ Mk/Uses/compiler.mk (working copy) @@ -36,26 +36,41 @@ compiler_ARGS= env VALID_ARGS= c++11-lib c++11-lang c11 features openmp env nestedfct c++0x gcc-c++11-lib -.if ${compiler_ARGS} == gcc-c++11-lib +.if ${compiler_ARGS:Mgcc-c++11-lib} _COMPILER_ARGS+= features gcc-c++11-lib -.elif ${compiler_ARGS} == c++11-lib +.endif +.if ${compiler_ARGS:Mc++11-lib} _COMPILER_ARGS+= features c++11-lib -.elif ${compiler_ARGS} == c++0x +.endif +.if ${compiler_ARGS:Mc++0x} _COMPILER_ARGS+= features c++0x -.elif ${compiler_ARGS} == c++11-lang +.endif +.if ${compiler_ARGS:Mc++11-lang} _COMPILER_ARGS+= features c++11-lang -.elif ${compiler_ARGS} == c11 +.endif +.if ${compiler_ARGS:Mc11} _COMPILER_ARGS+= features c11 -.elif ${compiler_ARGS} == features +.endif +.if ${compiler_ARGS:Mfeatures} _COMPILER_ARGS+= features -.elif ${compiler_ARGS} == env +.endif +.if ${compiler_ARGS:Menv} _COMPILER_ARGS+= env -.elif ${compiler_ARGS} == openmp +.endif +.if ${compiler_ARGS:Mopenmp} _COMPILER_ARGS+= env openmp -.elif ${compiler_ARGS} == nestedfct +.endif +.if ${compiler_ARGS:Mnestedfct} _COMPILER_ARGS+= env nestedfct -.else -IGNORE= Invalid argument "${compiler_ARGS}", valid arguments are: ${VALID_ARGS} +.endif + +INVALID_ARGS= ${compiler_ARGS} +.for v in ${VALID_ARGS} +INVALID_ARGS:= ${INVALID_ARGS:N${v}} +.endfor + +.if !empty(INVALID_ARGS) +IGNORE= Invalid argument "${INVALID_ARGS}", valid arguments are: ${VALID_ARGS} _COMPILER_ARGS= # .endif