MAPLIB.mk revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
/*
* normalize local -l* library conventions
*
* L [ [ G11 ... G1n ] ... [ Gg1 ... Ggn ] ] :MAPLIB: T1.c ... Tn.c
*
* if Giji not specified then G11 == L
* -lL to to require -lGi1 ... -lGin
* otherwise -lL is not required and maps to "no library required"
*/
local L P
L := $(<:B:O=1)
if ! ( P = "$(<:B:O>1)" )
P := $(L)
set -
r='-'
for i in $$(*)
then g=
for p in $(P) -
do case $p in
r="$g"
break 2
}
g=
;;
*) g="$g -l$p"
;;
echo " $r" > $$(<)