Thanks all for your comments. Here is the new webrev:
http://cr.opensolaris.org/~rayx/erlang/webrev/
What I changed:
1) modified Makefile.sfw and METADATA to use Norm's new
framework(as Paul and Mike suggested)
2) removed SUNWerlang-doc/depend and modified its Makefile
to use the default depend file(as Paul and Rahul suggested)
What I didn't change:
1) directories in Targetdir(Mike mentioned there are no
mandatory requirements for it, and I think the way used in
Erlang code is OK).
2) full license text(Mike suggested to keep it)
BTW, I have some minor comments on Norm's new framework:
1) Due to the following code in cmd/Makefile.targ, it requires
patches must be placed under "Patches" directory. That is a bit
inconvenient.
PATCH_STAMPS = $(PATCHES:Patches/%=$(VER)/.patches.%)
$(VER)/.patches.%: Patches/%
(cd $(VER) ; $(GPATCH) -p0 < ../$<)
touch $@
if the patch files defined in PATCHES macro are not under
Patches directory, it failed silently.
2) If user runs "dmake install" directly(rather than run
"dmake all" first and then "dmake install"), those
install-specific TARGET_ENV will also be effective in
configuration and build phase. This make it difficult
to decouple build-time environment and installation-time
environment(although for most applications this probably
doesn't matter)
Thanks,
Raymond