head	1.4;
access;
symbols
	netbsd-11-0-RC4:1.4
	netbsd-11-0-RC3:1.4
	netbsd-11-0-RC2:1.4
	netbsd-11-0-RC1:1.4
	perseant-exfatfs-base-20250801:1.4
	netbsd-11:1.4.0.30
	netbsd-11-base:1.4
	netbsd-10-1-RELEASE:1.4
	perseant-exfatfs-base-20240630:1.4
	perseant-exfatfs:1.4.0.28
	perseant-exfatfs-base:1.4
	netbsd-8-3-RELEASE:1.4
	netbsd-9-4-RELEASE:1.4
	netbsd-10-0-RELEASE:1.4
	netbsd-10-0-RC6:1.4
	netbsd-10-0-RC5:1.4
	netbsd-10-0-RC4:1.4
	netbsd-10-0-RC3:1.4
	netbsd-10-0-RC2:1.4
	netbsd-10-0-RC1:1.4
	netbsd-10:1.4.0.26
	netbsd-10-base:1.4
	netbsd-9-3-RELEASE:1.4
	cjep_sun2x-base1:1.4
	cjep_sun2x:1.4.0.24
	cjep_sun2x-base:1.4
	cjep_staticlib_x-base1:1.4
	netbsd-9-2-RELEASE:1.4
	cjep_staticlib_x:1.4.0.22
	cjep_staticlib_x-base:1.4
	netbsd-9-1-RELEASE:1.4
	phil-wifi-20200421:1.4
	phil-wifi-20200411:1.4
	is-mlppp:1.4.0.20
	is-mlppp-base:1.4
	phil-wifi-20200406:1.4
	netbsd-8-2-RELEASE:1.4
	netbsd-9-0-RELEASE:1.4
	netbsd-9-0-RC2:1.4
	netbsd-9-0-RC1:1.4
	phil-wifi-20191119:1.4
	netbsd-9:1.4.0.18
	netbsd-9-base:1.4
	phil-wifi-20190609:1.4
	netbsd-8-1-RELEASE:1.4
	netbsd-8-1-RC1:1.4
	pgoyette-compat-merge-20190127:1.4
	pgoyette-compat-20190127:1.4
	pgoyette-compat-20190118:1.4
	pgoyette-compat-1226:1.4
	pgoyette-compat-1126:1.4
	pgoyette-compat-1020:1.4
	pgoyette-compat-0930:1.4
	pgoyette-compat-0906:1.4
	pgoyette-compat-0728:1.4
	netbsd-8-0-RELEASE:1.4
	phil-wifi:1.4.0.16
	phil-wifi-base:1.4
	pgoyette-compat-0625:1.4
	netbsd-8-0-RC2:1.4
	pgoyette-compat-0521:1.4
	pgoyette-compat-0502:1.4
	pgoyette-compat-0422:1.4
	netbsd-8-0-RC1:1.4
	pgoyette-compat-0415:1.4
	pgoyette-compat-0407:1.4
	pgoyette-compat-0330:1.4
	pgoyette-compat-0322:1.4
	pgoyette-compat-0315:1.4
	pgoyette-compat:1.4.0.14
	pgoyette-compat-base:1.4
	matt-nb8-mediatek:1.4.0.12
	matt-nb8-mediatek-base:1.4
	perseant-stdc-iso10646:1.4.0.10
	perseant-stdc-iso10646-base:1.4
	netbsd-8:1.4.0.8
	netbsd-8-base:1.4
	prg-localcount2-base3:1.4
	prg-localcount2-base2:1.4
	prg-localcount2-base1:1.4
	prg-localcount2:1.4.0.6
	prg-localcount2-base:1.4
	pgoyette-localcount-20170426:1.4
	bouyer-socketcan-base1:1.4
	pgoyette-localcount-20170320:1.4
	bouyer-socketcan:1.4.0.4
	bouyer-socketcan-base:1.4
	pgoyette-localcount-20170107:1.4
	pgoyette-localcount-20161104:1.4
	localcount-20160914:1.4
	pgoyette-localcount-20160806:1.4
	pgoyette-localcount-20160726:1.4
	pgoyette-localcount:1.4.0.2
	pgoyette-localcount-base:1.4;
locks; strict;
comment	@# @;


1.4
date	2014.08.30.22.21.08;	author sjg;	state Exp;
branches;
next	1.3;
commitid	7cRacjyJ3f7u4rOx;

1.3
date	2014.08.29.15.55.44;	author sjg;	state Exp;
branches;
next	1.2;
commitid	wEq94rqivVM9ZgOx;

1.2
date	2014.08.23.16.08.42;	author christos;	state Exp;
branches;
next	1.1;
commitid	h7oNHdxw4MR2gvNx;

1.1
date	2014.08.23.15.02.04;	author christos;	state Exp;
branches;
next	;
commitid	h71emzEJwNV8TuNx;


desc
@@


1.4
log
@Replace use of $() with ${}
$() means something special to the shell, so ${} reduces confusion
and is used almost exclusively in the rest of the makefiles.

Discussed with: christos
@
text
@${VAR} = "foo  bar baz"
a
b
c
foo baR baz,  bar baz, foo bar baz, fooadd baradd bazadd
mkdir -p 'dir'
touch 'dir/obj_1.h'
mkdir -p 'dir'
printf '#include "obj_1.h"\nconst char* obj_1 = "dir/obj_1.c";\n' \
    >'dir/obj_1.c'
Local variables
 ${@@}="dir/obj_1.o" ${<}="dir/obj_1.c"
 ${*}="dir/obj_1" ${?}="dir/obj_1.h dir/obj_1.c"
 ${%}=""

Directory and filename parts of local variables
 ${@@D}="dir" ${@@F}="obj_1.o"
 ${<D}="dir" ${<F}="obj_1.c"
 ${*D}="dir" ${*F}="obj_1"
 ${?D}="dir dir" ${?F}="obj_1.h obj_1.c"
 ${%D}="" ${%F}=""

Local variable substitutions
 ${@@:.o=}="dir/obj_1" ${<:.c=.C}="dir/obj_1.C"
 ${*:=.h}="dir/obj_1.h" ${?:.h=.H}="dir/obj_1.H dir/obj_1.c"
 ${%:=}=""

Target with suffix transformations
 ${@@D:=append}="dirappend"
 ${@@F:.o=.O}="obj_1.O"
 
 Implied source with suffix transformations
 ${<D:r=rr}="dirr"
 ${<F:.c=.C}="obj_1.C"
 
 Suffixless target with suffix transformations
 ${*D:.=dot}="dir"
 ${*F:.a=}="obj_1"
 
 Out-of-date dependencies with suffix transformations
 ${?D:ir=}="d d"
 ${?F:.h=.H}="obj_1.H obj_1.c"
 
 Member with suffix transformations
 ${%D:.=}=""
 ${%F:${VAR2}=${VAR}}=""

cc -c -o 'dir/obj_1.o' 'dir/obj_1.c'
mkdir -p '.'
touch 'dummy'
Local variables
 ${@@}="lib.a" ${<}="dir/obj_1.o"
 ${*}="obj1" ${?}="dir/obj_1.o dummy"
 ${%}="obj1.o"

Directory and filename parts of local variables
 ${@@D}="." ${@@F}="lib.a"
 ${<D}="dir" ${<F}="obj_1.o"
 ${*D}="." ${*F}="obj1"
 ${?D}="dir ." ${?F}="obj_1.o dummy"
 ${%D}="." ${%F}="obj1.o"

Local variable substitutions
 ${@@:.o=}="lib.a" ${<:.c=.C}="dir/obj_1.o"
 ${*:=.h}="obj1.h" ${?:.h=.H}="dir/obj_1.o dummy"
 ${%:=}="obj1.o"

Target with suffix transformations
 ${@@D:=append}=".append"
 ${@@F:.o=.O}="lib.a"
 
 Implied source with suffix transformations
 ${<D:r=rr}="dirr"
 ${<F:.c=.C}="obj_1.o"
 
 Suffixless target with suffix transformations
 ${*D:.=dot}="dot"
 ${*F:.a=}="obj1"
 
 Out-of-date dependencies with suffix transformations
 ${?D:ir=}="d ."
 ${?F:.h=.H}="obj_1.o dummy"
 
 Member with suffix transformations
 ${%D:.=}=""
 ${%F:${VAR2}=${VAR}}="obj1foo  bar baz"

cp 'dir/obj_1.o' 'obj1.o'
ar -rcv 'lib.a' 'obj1.o'
a - obj1.o
rm -f 'obj1.o'
mkdir -p '.'
printf '#include "obj_2.h"\nconst char* obj_2 = "obj_2.c";\n' \
    >'obj_2.c'
mkdir -p '.'
touch 'obj_2.h'
Local variables
 ${@@}="obj2.o" ${<}="obj_2.c"
 ${*}="obj2" ${?}="obj_2.c obj_2.h dir/obj_1.h"
 ${%}=""

Directory and filename parts of local variables
 ${@@D}="." ${@@F}="obj2.o"
 ${<D}="." ${<F}="obj_2.c"
 ${*D}="." ${*F}="obj2"
 ${?D}=". . dir" ${?F}="obj_2.c obj_2.h obj_1.h"
 ${%D}="" ${%F}=""

Local variable substitutions
 ${@@:.o=}="obj2" ${<:.c=.C}="obj_2.C"
 ${*:=.h}="obj2.h" ${?:.h=.H}="obj_2.c obj_2.H dir/obj_1.H"
 ${%:=}=""

Target with suffix transformations
 ${@@D:=append}=".append"
 ${@@F:.o=.O}="obj2.O"
 
 Implied source with suffix transformations
 ${<D:r=rr}="."
 ${<F:.c=.C}="obj_2.C"
 
 Suffixless target with suffix transformations
 ${*D:.=dot}="dot"
 ${*F:.a=}="obj2"
 
 Out-of-date dependencies with suffix transformations
 ${?D:ir=}=". . d"
 ${?F:.h=.H}="obj_2.c obj_2.H obj_1.H"
 
 Member with suffix transformations
 ${%D:.=}=""
 ${%F:${VAR2}=${VAR}}=""

cc -c -o 'obj2.o' 'obj_2.c'
ar -rcv 'lib.a' 'obj2.o'
a - obj2.o
mkdir -p '.'
touch 'obj3.h'
mkdir -p 'dir'
touch 'dir/dummy'
mkdir -p '.'
printf '#include "obj3.h"\nconst char* obj3 = "obj3.c";\n' \
    >'obj3.c'
Local variables
 ${@@}="lib.a" ${<}="obj3.c"
 ${*}="obj3" ${?}="obj3.h dir/dummy obj3.c"
 ${%}="obj3.o"

Directory and filename parts of local variables
 ${@@D}="." ${@@F}="lib.a"
 ${<D}="." ${<F}="obj3.c"
 ${*D}="." ${*F}="obj3"
 ${?D}=". dir ." ${?F}="obj3.h dummy obj3.c"
 ${%D}="." ${%F}="obj3.o"

Local variable substitutions
 ${@@:.o=}="lib.a" ${<:.c=.C}="obj3.C"
 ${*:=.h}="obj3.h" ${?:.h=.H}="obj3.H dir/dummy obj3.c"
 ${%:=}="obj3.o"

Target with suffix transformations
 ${@@D:=append}=".append"
 ${@@F:.o=.O}="lib.a"
 
 Implied source with suffix transformations
 ${<D:r=rr}="."
 ${<F:.c=.C}="obj3.C"
 
 Suffixless target with suffix transformations
 ${*D:.=dot}="dot"
 ${*F:.a=}="obj3"
 
 Out-of-date dependencies with suffix transformations
 ${?D:ir=}=". d ."
 ${?F:.h=.H}="obj3.H dummy obj3.c"
 
 Member with suffix transformations
 ${%D:.=}=""
 ${%F:${VAR2}=${VAR}}="obj3foo  bar baz"

cc -c -o 'obj3.o' 'obj3.c'
ar -rcv 'lib.a' 'obj3.o'
a - obj3.o
rm -f 'obj3.o'
ar -s 'lib.a'
exit status 0
@


1.3
log
@posix1.mk and suffixes.mk need to cleanup in order to achieve
repeatable results.
posix1.mk's lib.a target still looks dubious.
@
text
@d1 1
a1 1
$(VAR) = "foo  bar baz"
d12 3
a14 3
 $(@@)="dir/obj_1.o" $(<)="dir/obj_1.c"
 $(*)="dir/obj_1" $(?)="dir/obj_1.h dir/obj_1.c"
 $(%)=""
d17 5
a21 5
 $(@@D)="dir" $(@@F)="obj_1.o"
 $(<D)="dir" $(<F)="obj_1.c"
 $(*D)="dir" $(*F)="obj_1"
 $(?D)="dir dir" $(?F)="obj_1.h obj_1.c"
 $(%D)="" $(%F)=""
d24 3
a26 3
 $(@@:.o=)="dir/obj_1" $(<:.c=.C)="dir/obj_1.C"
 $(*:=.h)="dir/obj_1.h" $(?:.h=.H)="dir/obj_1.H dir/obj_1.c"
 $(%:=)=""
d29 2
a30 2
 $(@@D:=append)="dirappend"
 $(@@F:.o=.O)="obj_1.O"
d33 2
a34 2
 $(<D:r=rr)="dirr"
 $(<F:.c=.C)="obj_1.C"
d37 2
a38 2
 $(*D:.=dot)="dir"
 $(*F:.a=)="obj_1"
d41 2
a42 2
 $(?D:ir=)="d d"
 $(?F:.h=.H)="obj_1.H obj_1.c"
d45 2
a46 2
 $(%D:.=)=""
 $(%F:$(VAR2)=$(VAR))=""
