Skip to content

Commit

Permalink
Merge pull request #3235 from opensourcerouting/buildfoo-20181024
Browse files Browse the repository at this point in the history
build: potpourri
  • Loading branch information
louberger committed Oct 27, 2018
2 parents a755ec5 + 0b9013e commit 75082da
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,6 +7,7 @@
/config.status
/config.guess
/config.sub
/config.version
/ltmain.sh
/stamp-h
/stamp-h[0-9]*
Expand Down
11 changes: 11 additions & 0 deletions Makefile.am
Expand Up @@ -82,6 +82,7 @@ var-%:
EXTRA_DIST =
BUILT_SOURCES =
CLEANFILES =
DISTCLEANFILES =

examplesdir = $(exampledir)

Expand Down Expand Up @@ -161,6 +162,7 @@ EXTRA_DIST += \
README.md \
m4/README.txt \
m4/libtool-whole-archive.patch \
config.version \
\
python/clidef.py \
python/clippy/__init__.py \
Expand Down Expand Up @@ -215,6 +217,15 @@ EXTRA_DIST += \

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

redistclean:
$(MAKE) distclean CONFIG_CLEAN_FILES="$(filter-out $(EXTRA_DIST), $(CONFIG_CLEAN_FILES))"

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`

Expand Down
4 changes: 4 additions & 0 deletions config.version.in
@@ -0,0 +1,4 @@
# this file is used to carry --with-pkg-extra-version into tarballs
EXTRAVERSION="@EXTRAVERSION@"
# for easy access by scripts before ./configure is run
DIST_PACKAGE_VERSION="@PACKAGE_VERSION@"
16 changes: 14 additions & 2 deletions configure.ac
Expand Up @@ -352,9 +352,19 @@ test -f conftest.a && rm conftest.a
dnl ----------------------
dnl Packages configuration
dnl ----------------------
if test -f config.version; then
. ./config.version
elif test -f "${srcdir}/config.version"; then
. "${srcdir}/config.version"
fi
AC_ARG_WITH(pkg-extra-version,
AS_HELP_STRING([--with-pkg-extra-version=VER], [add extra version field, for packagers/distributions]),
[EXTRAVERSION=$withval],)
AS_HELP_STRING([--with-pkg-extra-version=VER], [add extra version field, for packagers/distributions]), [
if test "$withval" = "no"; then
EXTRAVERSION=
else
EXTRAVERSION=$withval
fi
], [])
AC_ARG_WITH(pkg-git-version,
AS_HELP_STRING([--with-pkg-git-version], [add git information to MOTD and build version string]),
[ test "x$withval" != "xno" && with_pkg_git_version="yes" ])
Expand Down Expand Up @@ -768,6 +778,7 @@ if test "x${EXTRAVERSION}" != "x" ; then
AC_SUBST(PACKAGE_EXTRAVERSION, ["${EXTRAVERSION}"])
PACKAGE_STRING="${PACKAGE_STRING}${EXTRAVERSION}"
fi
AC_SUBST(EXTRAVERSION)

if test "x$with_pkg_git_version" = "xyes"; then
if test -d "${srcdir}/.git"; then
Expand Down Expand Up @@ -2059,6 +2070,7 @@ AC_MSG_RESULT($ac_cv_htonl_works)
AC_CONFIG_FILES([Makefile],[sed -e 's/^#AUTODERP# //' -i Makefile])

AC_CONFIG_FILES([
config.version
redhat/frr.spec
solaris/Makefile
debianpkg/changelog
Expand Down
5 changes: 3 additions & 2 deletions doc/manpages/subdir.am
Expand Up @@ -34,7 +34,8 @@ 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)

#
Expand Down Expand Up @@ -66,7 +67,7 @@ $(man8) $(man1): $(MANBUILD)/man.stamp
clean-local: clean-manpages
.PHONY: clean-manpages
clean-manpages:
-rm -rf $(MANBUILD)
-rm -rf $(MANPARENT)

doc: doc-man
.PHONY: doc-man
Expand Down
14 changes: 10 additions & 4 deletions doc/user/subdir.am
Expand Up @@ -100,12 +100,18 @@ uninstall-html:
.PHONY: install-data-local uninstall-local
if DOC
DOC_INFO=info
install-data-local: install-info
uninstall-local: uninstall-info
TARGET_INSTALL_INFO=install-info
TARGET_UNINSTALL_INFO=uninstall-info
endif
if DOC_HTML
DOC_HTML=html
install-data-local: install-html
uninstall-local: uninstall-html
TARGET_INSTALL_HTML=install-html
TARGET_UNINSTALL_HTML=uninstall-html
endif

# leave the comments in, this was causing weird reordering issues in automake
install-data-local: $(TARGET_INSTALL_INFO) $(TARGET_INSTALL_HTML)
#
uninstall-local: $(TARGET_UNINSTALL_INFO) $(TARGET_UNINSTALL_HTML)
#
doc: $(DOC_INFO) $(DOC_HTML)
1 change: 1 addition & 0 deletions lib/subdir.am
Expand Up @@ -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
@PERL@ $(top_srcdir)/lib/route_types.pl < $(top_srcdir)/lib/route_types.txt > $@
DISTCLEANFILES += lib/route_types.h

if GIT_VERSION
# bit of a trick here to always have up-to-date git stamps without triggering
Expand Down
9 changes: 8 additions & 1 deletion tests/subdir.am
Expand Up @@ -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' \
< 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
gzip -d < $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz > "$@"
Expand Down Expand Up @@ -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_CPPFLAGS = $(TESTS_CPPFLAGS)
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_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_lib_test_buffer_LDADD = $(ALL_TESTS_LDADD)
Expand Down Expand Up @@ -293,3 +295,8 @@ EXTRA_DIST += \
tests/tests.xml: $(check_PROGRAMS)
( cd tests; $(PYTHON) ../$(srcdir)/tests/runtests.py --junitxml=tests.xml -v ../$(srcdir)/tests; )
check: tests/tests.xml

clean-local: clean-tests
.PHONY: clean-tests
clean-tests:
-rm -f tests/tests.xml
1 change: 0 additions & 1 deletion tools/subdir.am
Expand Up @@ -17,7 +17,6 @@ tools_ssd_SOURCES = tools/start-stop-daemon.c

EXTRA_DIST += \
tools/etc \
tools/frr \
tools/frr-reload \
tools/frr-reload.py \
tools/frr.service \
Expand Down
2 changes: 0 additions & 2 deletions vtysh/subdir.am
Expand Up @@ -26,8 +26,6 @@ noinst_HEADERS += \

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_$(AM_DEFAULT_VERBOSITY))
am__v_EXTRACT_0 = @echo " EXTRACT " $@;
Expand Down

0 comments on commit 75082da

Please sign in to comment.