# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-include $(GOROOT)/src/Make.inc
+include ../src/Make.inc
TARG=htmlgen
GOFILES=\
htmlgen.go\
-include $(GOROOT)/src/Make.cmd
+include ../src/Make.cmd
all: index.html
-# ugly hack to deal with whitespaces in $GOROOT
-nullstring :=
-space := $(nullstring) # a space at the end
-QUOTED_GOROOT:=$(subst $(space),\ ,$(GOROOT))
-
-include $(QUOTED_GOROOT)/src/Make.common
+include ../../../src/Make.common
CLEANFILES+=index.html srcextract.bin htmlify.bin
rm -f final.6 final.bin
%.bin: %.$O
- $(QUOTED_GOBIN)/$(LD) -o $@ $<
-%.$O:
- $(QUOTED_GOBIN)/$(GC) $*.go
+ $(LD) -o $@ $<
+%.$O:
+ $(GC) $*.go
set -e
-GOBIN="${GOBIN:-$HOME/bin}"
-
-eval $("$GOBIN"/gomake -f ../../src/Make.inc go-env)
+eval $(gomake -f ../../src/Make.inc go-env)
if [ -z "$O" ]; then
echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
; do
BASE=$(basename $i .go)
- "$GOBIN"/$GC $i
+ $GC $i
done
function testit {
- "$GOBIN"/$LD $1.$O
+ $LD $1.$O
x=$(echo $(./$O.out $2 2>&1)) # extra echo canonicalizes
if [ "$x" != "$3" ]
then
}
function testitpipe {
- "$GOBIN"/$LD $1.$O
+ $LD $1.$O
x=$(echo $(./$O.out | $2 2>&1)) # extra echo canonicalizes
if [ "$x" != "$3" ]
then
testitpipe sieve "sed 10q" "2 3 5 7 11 13 17 19 23 29"
# server hangs; don't run it, just compile it
-"$GOBIN"/$GC server.go
+$GC server.go
testit server1 "" ""
rm -f $O.out *.$O
include ../../../src/Make.pkg
%: install %.go
- $(QUOTED_GOBIN)/$(GC) $*.go
- $(QUOTED_GOBIN)/$(LD) -o $@ $*.$O
+ $(GC) $*.go
+ $(LD) -o $@ $*.$O
# license that can be found in the LICENSE file.
set -e
-GOBIN="${GOBIN:-$HOME/bin}"
-"$GOBIN"/gomake hello fib chain
+gomake hello fib chain
echo '*' hello >run.out
./hello >>run.out
echo '*' fib >>run.out
echo '*' chain >>run.out
./chain >>run.out
diff run.out golden.out
-"$GOBIN"/gomake clean
+gomake clean
rm -rf *.o *.a *.[$(OS)] [$(OS)].out $(CLEANFILES)
%.make:
- (cd $* && $(QUOTED_GOBIN)/gomake install)
+ (cd $* && gomake install)
.PHONY: all clean nuke install coverage test bench testpackage-clean\
importpath dir
if test -f clean.bash; then
bash clean.bash
else
- "$GOBIN"/gomake clean
+ gomake clean
fi
)done
rm -f _builtin.c
for i in runtime unsafe
do
- "$GOBIN"/$GC -A $i.go
+ $GC -A $i.go
O=$O ./mkbuiltin1 $i >>_builtin.c
done
bash make.bash
;;
pkg)
- "$GOBIN"/gomake install
+ gomake install
;;
*)
- "$GOBIN"/gomake install
+ gomake install
esac
) || exit 1
esac
# Implemented as a function so that all.bash can repeat the output
# after run.bash finishes running all the tests.
installed() {
- eval $("$GOBIN"/gomake -f Make.inc go-env)
+ eval $(gomake -f Make.inc go-env)
echo
echo ---
echo Installed Go for $GOOS/$GOARCH in "$GOROOT".
include ../../../Make.pkg
main.$O: main.go $(pkgdir)/$(TARG).a
- $(QUOTED_GOBIN)/$(GC) $<
+ $(GC) $<
eval: main.$O
- $(QUOTED_GOBIN)/$(LD) -o $@ $<
+ $(LD) -o $@ $<
gen.$O: gen.go
- $(QUOTED_GOBIN)/$(GC) $<
+ $(GC) $<
generate: gen.$O $(pkgdir)/$(TARG).a
- $(QUOTED_GOBIN)/$(LD) -o $@ $<;\
+ $(LD) -o $@ $<;\
./generate > expr1.go;\
gofmt -w expr1.go
set -e
-GOBIN="${GOBIN:-$HOME/bin}"
-
-"$GOBIN"/gomake
-"$GOBIN"/6g main.go && "$GOBIN"/6l main.6
+gomake
+6g main.go && 6l main.6
(
for i in $(egrep -l '// \$G (\$D/)?\$F\.go \&\& \$L \$F\.\$A && \./\$A\.out' "$GOROOT"/test/*.go "$GOROOT"/test/*/*.go)
do
include ../../../Make.pkg
main.$O: main.go package
- $(QUOTED_GOBIN)/$(GC) -I_obj $<
+ $(GC) -I_obj $<
ogle: main.$O
- $(QUOTED_GOBIN)/$(LD) -L_obj -o $@ $<
+ $(LD) -L_obj -o $@ $<
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-include $(GOROOT)/src/Make.inc
+include ../../../Make.inc
TARG=image/jpeg
GOFILES=\
idct.go\
reader.go\
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
mv -f $@.x $@
goc2c: goc2c.c
- $(QUOTED_GOBIN)/quietgcc -o $@ $<
+ quietgcc -o $@ $<
mkversion: mkversion.c
- $(QUOTED_GOBIN)/quietgcc -o $@ -I "$(GOROOT)/include" $< "$(GOROOT)/lib/lib9.a"
+ quietgcc -o $@ -I "$(GOROOT)/include" $< "$(GOROOT)/lib/lib9.a"
version.go: mkversion
./mkversion >version.go
mv -f $@.tmp $@
%.$O: $(GOARCH)/%.c
- $(QUOTED_GOBIN)/$(CC) $(CFLAGS) $<
+ $(CC) $(CFLAGS) $<
%.$O: $(GOOS)/%.c
- $(QUOTED_GOBIN)/$(CC) $(CFLAGS) $<
+ $(CC) $(CFLAGS) $<
%.$O: $(GOOS)/$(GOARCH)/%.c
- $(QUOTED_GOBIN)/$(CC) $(CFLAGS) $<
+ $(CC) $(CFLAGS) $<
%.$O: $(GOARCH)/%.s $(GOARCH)/asm.h
- $(QUOTED_GOBIN)/$(AS) $<
+ $(AS) $<
%.$O: $(GOOS)/$(GOARCH)/%.s $(GOARCH)/asm.h
- $(QUOTED_GOBIN)/$(AS) $<
+ $(AS) $<
# for discovering offsets inside structs when debugging
runtime.acid.$(GOARCH): runtime.h proc.c
- $(QUOTED_GOBIN)/$(CC) $(CFLAGS) -a proc.c >$@
+ $(CC) $(CFLAGS) -a proc.c >$@
# 386 traceback is really amd64 traceback
ifeq ($(GOARCH),386)
traceback.$O: amd64/traceback.c
- $(QUOTED_GOBIN)/$(CC) $(CFLAGS) $<
+ $(CC) $(CFLAGS) $<
endif
# NaCl closure is special.
ifeq ($(GOOS),nacl)
closure.$O: nacl/$(GOARCH)/closure.c
- $(QUOTED_GOBIN)/$(CC) $(CFLAGS) $<
+ $(CC) $(CFLAGS) $<
endif
# license that can be found in the LICENSE file.
# The master for this file is $GOROOT/src/quietgcc.bash
-# Changes made to $HOME/bin/quietgcc will be overridden.
+# Changes made to $GOBIN/quietgcc will be overridden.
# Gcc output that we don't care to see.
ignore=': error: .Each undeclared identifier'
(
xcd $i
if $rebuild; then
- "$GOBIN"/gomake clean
- time "$GOBIN"/gomake
- "$GOBIN"/gomake install
+ gomake clean
+ time gomake
+ gomake install
fi
- "$GOBIN"/gomake test
+ gomake test
) || exit $?
done
}
(xcd pkg/sync;
if $rebuild; then
- "$GOBIN"/gomake clean;
- time "$GOBIN"/gomake
+ gomake clean;
+ time gomake
fi
-GOMAXPROCS=10 "$GOBIN"/gomake test
+GOMAXPROCS=10 gomake test
) || exit $?
(xcd cmd/gofmt
if $rebuild; then
- "$GOBIN"/gomake clean;
- time "$GOBIN"/gomake
+ gomake clean;
+ time gomake
fi
-time "$GOBIN"/gomake smoketest
+time gomake smoketest
) || exit $?
(xcd cmd/ebnflint
if $rebuild; then
- "$GOBIN"/gomake clean;
- time "$GOBIN"/gomake
+ gomake clean;
+ time gomake
fi
-time "$GOBIN"/gomake test
+time gomake test
) || exit $?
(xcd ../misc/cgo/stdio
-"$GOBIN"/gomake clean
+gomake clean
./test.bash
) || exit $?
(xcd pkg/exp/ogle
-"$GOBIN"/gomake clean
-time "$GOBIN"/gomake ogle
+gomake clean
+time gomake ogle
) || exit $?
(xcd ../doc/progs
set -e
-GOBIN="${GOBIN:-$HOME/bin}"
-
-eval $("$GOBIN"/gomake --no-print-directory -f ../../src/Make.inc go-env)
+eval $(gomake --no-print-directory -f ../../src/Make.inc go-env)
PATH=.:$PATH
mode=run
esac
gc() {
- "$GOBIN"/$GC $1.go; "$GOBIN"/$LD $1.$O
+ $GC $1.go; $LD $1.$O
}
gc_B() {
- "$GOBIN"/$GC -B $1.go; "$GOBIN"/$LD $1.$O
+ $GC -B $1.go; $LD $1.$O
}
runonly() {
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-GOBIN="${GOBIN:-$HOME/bin}"
-eval $("$GOBIN"/gomake --no-print-directory -f ../src/Make.inc go-env)
+eval $(gomake --no-print-directory -f ../src/Make.inc go-env)
case X"$GOARCH" in
Xamd64)
failed=0
-PATH=/bin:/usr/bin:/usr/local/bin:${GOBIN:-$HOME/bin}:`pwd`
+PATH=/bin:/usr/bin:/usr/local/bin:${GOBIN:-$GOROOT/bin}:`pwd`
RUNFILE=/tmp/gorun-$$-$USER
TMP1FILE=/tmp/gotest1-$$-$USER
export L=${A}l
export GOTRACEBACK=0
-PATH=/bin:/usr/bin:/usr/local/bin:${GOBIN:-$HOME/bin}:`pwd`
+PATH=/bin:/usr/bin:/usr/local/bin:${GOBIN:-$GOROOT/bin}:`pwd`
RUNFILE=/tmp/gorun-$$-$USER
TMP1FILE=/tmp/gotest1-$$-$USER