Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
2fc96269
Commit
2fc96269
authored
Jul 26, 2011
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
goinstall: generate makefiles using exp/template
R=golang-dev, adg CC=golang-dev
https://golang.org/cl/4809052
parent
7e1101d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
29 deletions
+24
-29
make.go
src/cmd/goinstall/make.go
+24
-29
No files found.
src/cmd/goinstall/make.go
View file @
2fc96269
...
...
@@ -8,11 +8,11 @@ package main
import
(
"bytes"
"exp/template"
"go/build"
"os"
"path/filepath"
"strings"
"template"
)
// domake builds the package in dir.
...
...
@@ -138,43 +138,38 @@ type makedata struct {
Imports
[]
string
// gc/ld import paths
}
var
makefileTemplate
=
template
.
MustParse
(
`
var
makefileTemplate
=
template
.
New
(
"Makefile"
)
.
MustParse
(
`
include $(GOROOT)/src/Make.inc
TARG={
Targ
}
TARGDIR={
TargDir
}
TARG={
{.Targ}
}
TARGDIR={
{.TargDir}
}
{
.section GoFiles
}
{
{with .GoFiles}
}
GOFILES=\
{.repeated section @}
{@}\
{.end}
{{range .}} {{.}}\
{{end}}
{
.end
}
{
.section OFiles
}
{
{end}
}
{
{with .OFiles}
}
OFILES=\
{.repeated section @}
{@}\
{.end}
{{range .}} {{.}}\
{{end}}
{
.end
}
{
.section CgoFiles
}
{
{end}
}
{
{with .CgoFiles}
}
CGOFILES=\
{.repeated section @}
{@}\
{.end}
{{range .}} {{.}}\
{{end}}
{
.end
}
{
.section CgoOFiles
}
{
{end}
}
{
{with .CgoOFiles}
}
CGO_OFILES=\
{.repeated section @}
{@}\
{.end}
{{range .}} {{.}}\
{{end}}
{
.end
}
GCIMPORTS={
.repeated section Imports}-I "{@}" {.end
}
LDIMPORTS={
.repeated section Imports}-L "{@}" {.end
}
{
{end}
}
GCIMPORTS={
{range .Imports}}-I "{{.}}" {{end}
}
LDIMPORTS={
{range .Imports}}-L "{{.}}" {{end}
}
include $(GOROOT)/src/Make.{Type}
`
,
nil
)
include $(GOROOT)/src/Make.{{.Type}}
`
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment