swig -go: fail test if "go build" fails
This commit is contained in:
parent
747a51f095
commit
4499422308
1 changed files with 16 additions and 0 deletions
|
|
@ -1472,6 +1472,10 @@ go: $(SRCDIR_SRCS) $(GOPATHPARENTDIR)/go.mod
|
|||
CGO_LDFLAGS="$(LDFLAGS) -lm"; \
|
||||
export CGO_LDFLAGS; \
|
||||
(cd $(GOPATHDIR)/ && $(COMPILETOOL) $(GO) build `if $(GOGCC); then echo -compiler=gccgo; fi` -o $(GOPACKAGE)); \
|
||||
stat=$$?; \
|
||||
if test $$stat != 0; then \
|
||||
exit $$stat; \
|
||||
fi; \
|
||||
if $(GOGCC); then \
|
||||
cp $(GOPATHDIR)/$(GOPACKAGE) $(GOPATHDIR)/$(GOPACKAGE:.a=.gox); \
|
||||
fi; \
|
||||
|
|
@ -1480,6 +1484,10 @@ go: $(SRCDIR_SRCS) $(GOPATHPARENTDIR)/go.mod
|
|||
mkdir gopath/$(GOMOD)/src/swigtests/$(INTERFACE:.i=) 2>/dev/null || true; \
|
||||
cp $(GOPATHDIR)/* gopath/$(GOMOD)/src/swigtests/$(INTERFACE:.i=)/; \
|
||||
(cd gopath/$(GOMOD)/src/runme && $(COMPILETOOL) $(GO) build `if $(GOGCC); then echo -compiler=gccgo; fi` -o runme $(RUNME).go); \
|
||||
stat=$$?; \
|
||||
if test $$stat != 0; then \
|
||||
exit $$stat; \
|
||||
fi; \
|
||||
cp gopath/$(GOMOD)/src/runme/runme $(RUNME); \
|
||||
fi
|
||||
|
||||
|
|
@ -1523,6 +1531,10 @@ go_cpp: $(SRCDIR_SRCS) $(GOPATHPARENTDIR)/go.mod
|
|||
CGO_LDFLAGS="$(LDFLAGS) -lm"; \
|
||||
export CGO_LDFLAGS; \
|
||||
(cd $(GOPATHDIR) && $(COMPILETOOL) $(GO) build `if $(GOGCC); then echo -compiler=gccgo; fi` -o $(GOPACKAGE)); \
|
||||
stat=$$?; \
|
||||
if test $$stat != 0; then \
|
||||
exit $$stat; \
|
||||
fi; \
|
||||
if $(GOGCC); then \
|
||||
cp $(GOPATHDIR)/$(GOPACKAGE) $(GOPATHDIR)/$(GOPACKAGE:.a=.gox); \
|
||||
fi; \
|
||||
|
|
@ -1531,6 +1543,10 @@ go_cpp: $(SRCDIR_SRCS) $(GOPATHPARENTDIR)/go.mod
|
|||
mkdir gopath/$(GOMOD)/src/swigtests/$(INTERFACE:.i=) 2>/dev/null || true; \
|
||||
cp $(GOPATHDIR)/* gopath/$(GOMOD)/src/swigtests/$(INTERFACE:.i=)/; \
|
||||
(cd gopath/$(GOMOD)/src/runme && $(COMPILETOOL) $(GO) build `if $(GOGCC); then echo -compiler=gccgo; fi` -o runme $(RUNME).go); \
|
||||
stat=$$?; \
|
||||
if test $$stat != 0; then \
|
||||
exit $$stat; \
|
||||
fi; \
|
||||
cp gopath/$(GOMOD)/src/runme/runme $(RUNME); \
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue