summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2017-10-10 13:23:50 +0200
committerJeff Darcy <jeff@pl.atyp.us>2017-10-13 16:28:55 +0000
commita413c6353dbfff5221ea020ff8e1475d5ee17a81 (patch)
treec09014d0d29fe99edff678c5861da13e1986febb
parentc64fd0d4b0ef313bb44aae68a376ec0c9ee8657a (diff)
build: make it possible to build cleanly 2x in a row
'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 <pmatthaei@debian.org> Signed-off-by: Niels de Vos <ndevos@redhat.com>
-rw-r--r--.gitignore2
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac4
-rw-r--r--events/src/Makefile.am2
-rw-r--r--libglusterfs/src/Makefile.am3
-rw-r--r--rpc/xdr/gen/Makefile.am2
-rw-r--r--tests/basic/fuse/Makefile (renamed from tests/basic/fuse/Makefile.am)0
-rw-r--r--tests/basic/gfapi/Makefile (renamed from tests/basic/gfapi/Makefile.am)0
8 files changed, 13 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 2f7b8ca8b8f..45a5e878f6c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -97,6 +97,8 @@ libtool
# copied XDR for cyclic libglusterfs <-> rpc-header dependency
rpc/xdr/gen/*.x
run-tests.sh
+!tests/basic/fuse/Makefile
+!tests/basic/gfapi/Makefile
tests/env.rc
tests/utils/arequal-checksum
xlators/features/glupy/src/__init__.py
diff --git a/Makefile.am b/Makefile.am
index e4172159875..bbf121a0059 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,7 +22,7 @@ pkgconfig_DATA += libgfdb.pc
endif
CLEANFILES = glusterfs-api.pc libgfchangelog.pc libgfdb.pc \
- tests/env.rc contrib/umountd/Makefile{,.in}
+ tests/env.rc contrib/umountd/Makefile
CONFIG_CLEAN_FILES = $(CONTRIB_BUILDDIR)/uuid/uuid_types.h
gitclean: distclean
@@ -41,10 +41,14 @@ gitclean: distclean
-rm -f $(CONTRIBDIR)/argp-standalone/install-sh
-rm -f $(CONTRIBDIR)/argp-standalone/missing
+# dist-hook gets executed with 'make dist', this is the only target getting
+# executed, a dist-hook in other Makefile.am files seem to get ignored.
dist-hook: gen-VERSION gen-ChangeLog
-rm -fr $(distdir)/contrib/argp-standalone/autom4te.cache
-rm -fr $(distdir)/contrib/argp-standalone/.deps
-rm -fr $(distdir)/contrib/umountd/.deps
+ -rm -f $(distdir)/events/src/eventtypes.py
+ -rm -f $(distdir)/tests/env.rc
-cp -f $(top_srcdir)/build-aux/config.sub.dist $(distdir)/config.sub
-cp -f $(top_srcdir)/build-aux/config.guess.dist $(distdir)/config.guess
diff --git a/configure.ac b/configure.ac
index 4e0b4aeffa8..418ded7fe87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -285,9 +285,7 @@ AC_CONFIG_FILES([Makefile
tools/glusterfind/Makefile
tools/glusterfind/src/Makefile
tools/setgfid2path/Makefile
- tools/setgfid2path/src/Makefile
- tests/basic/fuse/Makefile
- tests/basic/gfapi/Makefile])
+ tools/setgfid2path/src/Makefile])
AC_CANONICAL_HOST
diff --git a/events/src/Makefile.am b/events/src/Makefile.am
index 8493abdcd82..4308ccdbb22 100644
--- a/events/src/Makefile.am
+++ b/events/src/Makefile.am
@@ -8,6 +8,8 @@ CLEANFILES = eventtypes.py
eventsdir = $(GLUSTERFS_LIBEXECDIR)/events
events_PYTHON = __init__.py gf_event.py eventsapiconf.py eventtypes.py \
utils.py
+# this does not work, see the Makefile.am in the root for a workaround
+#nodist_events_PYTHON = eventtypes.py
eventtypes.py: $(top_srcdir)/events/eventskeygen.py
$(PYTHON) $(top_srcdir)/events/eventskeygen.py PY_HEADER
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am
index ac57c961143..094646c5e3f 100644
--- a/libglusterfs/src/Makefile.am
+++ b/libglusterfs/src/Makefile.am
@@ -102,7 +102,8 @@ y.tab.h: graph.y
defaults.c: defaults-tmpl.c generator.py gen-defaults.py
$(PYTHON) $(srcdir)/gen-defaults.py $(srcdir)/defaults-tmpl.c > $@
-CLEANFILES = $(nodist_libglusterfs_la_SOURCES) $(nodist_libglusterfs_la_HEADERS)
+CLEANFILES = $(nodist_libglusterfs_la_SOURCES) \
+ $(nodist_libglusterfs_la_HEADERS) *.pyc
if UNITTEST
CLEANFILES += *.gcda *.gcno *_xunit.xml
diff --git a/rpc/xdr/gen/Makefile.am b/rpc/xdr/gen/Makefile.am
index 6cffca4c3ac..b1c8e9333d6 100644
--- a/rpc/xdr/gen/Makefile.am
+++ b/rpc/xdr/gen/Makefile.am
@@ -4,7 +4,7 @@ XDRGENFILES = glusterfs3-xdr.x cli1-xdr.x nlm4-xdr.x nsm-xdr.x \
XDRHEADERS = $(XDRGENFILES:.x=.h)
XDRSOURCES = $(XDRGENFILES:.x=.c)
-CLEANFILES = $(XDRSOURCES) $(XDRHEADERS)
+CLEANFILES = $(XDRSOURCES) $(XDRHEADERS) $(XDRGENFILES)
# trick automake into doing BUILT_SOURCES magic
BUILT_SOURCES = $(XDRHEADERS) $(XDRSOURCES)
diff --git a/tests/basic/fuse/Makefile.am b/tests/basic/fuse/Makefile
index c446d253228..c446d253228 100644
--- a/tests/basic/fuse/Makefile.am
+++ b/tests/basic/fuse/Makefile
diff --git a/tests/basic/gfapi/Makefile.am b/tests/basic/gfapi/Makefile
index e30fefea5b9..e30fefea5b9 100644
--- a/tests/basic/gfapi/Makefile.am
+++ b/tests/basic/gfapi/Makefile