From a413c6353dbfff5221ea020ff8e1475d5ee17a81 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 10 Oct 2017 13:23:50 +0200 Subject: build: make it possible to build cleanly 2x in a row MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'make clean' does not cleanup everything, and some of the files get cleaned too eagerly. Several files are being packaged in a 'make dist' tarball, that get rebuild each time anyway. Specifically, this change prevents - libglusterfs/src/generator.pyc from laying around - keeping rpc/xdr/gen/*.x symlinks - modifying tests/basic/{fuse,gfapi}/Makefile each run - including tests/env.rc and events/src/eventtypes.py in the tarball Change-Id: I774dd1abf3a9d3b6a89b938cf6ee7d7792c59a82 BUG: 1501317 Reported-by: Patrick Matthäi Signed-off-by: Niels de Vos --- tests/basic/fuse/Makefile | 12 ++++++++++++ tests/basic/fuse/Makefile.am | 12 ------------ tests/basic/gfapi/Makefile | 21 +++++++++++++++++++++ tests/basic/gfapi/Makefile.am | 21 --------------------- 4 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 tests/basic/fuse/Makefile delete mode 100644 tests/basic/fuse/Makefile.am create mode 100644 tests/basic/gfapi/Makefile delete mode 100644 tests/basic/gfapi/Makefile.am (limited to 'tests') diff --git a/tests/basic/fuse/Makefile b/tests/basic/fuse/Makefile new file mode 100644 index 00000000000..c446d253228 --- /dev/null +++ b/tests/basic/fuse/Makefile @@ -0,0 +1,12 @@ +CFLAGS = -Wall -g +LDFLAGS = + +BINARIES = seek + +%: %.c + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ + +all: $(BINARIES) + +clean: + -$(RM) $(BINARIES) diff --git a/tests/basic/fuse/Makefile.am b/tests/basic/fuse/Makefile.am deleted file mode 100644 index c446d253228..00000000000 --- a/tests/basic/fuse/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -CFLAGS = -Wall -g -LDFLAGS = - -BINARIES = seek - -%: %.c - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ - -all: $(BINARIES) - -clean: - -$(RM) $(BINARIES) diff --git a/tests/basic/gfapi/Makefile b/tests/basic/gfapi/Makefile new file mode 100644 index 00000000000..e30fefea5b9 --- /dev/null +++ b/tests/basic/gfapi/Makefile @@ -0,0 +1,21 @@ +## compiles against the *system* version of libgfapi, +## but not the libgfapi for the testcases + +CFLAGS = -Wall -g $(shell pkg-config --cflags glusterfs-api) +LDFLAGS = $(shell pkg-config --libs glusterfs-api) + +BINARIES = upcall-cache-invalidate libgfapi-fini-hang anonymous_fd seek \ + bug1283983 bug1291259 gfapi-ssl-test gfapi-load-volfile + +%: %.c + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ + +all: check-pkgconfig $(BINARIES) + +clean: + -$(RM) $(BINARIES) + +.phony: check-pkgconfig + +check-pkgconfig: + pkg-config --exists glusterfs-api diff --git a/tests/basic/gfapi/Makefile.am b/tests/basic/gfapi/Makefile.am deleted file mode 100644 index e30fefea5b9..00000000000 --- a/tests/basic/gfapi/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -## compiles against the *system* version of libgfapi, -## but not the libgfapi for the testcases - -CFLAGS = -Wall -g $(shell pkg-config --cflags glusterfs-api) -LDFLAGS = $(shell pkg-config --libs glusterfs-api) - -BINARIES = upcall-cache-invalidate libgfapi-fini-hang anonymous_fd seek \ - bug1283983 bug1291259 gfapi-ssl-test gfapi-load-volfile - -%: %.c - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ - -all: check-pkgconfig $(BINARIES) - -clean: - -$(RM) $(BINARIES) - -.phony: check-pkgconfig - -check-pkgconfig: - pkg-config --exists glusterfs-api -- cgit