build: make clean and dist consistent

We weren't cleaning up some files (a whole lot of python foobar) and had
some files in the dist tarball that don't quite belong there.

Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
David Lamparter 2018-10-24 17:44:04 +02:00
parent 62e712146b
commit 67cf020d17
6 changed files with 19 additions and 6 deletions

View file

@ -82,6 +82,7 @@ var-%:
EXTRA_DIST = EXTRA_DIST =
BUILT_SOURCES = BUILT_SOURCES =
CLEANFILES = CLEANFILES =
DISTCLEANFILES =
examplesdir = $(exampledir) examplesdir = $(exampledir)
@ -216,6 +217,12 @@ EXTRA_DIST += \
noinst_HEADERS += defaults.h noinst_HEADERS += defaults.h
clean-local: clean-python
.PHONY: clean-python
clean-python:
find -name __pycache__ -o -name .pytest_cache | xargs rm -rf
find -name "*.pyc" -o -name "*_clippy.c" | xargs rm -f
indent: indent:
tools/indent.py `find sharpd bgpd eigrpd include isisd lib nhrpd ospf6d ospfd pimd qpb ripd vtysh zebra -name '*.[ch]' | grep -v include/linux` tools/indent.py `find sharpd bgpd eigrpd include isisd lib nhrpd ospf6d ospfd pimd qpb ripd vtysh zebra -name '*.[ch]' | grep -v include/linux`

View file

@ -34,7 +34,8 @@ man_RSTFILES = \
EXTRA_DIST += $(man_RSTFILES) EXTRA_DIST += $(man_RSTFILES)
MANBUILD = doc/manpages/_build/man MANPARENT = doc/manpages/_build
MANBUILD = $(MANPARENT)/man
doc/manpages/_build/.doctrees/environment.pickle: $(man_RSTFILES) doc/manpages/_build/.doctrees/environment.pickle: $(man_RSTFILES)
# #
@ -66,7 +67,7 @@ $(man8) $(man1): $(MANBUILD)/man.stamp
clean-local: clean-manpages clean-local: clean-manpages
.PHONY: clean-manpages .PHONY: clean-manpages
clean-manpages: clean-manpages:
-rm -rf $(MANBUILD) -rm -rf $(MANPARENT)
doc: doc-man doc: doc-man
.PHONY: doc-man .PHONY: doc-man

View file

@ -336,6 +336,7 @@ lib/lib_clippy-command_parse.$(OBJEXT): lib/command_lex.h
lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl
@PERL@ $(top_srcdir)/lib/route_types.pl < $(top_srcdir)/lib/route_types.txt > $@ @PERL@ $(top_srcdir)/lib/route_types.pl < $(top_srcdir)/lib/route_types.txt > $@
DISTCLEANFILES += lib/route_types.h
if GIT_VERSION if GIT_VERSION
# bit of a trick here to always have up-to-date git stamps without triggering # bit of a trick here to always have up-to-date git stamps without triggering

View file

@ -84,6 +84,7 @@ tests/lib/cli/test_commands_defun.c: vtysh/vtysh_cmd.c
-e 's/VTYSH_[A-Z][A-Z_0-9]*/0/g' \ -e 's/VTYSH_[A-Z][A-Z_0-9]*/0/g' \
< vtysh/vtysh_cmd.c \ < vtysh/vtysh_cmd.c \
> "$@" > "$@"
CLEANFILES += tests/lib/cli/test_commands_defun.c
tests/isisd/test_fuzz_isis_tlv_tests.h: $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz tests/isisd/test_fuzz_isis_tlv_tests.h: $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz
gzip -d < $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz > "$@" gzip -d < $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz > "$@"
@ -166,7 +167,8 @@ tests_lib_cli_test_cli_SOURCES = tests/lib/cli/test_cli.c tests/lib/cli/common_c
tests_lib_cli_test_commands_CFLAGS = $(TESTS_CFLAGS) tests_lib_cli_test_commands_CFLAGS = $(TESTS_CFLAGS)
tests_lib_cli_test_commands_CPPFLAGS = $(TESTS_CPPFLAGS) tests_lib_cli_test_commands_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_lib_cli_test_commands_LDADD = $(ALL_TESTS_LDADD) tests_lib_cli_test_commands_LDADD = $(ALL_TESTS_LDADD)
tests_lib_cli_test_commands_SOURCES = tests/lib/cli/test_commands_defun.c tests/lib/cli/test_commands.c tests/helpers/c/prng.c nodist_tests_lib_cli_test_commands_SOURCES = tests/lib/cli/test_commands_defun.c
tests_lib_cli_test_commands_SOURCES = tests/lib/cli/test_commands.c tests/helpers/c/prng.c
tests_lib_test_buffer_CFLAGS = $(TESTS_CFLAGS) tests_lib_test_buffer_CFLAGS = $(TESTS_CFLAGS)
tests_lib_test_buffer_CPPFLAGS = $(TESTS_CPPFLAGS) tests_lib_test_buffer_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_lib_test_buffer_LDADD = $(ALL_TESTS_LDADD) tests_lib_test_buffer_LDADD = $(ALL_TESTS_LDADD)
@ -293,3 +295,8 @@ EXTRA_DIST += \
tests/tests.xml: $(check_PROGRAMS) tests/tests.xml: $(check_PROGRAMS)
( cd tests; $(PYTHON) ../$(srcdir)/tests/runtests.py --junitxml=tests.xml -v ../$(srcdir)/tests; ) ( cd tests; $(PYTHON) ../$(srcdir)/tests/runtests.py --junitxml=tests.xml -v ../$(srcdir)/tests; )
check: tests/tests.xml check: tests/tests.xml
clean-local: clean-tests
.PHONY: clean-tests
clean-tests:
-rm -f tests/tests.xml

View file

@ -17,7 +17,6 @@ tools_ssd_SOURCES = tools/start-stop-daemon.c
EXTRA_DIST += \ EXTRA_DIST += \
tools/etc \ tools/etc \
tools/frr \
tools/frr-reload \ tools/frr-reload \
tools/frr-reload.py \ tools/frr-reload.py \
tools/frr.service \ tools/frr.service \

View file

@ -26,8 +26,6 @@ noinst_HEADERS += \
vtysh_vtysh_LDADD = lib/libfrr.la @LIBCAP@ @LIBREADLINE@ @LIBS@ @LIBPAM@ vtysh_vtysh_LDADD = lib/libfrr.la @LIBCAP@ @LIBREADLINE@ @LIBS@ @LIBPAM@
EXTRA_DIST += vtysh/extract.pl
AM_V_EXTRACT = $(am__v_EXTRACT_$(V)) AM_V_EXTRACT = $(am__v_EXTRACT_$(V))
am__v_EXTRACT_ = $(am__v_EXTRACT_$(AM_DEFAULT_VERBOSITY)) am__v_EXTRACT_ = $(am__v_EXTRACT_$(AM_DEFAULT_VERBOSITY))
am__v_EXTRACT_0 = @echo " EXTRACT " $@; am__v_EXTRACT_0 = @echo " EXTRACT " $@;