From 324392961133eacd9580652ab567092326bc7d6f Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Sat, 11 May 2024 10:08:29 +0200 Subject: [PATCH] Changes for deployment --- .github/workflows/build.yml | 91 ++++++++++++++++++++++++++--- .github/workflows/build_freebsd.yml | 2 +- .github/workflows/build_shared.yml | 4 +- .github/workflows/build_wheel.yml | 2 +- .gitignore | 1 + Makefile.am | 25 +++----- appveyor.yml | 41 ++++++++----- common/Makefile.am | 13 ++--- configure.ac | 2 +- documents/Makefile.am | 6 +- ewf.net/Makefile.am | 6 +- ewftools-mt/Makefile.am | 10 ++-- ewftools/Makefile.am | 10 ++-- examples/Makefile.am | 6 +- include/Makefile.am | 14 ++--- libewf/Makefile.am | 14 ++--- libmfdata/Makefile.am | 10 ++-- m4/libbfio.m4 | 4 +- m4/libcdata.m4 | 4 +- m4/libcdatetime.m4 | 4 +- m4/libcerror.m4 | 4 +- m4/libcfile.m4 | 4 +- m4/libclocale.m4 | 4 +- m4/libcnotify.m4 | 4 +- m4/libcpath.m4 | 4 +- m4/libcsplit.m4 | 4 +- m4/libcthreads.m4 | 4 +- m4/libfcache.m4 | 4 +- m4/libfdata.m4 | 4 +- m4/libfvalue.m4 | 13 +++-- m4/libhmac.m4 | 13 +++-- m4/libmfdata.m4 | 2 +- m4/libodraw.m4 | 11 ++-- m4/libsmdev.m4 | 11 ++-- m4/libsmraw.m4 | 15 +++-- m4/libuna.m4 | 4 +- m4/python.m4 | 10 ++-- manuals/Makefile.am | 6 +- msvscpp/Makefile.am | 6 +- pyewf/Makefile.am | 10 ++-- synclibs.sh | 11 ++-- tests/Makefile.am | 13 ++--- tests/test_glob.sh | 7 +-- tests/test_library.sh | 7 +-- tests/test_manpage.sh | 9 +-- 45 files changed, 258 insertions(+), 195 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b5d1b6..ba8817e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,10 +39,82 @@ jobs: compiler: 'gcc' configure_options: '--enable-static-executables=yes --enable-multi-threading-support=no' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install build dependencies run: | - sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libfuse-dev libssl-dev libtool pkg-config zlib1g-dev + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev + - name: Download test data + run: | + if test -x "synctestdata.sh"; then ./synctestdata.sh; fi + - name: Building from source + env: + CC: ${{ matrix.compiler }} + run: | + tests/build.sh ${{ matrix.configure_options }} + - name: Run tests + run: | + tests/runtests.sh + build_dist: + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - architecture: 'x64' + compiler: 'gcc' + configure_options: '' + steps: + - uses: actions/checkout@v4 + - name: Install build dependencies + run: | + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev + - name: Download test data + run: | + if test -x "synctestdata.sh"; then ./synctestdata.sh; fi + - name: Building from source + env: + CC: ${{ matrix.compiler }} + run: | + tests/build.sh ${{ matrix.configure_options }} + - name: Run tests + run: | + make distcheck + build_fuse_ubuntu: + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - architecture: 'x64' + compiler: 'gcc' + configure_options: '' + steps: + - uses: actions/checkout@v4 + - name: Install build dependencies + run: | + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev libfuse-dev + - name: Download test data + run: | + if test -x "synctestdata.sh"; then ./synctestdata.sh; fi + - name: Building from source + env: + CC: ${{ matrix.compiler }} + run: | + tests/build.sh ${{ matrix.configure_options }} + - name: Run tests + run: | + tests/runtests.sh + build_fuse3_ubuntu: + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - architecture: 'x64' + compiler: 'gcc' + configure_options: '' + steps: + - uses: actions/checkout@v4 + - name: Install build dependencies + run: | + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev libfuse3-dev - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi @@ -64,12 +136,12 @@ jobs: configure_options: '--enable-python' python_version: '' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install build dependencies run: | sudo add-apt-repository universe && sudo apt-get update && - sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libfuse-dev libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3 + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3 - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi @@ -93,7 +165,7 @@ jobs: configure_options: '' python-version: '3.10' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: @@ -102,7 +174,7 @@ jobs: run: | sudo add-apt-repository universe && sudo apt-get update && - sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libfuse-dev libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3 + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3 - name: Building from source env: CC: ${{ matrix.compiler }} @@ -123,10 +195,10 @@ jobs: compiler: 'gcc' configure_options: '--enable-wide-character-type' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install build dependencies run: | - sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libfuse-dev libssl-dev libtool pkg-config zlib1g-dev + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi @@ -144,6 +216,7 @@ jobs: (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) \ done - name: Upload coverage report to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: name: linux-${{ matrix.architecture }}-gcc-no-optimization + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/build_freebsd.yml b/.github/workflows/build_freebsd.yml index 0a4eafb..538f8a0 100644 --- a/.github/workflows/build_freebsd.yml +++ b/.github/workflows/build_freebsd.yml @@ -6,7 +6,7 @@ jobs: build_freebsd: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Building from source id: build_freebsd uses: vmactions/freebsd-vm@v1 diff --git a/.github/workflows/build_shared.yml b/.github/workflows/build_shared.yml index 43b5992..b8f39d1 100644 --- a/.github/workflows/build_shared.yml +++ b/.github/workflows/build_shared.yml @@ -17,10 +17,10 @@ jobs: compiler: 'gcc' configure_options: '--enable-wide-character-type' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install build dependencies run: | - sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libfuse-dev libssl-dev libtool pkg-config zlib1g-dev + sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 15c13bf..d98d681 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -21,7 +21,7 @@ jobs: - python-version: '3.12' toxenv: 'py312' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install build dependencies run: | sudo add-apt-repository universe && diff --git a/.gitignore b/.gitignore index 144032f..2971cab 100644 --- a/.gitignore +++ b/.gitignore @@ -186,6 +186,7 @@ stamp-h[1-9] /tests/input_raw /tests/input_raw_more /tests/input_raw_optical +/tests/notify_stream.log /tests/tmp* # Local library dependencies specific files diff --git a/Makefile.am b/Makefile.am index 41dc7d3..cfbb36b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -70,8 +70,15 @@ EXTRA_DIST = \ $(SETUP_PY_FILES) \ $(SPEC_FILES) -MAINTAINERCLEANFILES = \ - Makefile.in +DISTCLEANFILES = \ + config.status \ + config.cache \ + config.log \ + libewf.pc \ + libewf.spec \ + Makefile \ + Makefile.in \ + po/Makevars pkgconfigdir = $(libdir)/pkgconfig @@ -102,17 +109,3 @@ library: (cd $(srcdir)/libewf && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS)) -distclean: clean - -rm -f Makefile - -rm -f config.status - -rm -f config.cache - -rm -f config.log - -rm -f libewf.pc - -rm -f libewf.spec - -rm -f dpkg/changelog - -rm -f dpkg/shlibs.local.ex - @for dir in ${subdirs}; do \ - (cd $$dir && $(MAKE) distclean) \ - || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" - diff --git a/appveyor.yml b/appveyor.yml index a625586..d1ba0c7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ environment: nuget_token: - secure: l8kGPdWSs3RTcW6B+mgcT8ByCdVvXx6HbWPNd8nnqoUDhku8g507tpxla7LUPDOM + secure: xFlOodfYttki8HxA1hdhVhQ2lkVbj1EA1FxP9T1il2MUsBfH1rPEbTZy+etaMTD8 matrix: - TARGET: vs2008 BUILD_ENVIRONMENT: msbuild @@ -235,7 +235,7 @@ environment: - TARGET: cygwin64-gcc-static-executables BUILD_ENVIRONMENT: cygwin64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - CONFIGURE_OPTIONS: "--enable-static-executables" + CONFIGURE_OPTIONS: "--enable-static-executables --with-libfuse=no" - TARGET: mingw-w64-gcc BUILD_ENVIRONMENT: mingw-w64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 @@ -247,11 +247,19 @@ environment: CFLAGS: "--coverage -O0" CPPFLAGS: "-DOPTIMIZATION_DISABLED" LDFLAGS: "--coverage" + - TARGET: mingw-w64-gcc-python + BUILD_ENVIRONMENT: mingw-w64 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + CONFIGURE_OPTIONS: "--enable-python" - TARGET: mingw-w64-gcc-static-executables BUILD_ENVIRONMENT: mingw-w64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 CONFIGURE_OPTIONS: "--enable-static-executables" +matrix: + allow_failures: + - TARGET: mingw-w64-gcc-python + install: - cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] ( git clone https://github.com/libyal/vstools.git ..\vstools ) @@ -312,9 +320,9 @@ install: - ps: If ($env:BUILD_ENVIRONMENT -eq "cygwin64") { (New-Object Net.WebClient).DownloadFile("https://cygwin.com/setup-x86_64.exe", "C:\\cygwin64\\setup-x86_64.exe") } - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] ( - C:\cygwin64\setup-x86_64.exe -qgnNdO -l C:\cygwin64\var\cache\setup -R c:\cygwin64 -s http://cygwin.mirror.constant.com -P gettext-devel -P wget -P bison -P flex -P zlib-devel -P libssl-devel -P python3-devel -P libuuid-devel ) + C:\cygwin64\setup-x86_64.exe -qgnNdO -l C:\cygwin64\var\cache\setup -R c:\cygwin64 -s http://cygwin.mirror.constant.com -P bison -P cygfuse -P flex -P gettext-devel -P libssl-devel -P libuuid-devel -P python3-devel -P wget -P zlib-devel ) - cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] ( - C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc msys/bison msys/flex msys/zlib-devel ) + C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc msys/bison msys/flex msys/zlib-devel mingw-w64-x86_64-python3 ) - ps: If ( ( "cygwin64-gcc-no-optimization", "mingw-w64-gcc-no-optimization" ).Contains( $env:TARGET ) ) { $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile ..\codecov.exe } @@ -343,12 +351,12 @@ build_script: - sh: if test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV}; fi - sh: if test `uname -s` = "Linux" && test ${BUILD_ENVIRONMENT} = "python-tox"; then ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV} && tox -eauditwheel -- --plat ${AUDITWHEEL_PLAT} dist/*.whl && rm -f dist/*.whl && mv wheelhouse/*.whl dist/; fi - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] ( - xcopy /i /q /s C:\projects\libewf-legacy C:\cygwin64\home\appveyor\libewf-legacy && - C:\cygwin64\bin\bash -e -l -c "cd libewf-legacy && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O './config.guess' && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O './config.sub'" && - C:\cygwin64\bin\bash -e -l -c "cd libewf-legacy && tests/build.sh ${CONFIGURE_OPTIONS}" ) + xcopy /i /q /s C:\projects\libewf C:\cygwin64\home\appveyor\libewf && + C:\cygwin64\bin\bash -e -l -c "cd libewf && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O './config.guess' && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O './config.sub'" && + C:\cygwin64\bin\bash -e -l -c "cd libewf && tests/build.sh ${CONFIGURE_OPTIONS}" ) - cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] ( - xcopy /i /q /s C:\projects\libewf-legacy C:\msys64\home\appveyor\libewf-legacy && - C:\msys64\usr\bin\bash -e -l -c "cd libewf-legacy && tests/build.sh ${CONFIGURE_OPTIONS}" ) + xcopy /i /q /s C:\projects\libewf C:\msys64\home\appveyor\libewf && + C:\msys64\usr\bin\bash -e -l -c "cd libewf && tests/build.sh ${CONFIGURE_OPTIONS}" ) test_script: - cmd: rem Run tests @@ -357,17 +365,17 @@ test_script: - sh: if test ${BUILD_ENVIRONMENT} = "xcode" && test ${TARGET} != "macos-pkgbuild"; then tests/runtests.sh; fi - sh: if test ${TARGET} = "macos-pkgbuild"; then tests/pkgbuild.sh; fi - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] ( - C:\cygwin64\bin\bash -l -c "cd libewf-legacy && tests/runtests.sh" ) + C:\cygwin64\bin\bash -l -c "cd libewf && tests/runtests.sh" ) - cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] ( - C:\msys64\usr\bin\bash -l -c "cd libewf-legacy && tests/runtests.sh" ) + C:\msys64\usr\bin\bash -l -c "cd libewf && tests/runtests.sh" ) after_test: - cmd: if [%TARGET%]==[cygwin64-gcc-no-optimization] ( - C:\cygwin64\bin\bash -e -l -c "cd libewf-legacy && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) done" && - C:\projects\codecov.exe -R \cygwin64\home\appveyor\libewf-legacy --name %TARGET% ) + C:\cygwin64\bin\bash -e -l -c "cd libewf && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) done" && + C:\projects\codecov.exe -R \cygwin64\home\appveyor\libewf --name %TARGET% ) - cmd: if [%TARGET%]==[mingw-w64-gcc-no-optimization] ( - C:\msys64\usr\bin\bash -e -l -c "cd libewf-legacy && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) done" && - C:\projects\codecov.exe -R \msys64\home\appveyor\libewf-legacy --name %TARGET% ) + C:\msys64\usr\bin\bash -e -l -c "cd libewf && for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) done" && + C:\projects\codecov.exe -R \msys64\home\appveyor\libewf --name %TARGET% ) artifacts: - path: \*.nupkg @@ -376,4 +384,7 @@ artifacts: deploy_script: - ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows -and $env:TARGET -eq "vs2022-nuget") { Invoke-Expression "nuget push *.nupkg -NonInteractive -NoSymbols -Source https://api.nuget.org/v3/index.json -ApiKey ${env:NUGET_TOKEN}" } +- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows -and $env:BUILD_ENVIRONMENT -eq "python-tox") { + Invoke-Expression "${env:PYTHON} -m twine upload dist/*.whl --username __token__ --password ${env:PYPI_TOKEN} --skip-existing" } +- sh: if test ${APPVEYOR_REPO_TAG} = "true" && test ${BUILD_ENVIRONMENT} = "python-tox"; then twine upload dist/*.whl --username __token__ --password ${PYPI_TOKEN} --skip-existing; fi diff --git a/common/Makefile.am b/common/Makefile.am index 2433a75..f7aa524 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -1,4 +1,5 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS = \ + -I../include -I$(top_srcdir)/include EXTRA_DIST = \ byte_stream.h \ @@ -15,11 +16,9 @@ EXTRA_DIST = \ types.h.in \ wide_string.h -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + config.h \ + types.h \ + Makefile \ Makefile.in -distclean: clean - -rm -f config.h - -rm -f types.h - -rm -f Makefile - diff --git a/configure.ac b/configure.ac index febeb53..89ff006 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.71]) AC_INIT( [libewf], - [20140816], + [20140817], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( diff --git a/documents/Makefile.am b/documents/Makefile.am index 7aa8c00..68e442e 100644 --- a/documents/Makefile.am +++ b/documents/Makefile.am @@ -3,9 +3,7 @@ EXTRA_DIST = \ header2.txt \ programming.txt -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/ewf.net/Makefile.am b/ewf.net/Makefile.am index 8afa9c2..b8b0140 100644 --- a/ewf.net/Makefile.am +++ b/ewf.net/Makefile.am @@ -8,9 +8,7 @@ EXTRA_DIST = \ ewf.net.rc \ ewf.net.rc.in -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/ewftools-mt/Makefile.am b/ewftools-mt/Makefile.am index 909d05c..43a104a 100644 --- a/ewftools-mt/Makefile.am +++ b/ewftools-mt/Makefile.am @@ -1,7 +1,7 @@ if HAVE_CXX11 AM_CPPFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ + -I../include -I$(top_srcdir)/include \ + -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCDATETIME_CPPFLAGS@ \ @@ -77,12 +77,10 @@ ewfacquirestream_LDADD = \ -lstdc++ endif -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - splint-local: @echo "Running splint on ewfacquirestream ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(ewfacquirestream_SOURCES) diff --git a/ewftools/Makefile.am b/ewftools/Makefile.am index 1911cfc..de93391 100644 --- a/ewftools/Makefile.am +++ b/ewftools/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ + -I../include -I$(top_srcdir)/include \ + -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCDATETIME_CPPFLAGS@ \ @@ -407,12 +407,10 @@ ewfverify_LDADD = \ @LIBCERROR_LIBADD@ \ @LIBINTL@ -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - splint-local: @echo "Running splint on ewfacquire ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(ewfacquire_SOURCES) diff --git a/examples/Makefile.am b/examples/Makefile.am index 7311701..af3e5e8 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -17,9 +17,7 @@ EXTRA_DIST = \ $(LIBEWF_EXAMPLES) \ $(PYEWF_EXAMPLES) -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/include/Makefile.am b/include/Makefile.am index 68c35a6..78a9bfc 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -15,13 +15,11 @@ EXTRA_DIST = \ libewf/features.h.in \ libewf/types.h.in -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + libewf.h \ + libewf/definitions.h \ + libewf/features.h \ + libewf/types.h \ + Makefile \ Makefile.in -distclean: clean - -rm -f libewf.h - -rm -f libewf/definitions.h - -rm -f libewf/features.h - -rm -f libewf/types.h - -rm -f Makefile - diff --git a/libewf/Makefile.am b/libewf/Makefile.am index b116ab6..6775f7e 100644 --- a/libewf/Makefile.am +++ b/libewf/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ + -I../include -I$(top_srcdir)/include \ + -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @LIBCTHREADS_CPPFLAGS@ \ @@ -114,14 +114,12 @@ EXTRA_DIST = \ libewf.rc \ libewf.rc.in -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + libewf_definitions.h \ + libewf.rc \ + Makefile \ Makefile.in -distclean: clean - -rm -f libewf_definitions.h - -rm -f libewf.rc - -rm -f Makefile - sources-local: $(BUILT_SOURCES) splint-local: diff --git a/libmfdata/Makefile.am b/libmfdata/Makefile.am index 199a5ff..8e889fd 100644 --- a/libmfdata/Makefile.am +++ b/libmfdata/Makefile.am @@ -1,7 +1,7 @@ if HAVE_LOCAL_LIBMFDATA AM_CPPFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ + -I../include -I$(top_srcdir)/include \ + -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @@ -39,12 +39,10 @@ libmfdata_la_SOURCES = \ libmfdata_unused.h endif -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - splint-local: @echo "Running splint on libmfdata ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libmfdata_la_SOURCES) diff --git a/m4/libbfio.m4 b/m4/libbfio.m4 index 5a6624a..112bac6 100644 --- a/m4/libbfio.m4 +++ b/m4/libbfio.m4 @@ -1,6 +1,6 @@ dnl Checks for libbfio required headers and functions dnl -dnl Version: 20240314 +dnl Version: 20240413 dnl Function to detect if libbfio is available dnl ac_libbfio_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -354,7 +354,7 @@ dnl Function to detect if libbfio dependencies are available AC_DEFUN([AX_LIBBFIO_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libbfio_CPPFLAGS="-I../libbfio"; + ac_cv_libbfio_CPPFLAGS="-I../libbfio -I\$(top_srcdir)/libbfio"; ac_cv_libbfio_LIBADD="../libbfio/libbfio.la"; ac_cv_libbfio=local diff --git a/m4/libcdata.m4 b/m4/libcdata.m4 index 0d7ebee..aa01d93 100644 --- a/m4/libcdata.m4 +++ b/m4/libcdata.m4 @@ -1,6 +1,6 @@ dnl Checks for libcdata required headers and functions dnl -dnl Version: 20240314 +dnl Version: 20240413 dnl Function to detect if libcdata is available dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -531,7 +531,7 @@ dnl Function to detect if libcdata dependencies are available AC_DEFUN([AX_LIBCDATA_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libcdata_CPPFLAGS="-I../libcdata"; + ac_cv_libcdata_CPPFLAGS="-I../libcdata -I\$(top_srcdir)/libcdata"; ac_cv_libcdata_LIBADD="../libcdata/libcdata.la"; ac_cv_libcdata=local diff --git a/m4/libcdatetime.m4 b/m4/libcdatetime.m4 index 5dcf601..8e66daa 100644 --- a/m4/libcdatetime.m4 +++ b/m4/libcdatetime.m4 @@ -1,6 +1,6 @@ dnl Checks for libcdatetime required headers and functions dnl -dnl Version: 20240314 +dnl Version: 20240413 dnl Function to detect if libcdatetime is available dnl ac_libcdatetime_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -383,7 +383,7 @@ AC_DEFUN([AX_LIBCDATETIME_CHECK_LOCAL], [1]) ]) - ac_cv_libcdatetime_CPPFLAGS="-I../libcdatetime"; + ac_cv_libcdatetime_CPPFLAGS="-I../libcdatetime -I\$(top_srcdir)/libcdatetime"; ac_cv_libcdatetime_LIBADD="../libcdatetime/libcdatetime.la"; ac_cv_libcdatetime=local diff --git a/m4/libcerror.m4 b/m4/libcerror.m4 index 87af3e1..e9abcdb 100644 --- a/m4/libcerror.m4 +++ b/m4/libcerror.m4 @@ -1,6 +1,6 @@ dnl Checks for libcerror required headers and functions dnl -dnl Version: 20240314 +dnl Version: 20240413 dnl Function to detect if libcerror is available dnl ac_libcerror_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -169,7 +169,7 @@ AC_DEFUN([AX_LIBCERROR_CHECK_LOCAL], ]) ]) - ac_cv_libcerror_CPPFLAGS="-I../libcerror"; + ac_cv_libcerror_CPPFLAGS="-I../libcerror -I\$(top_srcdir)/libcerror"; ac_cv_libcerror_LIBADD="../libcerror/libcerror.la"; ac_cv_libcerror=local diff --git a/m4/libcfile.m4 b/m4/libcfile.m4 index 6ff07cf..81ac5f1 100644 --- a/m4/libcfile.m4 +++ b/m4/libcfile.m4 @@ -1,6 +1,6 @@ dnl Checks for libcfile required headers and functions dnl -dnl Version: 20240314 +dnl Version: 20240413 dnl Function to detect if libcfile is available dnl ac_libcfile_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -361,7 +361,7 @@ AC_DEFUN([AX_LIBCFILE_CHECK_LOCAL], [1]) ]) - ac_cv_libcfile_CPPFLAGS="-I../libcfile"; + ac_cv_libcfile_CPPFLAGS="-I../libcfile -I\$(top_srcdir)/libcfile"; ac_cv_libcfile_LIBADD="../libcfile/libcfile.la"; ac_cv_libcfile=local diff --git a/m4/libclocale.m4 b/m4/libclocale.m4 index 2410981..bd5a10e 100644 --- a/m4/libclocale.m4 +++ b/m4/libclocale.m4 @@ -1,6 +1,6 @@ dnl Checks for libclocale required headers and functions dnl -dnl Version: 20240314 +dnl Version: 20240413 dnl Function to detect if libclocale is available dnl ac_libclocale_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -223,7 +223,7 @@ AC_DEFUN([AX_LIBCLOCALE_CHECK_LOCAL], AX_LIBCLOCALE_CHECK_FUNC_LANGINFO_CODESET - ac_cv_libclocale_CPPFLAGS="-I../libclocale"; + ac_cv_libclocale_CPPFLAGS="-I../libclocale -I\$(top_srcdir)/libclocale"; ac_cv_libclocale_LIBADD="../libclocale/libclocale.la"; ac_cv_libclocale=local diff --git a/m4/libcnotify.m4 b/m4/libcnotify.m4 index 60472d8..e382bdb 100644 --- a/m4/libcnotify.m4 +++ b/m4/libcnotify.m4 @@ -1,6 +1,6 @@ dnl Checks for libcnotify required headers and functions dnl -dnl Version: 20240314 +dnl Version: 20240413 dnl Function to detect if libcnotify is available dnl ac_libcnotify_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -141,7 +141,7 @@ AC_DEFUN([AX_LIBCNOTIFY_CHECK_LOCAL], dnl Headers included in libcnotify/libcnotify_stream.c AC_CHECK_HEADERS([errno.h]) - ac_cv_libcnotify_CPPFLAGS="-I../libcnotify"; + ac_cv_libcnotify_CPPFLAGS="-I../libcnotify -I\$(top_srcdir)/libcnotify"; ac_cv_libcnotify_LIBADD="../libcnotify/libcnotify.la"; ac_cv_libcnotify=local diff --git a/m4/libcpath.m4 b/m4/libcpath.m4 index 95834f2..bf44d46 100644 --- a/m4/libcpath.m4 +++ b/m4/libcpath.m4 @@ -1,6 +1,6 @@ dnl Checks for libcpath required headers and functions dnl -dnl Version: 20240314 +dnl Version: 20240413 dnl Function to detect if libcpath is available dnl ac_libcpath_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -276,7 +276,7 @@ AC_DEFUN([AX_LIBCPATH_CHECK_LOCAL], AX_LIBCPATH_CHECK_FUNC_MKDIR - ac_cv_libcpath_CPPFLAGS="-I../libcpath"; + ac_cv_libcpath_CPPFLAGS="-I../libcpath -I\$(top_srcdir)/libcpath"; ac_cv_libcpath_LIBADD="../libcpath/libcpath.la"; ac_cv_libcpath=local diff --git a/m4/libcsplit.m4 b/m4/libcsplit.m4 index dc3ed8b..1ac7b9f 100644 --- a/m4/libcsplit.m4 +++ b/m4/libcsplit.m4 @@ -1,6 +1,6 @@ dnl Checks for libcsplit required headers and functions dnl -dnl Version: 20240314 +dnl Version: 20240413 dnl Function to detect if libcsplit is available dnl ac_libcsplit_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -181,7 +181,7 @@ dnl Function to detect if libcsplit dependencies are available AC_DEFUN([AX_LIBCSPLIT_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libcsplit_CPPFLAGS="-I../libcsplit"; + ac_cv_libcsplit_CPPFLAGS="-I../libcsplit -I\$(top_srcdir)/libcsplit"; ac_cv_libcsplit_LIBADD="../libcsplit/libcsplit.la"; ac_cv_libcsplit=local diff --git a/m4/libcthreads.m4 b/m4/libcthreads.m4 index c0d61f5..c9c4e46 100644 --- a/m4/libcthreads.m4 +++ b/m4/libcthreads.m4 @@ -1,6 +1,6 @@ dnl Checks for libcthreads required headers and functions dnl -dnl Version: 20240314 +dnl Version: 20240413 dnl Function to detect if libcthreads is available dnl ac_libcthreads_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -292,7 +292,7 @@ AC_DEFUN([AX_LIBCTHREADS_CHECK_LOCAL], AS_IF( [test "x$ac_cv_libcthreads_multi_threading" != xno], - [ac_cv_libcthreads_CPPFLAGS="-I../libcthreads"; + [ac_cv_libcthreads_CPPFLAGS="-I../libcthreads -I\$(top_srcdir)/libcthreads"; ac_cv_libcthreads_LIBADD="../libcthreads/libcthreads.la"; ac_cv_libcthreads=local], diff --git a/m4/libfcache.m4 b/m4/libfcache.m4 index 86003b1..f063bae 100644 --- a/m4/libfcache.m4 +++ b/m4/libfcache.m4 @@ -1,6 +1,6 @@ dnl Checks for libfcache required headers and functions dnl -dnl Version: 20240314 +dnl Version: 20240413 dnl Function to detect if libfcache is available dnl ac_libfcache_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -199,7 +199,7 @@ AC_DEFUN([AX_LIBFCACHE_CHECK_LOCAL], [1]) ]) - ac_cv_libfcache_CPPFLAGS="-I../libfcache"; + ac_cv_libfcache_CPPFLAGS="-I../libfcache -I\$(top_srcdir)/libfcache"; ac_cv_libfcache_LIBADD="../libfcache/libfcache.la"; ac_cv_libfcache=local diff --git a/m4/libfdata.m4 b/m4/libfdata.m4 index 4670792..50ffbb1 100644 --- a/m4/libfdata.m4 +++ b/m4/libfdata.m4 @@ -1,6 +1,6 @@ dnl Functions for libfdata dnl -dnl Version: 20240314 +dnl Version: 20240413 dnl Function to detect if libfdata is available dnl ac_libfdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -488,7 +488,7 @@ dnl Function to detect if libfdata dependencies are available AC_DEFUN([AX_LIBFDATA_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libfdata_CPPFLAGS="-I../libfdata"; + ac_cv_libfdata_CPPFLAGS="-I../libfdata -I\$(top_srcdir)/libfdata"; ac_cv_libfdata_LIBADD="../libfdata/libfdata.la"; ac_cv_libfdata=local diff --git a/m4/libfvalue.m4 b/m4/libfvalue.m4 index 6d0df6b..2a79f7d 100644 --- a/m4/libfvalue.m4 +++ b/m4/libfvalue.m4 @@ -1,6 +1,6 @@ dnl Checks for libfvalue required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240413 dnl Function to detect if libfvalue is available dnl ac_libfvalue_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBFVALUE_CHECK_LIB], [ac_cv_libfvalue=no], [ac_cv_libfvalue=check dnl Check if the directory provided as parameter exists + dnl For both --with-libfvalue which returns "yes" and --with-libfvalue= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect], + [test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_with_libfvalue" != xyes], [AS_IF( [test -d "$ac_cv_with_libfvalue"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfvalue}/include" @@ -26,7 +28,7 @@ AC_DEFUN([AX_LIBFVALUE_CHECK_LIB], [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfvalue], - [libfvalue >= 20160131], + [libfvalue >= 20200711], [ac_cv_libfvalue=yes], [ac_cv_libfvalue=check]) ]) @@ -589,8 +591,9 @@ AC_DEFUN([AX_LIBFVALUE_CHECK_LIB], ac_cv_libfvalue_LIBADD="-lfvalue"]) ]) + AS_IF( - [test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_libfvalue" != xyes], + [test "x$ac_cv_libfvalue" != xyes && test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xauto-detect && test "x$ac_cv_with_libfvalue" != xyes], [AC_MSG_FAILURE( [unable to find supported libfvalue in directory: $ac_cv_with_libfvalue], [1]) @@ -620,7 +623,7 @@ dnl Function to detect if libfvalue dependencies are available AC_DEFUN([AX_LIBFVALUE_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libfvalue_CPPFLAGS="-I../libfvalue"; + ac_cv_libfvalue_CPPFLAGS="-I../libfvalue -I\$(top_srcdir)/libfvalue"; ac_cv_libfvalue_LIBADD="../libfvalue/libfvalue.la"; ac_cv_libfvalue=local diff --git a/m4/libhmac.m4 b/m4/libhmac.m4 index 8e7bab5..b902eb6 100644 --- a/m4/libhmac.m4 +++ b/m4/libhmac.m4 @@ -1,6 +1,6 @@ dnl Checks for libhmac required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240413 dnl Function to detect if libhmac is available dnl ac_libhmac_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBHMAC_CHECK_LIB], [ac_cv_libhmac=no], [ac_cv_libhmac=check dnl Check if the directory provided as parameter exists + dnl For both --with-libhmac which returns "yes" and --with-libhmac= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_libhmac" != x && test "x$ac_cv_with_libhmac" != xauto-detect], + [test "x$ac_cv_with_libhmac" != x && test "x$ac_cv_with_libhmac" != xauto-detect && test "x$ac_cv_with_libhmac" != xyes], [AS_IF( [test -d "$ac_cv_with_libhmac"], [CFLAGS="$CFLAGS -I${ac_cv_with_libhmac}/include" @@ -26,7 +28,7 @@ AC_DEFUN([AX_LIBHMAC_CHECK_LIB], [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libhmac], - [libhmac >= 20160802], + [libhmac >= 20200104], [ac_cv_libhmac=yes], [ac_cv_libhmac=check]) ]) @@ -165,8 +167,9 @@ AC_DEFUN([AX_LIBHMAC_CHECK_LIB], ac_cv_libhmac_LIBADD="-lhmac"]) ]) + AS_IF( - [test "x$ac_cv_with_libhmac" != x && test "x$ac_cv_with_libhmac" != xauto-detect && test "x$ac_cv_libhmac" != xyes], + [test "x$ac_cv_libhmac" != xyes && test "x$ac_cv_with_libhmac" != x && test "x$ac_cv_with_libhmac" != xauto-detect && test "x$ac_cv_with_libhmac" != xyes], [AC_MSG_FAILURE( [unable to find supported libhmac in directory: $ac_cv_with_libhmac], [1]) @@ -244,7 +247,7 @@ AC_DEFUN([AX_LIBHMAC_CHECK_LOCAL], [ac_cv_libhmac_sha512=local], [ac_cv_libhmac_sha512=$ac_cv_libcrypto_sha512]) - ac_cv_libhmac_CPPFLAGS="-I../libhmac"; + ac_cv_libhmac_CPPFLAGS="-I../libhmac -I\$(top_srcdir)/libhmac"; ac_cv_libhmac_LIBADD="../libhmac/libhmac.la"; ac_cv_libhmac=local diff --git a/m4/libmfdata.m4 b/m4/libmfdata.m4 index 4efa912..72cad15 100644 --- a/m4/libmfdata.m4 +++ b/m4/libmfdata.m4 @@ -344,7 +344,7 @@ AC_DEFUN([AX_LIBMFDATA_CHECK_ENABLE], [HAVE_LOCAL_LIBMFDATA], [1]) - ac_cv_libmfdata_CPPFLAGS="-I../libmfdata"; + ac_cv_libmfdata_CPPFLAGS="-I../libmfdata -I\$(top_srcdir)/libmfdata"; ac_cv_libmfdata_LIBADD="../libmfdata/libmfdata.la"; ac_cv_libmfdata=local diff --git a/m4/libodraw.m4 b/m4/libodraw.m4 index 9da9198..1bf8d2f 100644 --- a/m4/libodraw.m4 +++ b/m4/libodraw.m4 @@ -1,6 +1,6 @@ dnl Checks for libodraw required headers and functions dnl -dnl Version: 20230218 +dnl Version: 20240413 dnl Function to detect if libodraw is available dnl ac_libodraw_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBODRAW_CHECK_LIB], [ac_cv_libodraw=no], [ac_cv_libodraw=check dnl Check if the directory provided as parameter exists + dnl For both --with-libodraw which returns "yes" and --with-libodraw= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_libodraw" != x && test "x$ac_cv_with_libodraw" != xauto-detect], + [test "x$ac_cv_with_libodraw" != x && test "x$ac_cv_with_libodraw" != xauto-detect && test "x$ac_cv_with_libodraw" != xyes], [AS_IF( [test -d "$ac_cv_with_libodraw"], [CFLAGS="$CFLAGS -I${ac_cv_with_libodraw}/include" @@ -168,8 +170,9 @@ AC_DEFUN([AX_LIBODRAW_CHECK_LIB], ac_cv_libodraw_LIBADD="-lodraw"]) ]) + AS_IF( - [test "x$ac_cv_with_libodraw" != x && test "x$ac_cv_with_libodraw" != xauto-detect && test "x$ac_cv_libodraw" != xyes], + [test "x$ac_cv_libodraw" != xyes && test "x$ac_cv_with_libodraw" != x && test "x$ac_cv_with_libodraw" != xauto-detect && test "x$ac_cv_with_libodraw" != xyes], [AC_MSG_FAILURE( [unable to find supported libodraw in directory: $ac_cv_with_libodraw], [1]) @@ -200,7 +203,7 @@ AC_DEFUN([AX_LIBODRAW_CHECK_LOCAL], [AC_PROG_LEX(noyywrap) AC_PROG_YACC - ac_cv_libodraw_CPPFLAGS="-I../libodraw"; + ac_cv_libodraw_CPPFLAGS="-I../libodraw -I\$(top_srcdir)/libodraw"; ac_cv_libodraw_LIBADD="../libodraw/libodraw.la"; ac_cv_libodraw=local diff --git a/m4/libsmdev.m4 b/m4/libsmdev.m4 index 5724714..462aa64 100644 --- a/m4/libsmdev.m4 +++ b/m4/libsmdev.m4 @@ -1,6 +1,6 @@ dnl Checks for libsmdev required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240413 dnl Function to detect if libsmdev is available dnl ac_libsmdev_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBSMDEV_CHECK_LIB], [ac_cv_libsmdev=no], [ac_cv_libsmdev=check dnl Check if the directory provided as parameter exists + dnl For both --with-libsmdev which returns "yes" and --with-libsmdev= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_libsmdev" != x && test "x$ac_cv_with_libsmdev" != xauto-detect], + [test "x$ac_cv_with_libsmdev" != x && test "x$ac_cv_with_libsmdev" != xauto-detect && test "x$ac_cv_with_libsmdev" != xyes], [AS_IF( [test -d "$ac_cv_with_libsmdev"], [CFLAGS="$CFLAGS -I${ac_cv_with_libsmdev}/include" @@ -194,8 +196,9 @@ AC_DEFUN([AX_LIBSMDEV_CHECK_LIB], ac_cv_libsmdev_LIBADD="-lsmdev"]) ]) + AS_IF( - [test "x$ac_cv_with_libsmdev" != x && test "x$ac_cv_with_libsmdev" != xauto-detect && test "x$ac_cv_libsmdev" != xyes], + [test "x$ac_cv_libsmdev" != xyes && test "x$ac_cv_with_libsmdev" != x && test "x$ac_cv_with_libsmdev" != xauto-detect && test "x$ac_cv_with_libsmdev" != xyes], [AC_MSG_FAILURE( [unable to find supported libsmdev in directory: $ac_cv_with_libsmdev], [1]) @@ -361,7 +364,7 @@ AC_DEFUN([AX_LIBSMDEV_CHECK_LOCAL], [test "x$ac_cv_enable_winapi" = xyes], [AX_LIBSMDEV_CHECK_HEADER_WINIOCTL_H_STORAGE_BUS_TYPE]) - ac_cv_libsmdev_CPPFLAGS="-I../libsmdev"; + ac_cv_libsmdev_CPPFLAGS="-I../libsmdev -I\$(top_srcdir)/libsmdev"; ac_cv_libsmdev_LIBADD="../libsmdev/libsmdev.la"; ac_cv_libsmdev=local diff --git a/m4/libsmraw.m4 b/m4/libsmraw.m4 index ee8fdbd..66e65d1 100644 --- a/m4/libsmraw.m4 +++ b/m4/libsmraw.m4 @@ -1,17 +1,19 @@ dnl Checks for libsmraw required headers and functions dnl -dnl Version: 20190308 +dnl Version: 20240413 dnl Function to detect if libsmraw is available dnl ac_libsmraw_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments -AC_DEFUN([AX_LIBSMRAW_CHECK_LIB], +AC_DEFUN([AX_LIBSMRAW_CHECK_LOCAL], [AS_IF( [test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libsmraw" = xno], [ac_cv_libsmraw=no], [ac_cv_libsmraw=check dnl Check if the directory provided as parameter exists + dnl For both --with-libsmraw which returns "yes" and --with-libsmraw= which returns "" + dnl treat them as auto-detection. AS_IF( - [test "x$ac_cv_with_libsmraw" != x && test "x$ac_cv_with_libsmraw" != xauto-detect], + [test "x$ac_cv_with_libsmraw" != x && test "x$ac_cv_with_libsmraw" != xauto-detect && test "x$ac_cv_with_libsmraw" != xyes], [AS_IF( [test -d "$ac_cv_with_libsmraw"], [CFLAGS="$CFLAGS -I${ac_cv_with_libsmraw}/include" @@ -148,8 +150,9 @@ AC_DEFUN([AX_LIBSMRAW_CHECK_LIB], ac_cv_libsmraw_LIBADD="-lsmraw"]) ]) + AS_IF( - [test "x$ac_cv_with_libsmraw" != x && test "x$ac_cv_with_libsmraw" != xauto-detect && test "x$ac_cv_libsmraw" != xyes], + [test "x$ac_cv_libsmraw" != xyes && test "x$ac_cv_with_libsmraw" != x && test "x$ac_cv_with_libsmraw" != xauto-detect && test "x$ac_cv_with_libsmraw" != xyes], [AC_MSG_FAILURE( [unable to find supported libsmraw in directory: $ac_cv_with_libsmraw], [1]) @@ -184,7 +187,7 @@ AC_DEFUN([AX_LIBSMRAW_CHECK_ENABLE], [auto-detect], [DIR]) - AX_LIBSMRAW_CHECK_LIB + AX_LIBSMRAW_CHECK_LOCAL AS_IF( [test "x$ac_cv_libsmraw" != xyes], @@ -196,7 +199,7 @@ AC_DEFUN([AX_LIBSMRAW_CHECK_ENABLE], [HAVE_LOCAL_LIBSMRAW], [1]) - ac_cv_libsmraw_CPPFLAGS="-I../libsmraw"; + ac_cv_libsmraw_CPPFLAGS="-I../libsmraw -I\$(top_srcdir)/libsmraw"; ac_cv_libsmraw_LIBADD="../libsmraw/libsmraw.la"; ac_cv_libsmraw=local diff --git a/m4/libuna.m4 b/m4/libuna.m4 index bb02abd..996ac60 100644 --- a/m4/libuna.m4 +++ b/m4/libuna.m4 @@ -1,6 +1,6 @@ dnl Checks for libuna or required headers and functions dnl -dnl Version: 20240314 +dnl Version: 20240413 dnl Function to detect if a specific libuna definition is available. AC_DEFUN([AX_LIBUNA_CHECK_DEFINITION], @@ -976,7 +976,7 @@ dnl Function to detect if libuna dependencies are available AC_DEFUN([AX_LIBUNA_CHECK_LOCAL], [dnl No additional checks. - ac_cv_libuna_CPPFLAGS="-I../libuna"; + ac_cv_libuna_CPPFLAGS="-I../libuna -I\$(top_srcdir)/libuna"; ac_cv_libuna_LIBADD="../libuna/libuna.la"; ac_cv_libuna=local diff --git a/m4/python.m4 b/m4/python.m4 index d1f8067..87f89bd 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -1,6 +1,6 @@ dnl Functions for Python bindings dnl -dnl Version: 20231119 +dnl Version: 20240418 dnl Function to check if the python binary is available dnl "python${PYTHON_VERSION} python python# python#.#" @@ -76,10 +76,12 @@ AC_DEFUN([AX_PYTHON_CHECK], AC_MSG_RESULT( [$PYTHON_LDFLAGS]) - dnl For CygWin add the -no-undefined linker flag + dnl For CygWin and MinGW add the -no-undefined linker flag AS_CASE( - [$host_os], - [cygwin*],[PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined"], + [$build], + [*-*-cygwin*],[PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined"], + [*-*-mingw*],[PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined"], + [*-*-msys*],[PYTHON_LDFLAGS="${PYTHON_LDFLAGS} -no-undefined"], [*],[]) dnl Check for the existence of Python.h diff --git a/manuals/Makefile.am b/manuals/Makefile.am index a6fb12e..4db495a 100644 --- a/manuals/Makefile.am +++ b/manuals/Makefile.am @@ -18,9 +18,7 @@ EXTRA_DIST = \ ewfverify.1 \ libewf.3 -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/msvscpp/Makefile.am b/msvscpp/Makefile.am index 85e87f8..aa14f7b 100644 --- a/msvscpp/Makefile.am +++ b/msvscpp/Makefile.am @@ -68,9 +68,7 @@ MSVSCPP_FILES = \ EXTRA_DIST = \ $(MSVSCPP_FILES) -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/pyewf/Makefile.am b/pyewf/Makefile.am index 8925e62..5f0f2c2 100644 --- a/pyewf/Makefile.am +++ b/pyewf/Makefile.am @@ -1,7 +1,7 @@ if HAVE_PYTHON AM_CFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ + -I../include -I$(top_srcdir)/include \ + -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @@ -48,9 +48,7 @@ pyewf_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) endif -MAINTAINERCLEANFILES = \ +DISTCLEANFILES = \ + Makefile \ Makefile.in -distclean: clean - -rm -f Makefile - diff --git a/synclibs.sh b/synclibs.sh index ed53021..0594e8f 100755 --- a/synclibs.sh +++ b/synclibs.sh @@ -1,7 +1,7 @@ #!/bin/sh # Script that synchronizes the local library dependencies # -# Version: 20231023 +# Version: 20240414 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -95,10 +95,11 @@ endif d } -/distclean: clean/ { +/DISTCLEANFILES = / { n - N - d + /${LOCAL_LIB}_definitions.h/ { + d + } }"; echo "${SED_SCRIPT}" >> ${LOCAL_LIB}-$$.sed; sed -i'~' -f ${LOCAL_LIB}-$$.sed ${LOCAL_LIB_MAKEFILE_AM}; @@ -140,7 +141,7 @@ SED_SCRIPT="/^$/ { then if ! test -f "m4/libuna.m4"; then - sed -i'~' 's?@LIBUNA_CPPFLAGS@?-I$(top_srcdir)/libuna?' ${LOCAL_LIB_MAKEFILE_AM}; + sed -i'~' 's?@LIBUNA_CPPFLAGS@?-I../libuna -I$(top_srcdir)/libuna?' ${LOCAL_LIB_MAKEFILE_AM}; fi fi diff --git a/tests/Makefile.am b/tests/Makefile.am index c6fb16a..de4f0f4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/common \ + -I../include -I$(top_srcdir)/include \ + -I../common -I$(top_srcdir)/common \ @LIBCERROR_CPPFLAGS@ \ @LIBCDATA_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @@ -544,9 +544,8 @@ ewf_test_write_io_handle_LDADD = \ ../libewf/libewf.la \ @LIBCERROR_LIBADD@ -MAINTAINERCLEANFILES = \ - Makefile.in - -distclean: clean - -rm -f Makefile +DISTCLEANFILES = \ + Makefile \ + Makefile.in \ + notify_stream.log diff --git a/tests/test_glob.sh b/tests/test_glob.sh index c0cdc5e..f8d3c69 100755 --- a/tests/test_glob.sh +++ b/tests/test_glob.sh @@ -442,12 +442,9 @@ then exit ${EXIT_FAILURE}; fi -TEST_RUNNER="tests/test_runner.sh"; +TEST_DIRECTORY=`dirname $0`; -if ! test -f "${TEST_RUNNER}"; -then - TEST_RUNNER="./test_runner.sh"; -fi +TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then diff --git a/tests/test_library.sh b/tests/test_library.sh index 159518f..f1750e2 100755 --- a/tests/test_library.sh +++ b/tests/test_library.sh @@ -141,12 +141,9 @@ then exit ${EXIT_IGNORE}; fi -TEST_RUNNER="tests/test_runner.sh"; +TEST_DIRECTORY=`dirname $0`; -if ! test -f "${TEST_RUNNER}"; -then - TEST_RUNNER="./test_runner.sh"; -fi +TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then diff --git a/tests/test_manpage.sh b/tests/test_manpage.sh index 4abb656..b5fafd7 100755 --- a/tests/test_manpage.sh +++ b/tests/test_manpage.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Tests man pages. # -# Version: 20230410 +# Version: 20240413 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -45,12 +45,9 @@ then exit ${EXIT_IGNORE}; fi -TEST_RUNNER="tests/test_runner.sh"; +TEST_DIRECTORY=`dirname $0`; -if ! test -f "${TEST_RUNNER}"; -then - TEST_RUNNER="./test_runner.sh"; -fi +TEST_RUNNER="${TEST_DIRECTORY}/test_runner.sh"; if ! test -f "${TEST_RUNNER}"; then