for(; *s; s+=n){
n = strlen(goarch);
if(strncmp(s, goarch, n) == 0){
- fmtstrcpy(f, "$(GOARCH)");
+ if(f->flags & FmtSharp)
+ fmtstrcpy(f, "${GOARCH}"); // shell
+ else
+ fmtstrcpy(f, "$(GOARCH)"); // make
continue;
}
n = strlen(goos);
if(strncmp(s, goos, n) == 0){
- fmtstrcpy(f, "$(GOOS)");
+ if(f->flags & FmtSharp)
+ fmtstrcpy(f, "${GOOS}"); // shell
+ else
+ fmtstrcpy(f, "$(GOOS)"); // make
continue;
}
n = chartorune(&r, s);
Bprint(&bout, "\\\n# ");
o = Boffset(&bout);
}
- Bprint(&bout, " %s", oargv[i]);
+ Bprint(&bout, " %#$", oargv[i]);
}
Bprint(&bout, " >Makefile\n");
Bprint(&bout, preamble, thechar);
# license that can be found in the LICENSE file.
# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m dnsclient.go dnsconfig.go dnsmsg.go fd.go fd_darwin.go\
-# ip.go net.go net_darwin.go parse.go port.go >Makefile
+# gobuild -m dnsclient.go dnsconfig.go dnsmsg.go fd.go fd_${GOOS}.go\
+# ip.go net.go net_${GOOS}.go parse.go port.go >Makefile
O=6
GC=$(O)g
CC=$(O)c -w