diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2021-09-04 14:05:11 -0700 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2021-09-04 14:05:11 -0700 |
commit | 5ef14d07420c299ecd8de96928a5d1ce1e232df3 (patch) | |
tree | 5935e55ff1d193d27853e287b033dc8f824f1df8 /go/Makefile | |
parent | 99799844ad9272d43892881d1090369e6032aec2 (diff) | |
download | libcap2-5ef14d07420c299ecd8de96928a5d1ce1e232df3.tar.gz |
Refactor top level Makefile to reduce redundant building
Make build a bit quicker for folk that don't want to run tests.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Diffstat (limited to 'go/Makefile')
-rw-r--r-- | go/Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/go/Makefile b/go/Makefile index 5af5321..2b2061b 100644 --- a/go/Makefile +++ b/go/Makefile @@ -14,8 +14,9 @@ IMPORTDIR=kernel.org/pub/linux/libs/security/libcap PKGDIR=pkg/$(GOOSARCH)/$(IMPORTDIR) DEPS=../libcap/libcap.a ../libcap/libpsx.a +TESTS=compare-cap try-launching psx-signals -all: PSXGOPACKAGE CAPGOPACKAGE web setid gowns captree compare-cap try-launching psx-signals +all: PSXGOPACKAGE CAPGOPACKAGE web setid gowns captree $(DEPS): $(MAKE) -C ../libcap all @@ -93,7 +94,7 @@ endif b210613: b210613.go CAPGOPACKAGE CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GO) build -mod=vendor $< -test: all +test: all $(TESTS) CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) $(GO) test -mod=vendor $(IMPORTDIR)/psx CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) $(GO) test -mod=vendor $(IMPORTDIR)/cap LD_LIBRARY_PATH=../libcap ./compare-cap |