diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-03-05 21:53:50 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-03-05 21:54:48 -0800 |
commit | 4499422308b9fdb7c93b10c51a828285cb614d34 (patch) | |
tree | d3b102342e056f1bc8a3d60ae4c10c46376ca8ef /Examples/Makefile.in | |
parent | 747a51f09518eede4b2c6f5e9af8f95865fa4d7d (diff) | |
download | swig-4499422308b9fdb7c93b10c51a828285cb614d34.tar.gz |
swig -go: fail test if "go build" fails
Diffstat (limited to 'Examples/Makefile.in')
-rw-r--r-- | Examples/Makefile.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Examples/Makefile.in b/Examples/Makefile.in index 67db611b7..5a1fa7188 100644 --- a/Examples/Makefile.in +++ b/Examples/Makefile.in @@ -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 |