-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Description
by kirklin.mcdonald:
The attached patch adds support for four new variables to Make.pkg. Specifying the BIN variable in a Makefile that includes Make.pkg will cause the resulting package to be linked into a binary, with the name given by $BIN. GOFLAGS allows the user to specify additional flags to pass to the compiler. In particular, this includes additional -I flags. GLFLAGS allows the user to specify additional flags to the linker. This is a counterpart to the BIN variable, given that the $BIN rule is the only one which invokes $(LD). This is particularly useful for specifying a -L flag. PREFIX permits the user to specify an alternative to GOROOT for the purposes of installing a package. (It more or less just GOROOT_QUOTED renamed.) (A separate variable from GOROOT is required for this purpose, as GOROOT is what permits the user's Makefile to find Make.pkg in the first place.) The latter three varaibles, taken together, permit the user to create a directory for third-party libraries, separate from the standard library. Setting GOFLAGS and GLFLAGS in .bashrc allows future builds to see this third-party directory. Setting PREFIX at 'make install'-time installs packages into this directory.
Attachments:
- Make.pkg.diff (1994 bytes)