]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix build
authorRuss Cox <rsc@golang.org>
Fri, 16 Dec 2011 22:58:53 +0000 (17:58 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 16 Dec 2011 22:58:53 +0000 (17:58 -0500)
I am looking forward to not supporting two build
systems simultaneously.  Make complains about
a circular dependency still, but I don't understand it
and it's probably not worth the time to figure out.

TBR=r
CC=golang-dev
https://golang.org/cl/5496058

src/pkg/runtime/Makefile
src/pkg/runtime/Makefile.auto

index 75443324da2fee25c89b283fd5c8782198b2a50e..4d81def5a837f2671d11ac6e265b977faea22607 100644 (file)
@@ -4,6 +4,8 @@
 
 include ../../Make.inc
 
+x:=$(shell gomake -f Makefile.auto)
+
 TARG=runtime
 
 GOFILES=\
@@ -106,7 +108,6 @@ AUTOHFILES=\
        os_GOOS.h\
        signals_GOOS.h\
        defs_GOOS_GOARCH.h\
-       zasm_GOOS_GOARCH.h\
 
 HFILES=\
        cgocall.h\
@@ -114,7 +115,6 @@ HFILES=\
        hashmap.h\
        malloc.h\
        stack.h\
-       asm_$(GOARCH).h\
        $(AUTOHFILES)\
 
 GOFILES+=$(GOFILES_$(GOOS))
@@ -155,3 +155,5 @@ signals_GOOS.h: signals_$(GOOS).h
 
 zasm_GOOS_GOARCH.h: zasm_$(GOOS)_$(GOARCH).h
        cp $^ $@
+
+%.$O: zasm_GOOS_GOARCH.h
index b3b31c8ccab1dcb566e21dc0b2cebab25a5fab57..7c9ceb0fa71a135ef73e19e711e0e14da36e8e50 100644 (file)
@@ -2,6 +2,8 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
+include ../../Make.inc
+
 GOARCHES=\
        386\
        amd64\
@@ -48,6 +50,13 @@ AUTO=\
        zsyscall_windows_amd64.c\
        zversion.go\
 
+HFILES=\
+       arch_GOARCH.h\
+       os_GOOS.h\
+       signals_GOOS.h\
+       defs_GOOS_GOARCH.h\
+       zasm_GOOS_GOARCH.h\
+
 all: auto
 auto: $(AUTO)
 
@@ -86,9 +95,24 @@ zruntime_defs_%.go: proc.c iface.c hashmap.c chan.c $(HFILES) mkgodefs.sh
        mv -f $@.tmp $@
 
 # struct field offsets #defined for assembly
-zasm_%.h: mkasmh.sh proc.c defs.h
+zasm_%.h: mkasmh.sh proc.c $(HFILES)
        ./mkasmh.sh $* >$@.tmp
        mv -f $@.tmp $@
 
 clean:
        rm -f goc2c mkversion $(AUTO)
+
+arch_GOARCH.h: arch_$(GOARCH).h
+       cp $^ $@
+
+defs_GOOS_GOARCH.h: defs_$(GOOS)_$(GOARCH).h
+       cp $^ $@
+
+os_GOOS.h: os_$(GOOS).h
+       cp $^ $@
+
+signals_GOOS.h: signals_$(GOOS).h
+       cp $^ $@
+
+zasm_GOOS_GOARCH.h: zasm_$(GOOS)_$(GOARCH).h
+       cp $^ $@