1 # If invoked with -v FUNCTION=name, then just print $1 (s|/|---|).
2 # Otherwise we expect to be invoked with TARGET=<whatever>, then if
3 # s|/|---| on $1 matches TARGET, we generate a manifest.
5 if (substr($1, 1, 1) == "#") { # Skip comments.
10 gsub("/", "---", a[1])
11 target = sprintf("%s.p5m", a[1])
12 if (FUNCTION == "name") {
16 if (target != TARGET) {
19 printf "set name=pkg.fmri value=pkg:/%s\n", fmri
21 if (NF == 3 || (NF ==2 && $2 != "noincorporate")) {
22 print "set name=pkg.renamed value=true"
23 printf "depend type=require fmri=%s\n", $2
25 print "set name=pkg.obsolete value=true"
28 if ($NF == "noincorporate") {
29 print "set name=pkg.tmp.noincorporate value=true"
31 print "set name=org.opensolaris.consolidation value=$(CONSOLIDATION)"
32 exit 0 # We're done; no point continuing.