Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autotools update #101

Merged
merged 4 commits into from
Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ before_install:
script:
- if [[ "${BUILD_SYSTEM}" == "cmake" ]]; then mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON && cmake --build . && cpack -G ZIP && ctest -V; fi
- if [[ "${BUILD_SYSTEM}" == "autotools" && "${TRAVIS_OS_NAME}" == "linux" && "${CC_FOR_BUILD}" == "clang" ]]; then ./build-regressors.sh && ./run-regressors.sh; fi
- if [[ "${BUILD_SYSTEM}" == "autotools" && ( "${TRAVIS_OS_NAME}" != "linux" || "${CC_FOR_BUILD}" != "clang" ) ]]; then ./autogen.sh --enable-tests && make && cli/wvtest --exhaustive --short --no-extras; fi
- if [[ "${BUILD_SYSTEM}" == "autotools" && ( "${TRAVIS_OS_NAME}" != "linux" || "${CC_FOR_BUILD}" != "clang" ) ]]; then ./autogen.sh && make distcheck; fi
4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ MAINTAINERCLEANFILES = \
missing \
install-sh

EXTRA_DIST = README.md doc/*.pdf doc/*.html doc/*.css \
EXTRA_DIST = README.md \
doc/WavPack5FileFormat.pdf doc/WavPack5LibraryDoc.pdf doc/WavPack5PortingGuide.pdf \
doc/wavpack_doc.html doc/style.css \
CMakeLists.txt cmake/CheckCLinkerFlag.cmake cmake/modules/FindIconv.cmake \
cmake/TestLargeFiles.cmake

7 changes: 4 additions & 3 deletions cli/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ wvtag_LDFLAGS = -rpath $(libdir)
endif
wvtag_LDADD = $(AM_LDADD) $(top_builddir)/src/libwavpack.la $(LIBM) $(ICONV_LIBS)

if ENABLE_TESTS
bin_PROGRAMS += wvtest
check_PROGRAMS = wvtest
wvtest_SOURCES = wvtest.c md5.c
wvtest_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
if ENABLE_RPATH
wvtest_LDFLAGS = -rpath $(libdir)
endif
wvtest_LDADD = $(AM_LDADD) $(top_builddir)/src/libwavpack.la $(LIBM) -lpthread
endif

TESTS = fast-tests
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbry by default make check (which is a target that make distcheck runs, among other checks) runs fast-tests, which is equivalent to running ./wvtest --exhaustive --short --no-extras. If you want to run the full tests:

make check TESTS=all-tests

TESTS_ENVIRONMENT = $(SHELL)

noinst_HEADERS = \
win32_unicode_support.h \
Expand Down
2 changes: 2 additions & 0 deletions cli/all-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set -e
./wvtest --default
2 changes: 2 additions & 0 deletions cli/fast-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set -e
./wvtest --exhaustive --short --no-extras
15 changes: 7 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

AC_INIT(wavpack, 5.4.0, [email protected])
AC_CONFIG_SRCDIR([src/pack.c])
AM_INIT_AUTOMAKE
AM_INIT_AUTOMAKE([serial-tests])
AM_MAINTAINER_MODE

LIBWAVPACK_MAJOR=5
Expand Down Expand Up @@ -133,7 +133,7 @@ AC_ARG_ENABLE([legacy],
AS_IF([test "x$enable_legacy" = "xyes"],
[AC_DEFINE([ENABLE_LEGACY])])

AM_CONDITIONAL([ENABLE_LEGACY], [test "x$enable_legacy" == "xyes"])
AM_CONDITIONAL([ENABLE_LEGACY], [test "x$enable_legacy" = "xyes"])

AC_ARG_ENABLE([dsd],
AS_HELP_STRING([--disable-dsd], [disable support for WavPack DSD files]))
Expand All @@ -146,12 +146,7 @@ AM_CONDITIONAL([ENABLE_DSD], [test "x$enable_dsd" != "xno"])
AC_ARG_ENABLE([rpath],
AS_HELP_STRING([--enable-rpath], [hardcode library path in executables]))

AM_CONDITIONAL([ENABLE_RPATH], [test "x$enable_rpath" == "xyes"])

AC_ARG_ENABLE([tests],
AS_HELP_STRING([--enable-tests], [build libwavpack test program (requires Pthreads)]))

AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" == "xyes"])
AM_CONDITIONAL([ENABLE_RPATH], [test "x$enable_rpath" = "xyes"])

AC_ARG_ENABLE([asm],
[AS_HELP_STRING([--disable-asm], [disable assembly optimizations])],,
Expand Down Expand Up @@ -216,6 +211,10 @@ fi

AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)

AC_CONFIG_LINKS([
cli/all-tests:cli/all-tests
cli/fast-tests:cli/fast-tests
])
AC_CONFIG_FILES(
Makefile
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbry I'd like to remove the recursive Make build system and move to a non-recursive one. Would you accept a PR to this end?

wavpack.pc
Expand Down
8 changes: 5 additions & 3 deletions man/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
man_MANS = wavpack.1 wvgain.1 wvunpack.1 wvtag.1
dist_man_MANS = wavpack.1 wvgain.1 wvunpack.1 wvtag.1

if ENABLE_MAN
%.1: %.xml
.xml.1:
$(XSLTPROC) -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<

SUFFIXES = .1 .xml
endif

EXTRA_DIST = $(man_MANS) $(patsubst %.1,%.xml,$(man_MANS))
EXTRA_DIST = wavpack.xml wvgain.xml wvunpack.xml wvtag.xml

MAINTAINERCLEANFILES = \
$(man_MANS) \
Expand Down