d52 3
a54 3
 $(@@)="lib.a" $(<)="dir/obj_1.o"
 $(*)="obj1" $(?)="dir/obj_1.o dummy"
 $(%)="obj1.o"
d57 5
a61 5
 $(@@D)="." $(@@F)="lib.a"
 $(<D)="dir" $(<F)="obj_1.o"
 $(*D)="." $(*F)="obj1"
 $(?D)="dir ." $(?F)="obj_1.o dummy"
 $(%D)="." $(%F)="obj1.o"
d64 3
a66 3
 $(@@:.o=)="lib.a" $(<:.c=.C)="dir/obj_1.o"
 $(*:=.h)="obj1.h" $(?:.h=.H)="dir/obj_1.o dummy"
 $(%:=)="obj1.o"
d69 2
a70 2
 $(@@D:=append)=".append"
 $(@@F:.o=.O)="lib.a"
d73 2
a74 2
 $(<D:r=rr)="dirr"
 $(<F:.c=.C)="obj_1.o"
d77 2
a78 2
 $(*D:.=dot)="dot"
 $(*F:.a=)="obj1"
d81 2
a82 2
 $(?D:ir=)="d ."
 $(?F:.h=.H)="obj_1.o dummy"
d85 2
a86 2
 $(%D:.=)=""
 $(%F:$(VAR2)=$(VAR))="obj1foo  bar baz"
d98 3
a100 3
 $(@@)="obj2.o" $(<)="obj_2.c"
 $(*)="obj2" $(?)="obj_2.c obj_2.h dir/obj_1.h"
 $(%)=""
d103 5
a107 5
 $(@@D)="." $(@@F)="obj2.o"
 $(<D)="." $(<F)="obj_2.c"
 $(*D)="." $(*F)="obj2"
 $(?D)=". . dir" $(?F)="obj_2.c obj_2.h obj_1.h"
 $(%D)="" $(%F)=""
d110 3
a112 3
 $(@@:.o=)="obj2" $(<:.c=.C)="obj_2.C"
 $(*:=.h)="obj2.h" $(?:.h=.H)="obj_2.c obj_2.H dir/obj_1.H"
 $(%:=)=""
d115 2
a116 2
 $(@@D:=append)=".append"
 $(@@F:.o=.O)="obj2.O"
d119 2
a120 2
 $(<D:r=rr)="."
 $(<F:.c=.C)="obj_2.C"
d123 2
a124 2
 $(*D:.=dot)="dot"
 $(*F:.a=)="obj2"
d127 2
a128 2
 $(?D:ir=)=". . d"
 $(?F:.h=.H)="obj_2.c obj_2.H obj_1.H"
d131 2
a132 2
 $(%D:.=)=""
 $(%F:$(VAR2)=$(VAR))=""
d145 3
a147 3
 $(@@)="lib.a" $(<)="obj3.c"
 $(*)="obj3" $(?)="obj3.h dir/dummy obj3.c"
 $(%)="obj3.o"
d150 5
a154 5
 $(@@D)="." $(@@F)="lib.a"
 $(<D)="." $(<F)="obj3.c"
 $(*D)="." $(*F)="obj3"
 $(?D)=". dir ." $(?F)="obj3.h dummy obj3.c"
 $(%D)="." $(%F)="obj3.o"
d157 3
a159 3
 $(@@:.o=)="lib.a" $(<:.c=.C)="obj3.C"
 $(*:=.h)="obj3.h" $(?:.h=.H)="obj3.H dir/dummy obj3.c"
 $(%:=)="obj3.o"
d162 2
a163 2
 $(@@D:=append)=".append"
 $(@@F:.o=.O)="lib.a"
d166 2
a167 2
 $(<D:r=rr)="."
 $(<F:.c=.C)="obj3.C"
d170 2
a171 2
 $(*D:.=dot)="dot"
 $(*F:.a=)="obj3"
d174 2
a175 2
 $(?D:ir=)=". d ."
 $(?F:.h=.H)="obj3.H dummy obj3.c"
d178 2
a179 2
 $(%D:.=)=""
 $(%F:$(VAR2)=$(VAR))="obj3foo  bar baz"
@


1.2
log
@fix output based on new sources
@
text
@d9 1
a9 1
printf '#include "obj_1.h"\nconst char* obj_1 = "dir/obj_1.c";' \
d93 1
a93 1
printf '#include "obj_2.h"\nconst char* obj_2 = "obj_2.c";' \
d142 1
a142 1
printf '#include "obj3.h"\nconst char* obj3 = "obj3.c";' \
@


1.1
log
@Convert test in PR/49085
@
text
@d185 1
@

