Skip to content

Commit

Permalink
Changes for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Mar 8, 2024
1 parent 7c1e36d commit f5aa2e2
Show file tree
Hide file tree
Showing 30 changed files with 479 additions and 364 deletions.
45 changes: 24 additions & 21 deletions autogen.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Script to generate the necessary files for a msvscpp build
#
# Version: 20230118
# Version: 20240306

$WinFlex = "..\win_flex_bison\win_flex.exe"
$WinBison = "..\win_flex_bison\win_bison.exe"
Expand Down Expand Up @@ -29,33 +29,36 @@ If (Test-Path "${Prefix}.net")

$NamePrefix = ""

ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.l")
ForEach (${Library} in Get-ChildItem -Directory -Path "lib*")
{
$OutputFile = ${DirectoryElement} -Replace ".l$",".c"
ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.l")
{
$OutputFile = ${DirectoryElement} -Replace ".l$",".c"

$NamePrefix = Split-Path -path ${DirectoryElement} -leaf
$NamePrefix = ${NamePrefix} -Replace ".l$","_"
$NamePrefix = Split-Path -path ${DirectoryElement} -leaf
$NamePrefix = ${NamePrefix} -Replace ".l$","_"

Write-Host "Running: ${WinFlex} -Cf ${DirectoryElement}"
Write-Host "Running: ${WinFlex} -Cf ${DirectoryElement}"

# PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinFlex}' -Cf ${DirectoryElement} 2>&1"
Write-Host ${Output}
# PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinFlex}' -Cf ${DirectoryElement} 2>&1"
Write-Host ${Output}

# Moving manually since `win_flex -o filename' does not provide the expected behavior.
Move-Item "lex.yy.c" ${OutputFile} -force
}
# Moving manually since `win_flex -o filename' does not provide the expected behavior.
Move-Item "lex.yy.c" ${OutputFile} -force
}

ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.y")
{
$OutputFile = ${DirectoryElement} -Replace ".y$",".c"
ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.y")
{
$OutputFile = ${DirectoryElement} -Replace ".y$",".c"

Write-Host "Running: ${WinBison} -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement}"
Write-Host "Running: ${WinBison} -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement}"

# PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1"
Write-Host ${Output}
# PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1"
Write-Host ${Output}
}
}

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AC_PREREQ([2.71])

AC_INIT(
[libewf],
[20240303],
[20240308],
[[email protected]])

AC_CONFIG_SRCDIR(
Expand Down
13 changes: 11 additions & 2 deletions m4/bzip2.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for bzip2 required headers and functions
dnl
dnl Version: 20210403
dnl Version: 20240308

dnl Function to detect if bzip2 is available
AC_DEFUN([AX_BZIP2_CHECK_LIB],
Expand All @@ -9,8 +9,10 @@ AC_DEFUN([AX_BZIP2_CHECK_LIB],
[ac_cv_bzip2=no],
[ac_cv_bzip2=check
dnl Check if the directory provided as parameter exists
dnl For both --with-bzip2 which returns "yes" and --with-bzip2= which returns ""
dnl treat them as auto-detection.
AS_IF(
[test "x$ac_cv_with_bzip2" != x && test "x$ac_cv_with_bzip2" != xauto-detect],
[test "x$ac_cv_with_bzip2" != x && test "x$ac_cv_with_bzip2" != xauto-detect && test "x$ac_cv_with_bzip2" != xyes],
[AS_IF(
[test -d "$ac_cv_with_bzip2"],
[CFLAGS="$CFLAGS -I${ac_cv_with_bzip2}/include"
Expand Down Expand Up @@ -62,6 +64,13 @@ AC_DEFUN([AX_BZIP2_CHECK_LIB],
ac_cv_bzip2_LIBADD="-lbz2";
])
])
AS_IF(
[test "x$ac_cv_with_bzip2" != x && test "x$ac_cv_with_bzip2" != xauto-detect && test "x$ac_cv_with_bzip2" != xyes],
[AC_MSG_FAILURE(
[unable to find supported bzip2 in directory: $ac_cv_with_bzip2],
[1])
])
])
AS_IF(
Expand Down
6 changes: 3 additions & 3 deletions m4/common.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for common headers and functions
dnl
dnl Version: 20181117
dnl Version: 20240308

dnl Function to test if a certain feature was disabled
AC_DEFUN([AX_COMMON_ARG_DISABLE],
Expand All @@ -26,7 +26,7 @@ AC_DEFUN([AX_COMMON_ARG_ENABLE],
[$1],
[AS_HELP_STRING(
[--enable-$1],
[$3 [default=$4]])],
[$3 @<:@default=$4@:>@])],
[ac_cv_enable_$2=$enableval],
[ac_cv_enable_$2=$4])dnl
Expand All @@ -43,7 +43,7 @@ AC_DEFUN([AX_COMMON_ARG_WITH],
[$1],
[AS_HELP_STRING(
[--with-$1[[=$5]]],
[$3 [default=$4]])],
[$3 @<:@default=$4@:>@])],
[ac_cv_with_$2=$withval],
[ac_cv_with_$2=$4])dnl
Expand Down
9 changes: 6 additions & 3 deletions m4/libbfio.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libbfio required headers and functions
dnl
dnl Version: 20201125
dnl Version: 20240308

dnl Function to detect if libbfio is available
dnl ac_libbfio_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBBFIO_CHECK_LIB],
[ac_cv_libbfio=no],
[ac_cv_libbfio=check
dnl Check if the directory provided as parameter exists
dnl For both --with-libbfio which returns "yes" and --with-libbfio= which returns ""
dnl treat them as auto-detection.
AS_IF(
[test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect],
[test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect && test "x$ac_cv_with_libbfio" != xyes],
[AS_IF(
[test -d "$ac_cv_with_libbfio"],
[CFLAGS="$CFLAGS -I${ac_cv_with_libbfio}/include"
Expand Down Expand Up @@ -320,8 +322,9 @@ AC_DEFUN([AX_LIBBFIO_CHECK_LIB],
ac_cv_libbfio_LIBADD="-lbfio"])
])
AS_IF(
[test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect && test "x$ac_cv_libbfio" != xyes],
[test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xauto-detect && test "x$ac_cv_with_libbfio" != xyes],
[AC_MSG_FAILURE(
[unable to find supported libbfio in directory: $ac_cv_with_libbfio],
[1])
Expand Down
9 changes: 6 additions & 3 deletions m4/libcaes.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcaes required headers and functions
dnl
dnl Version: 20220529
dnl Version: 20240308

dnl Function to detect if libcaes is available
dnl ac_libcaes_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCAES_CHECK_LIB],
[ac_cv_libcaes=no],
[ac_cv_libcaes=check
dnl Check if the directory provided as parameter exists
dnl For both --with-libcaes which returns "yes" and --with-libcaes= which returns ""
dnl treat them as auto-detection.
AS_IF(
[test "x$ac_cv_with_libcaes" != x && test "x$ac_cv_with_libcaes" != xauto-detect],
[test "x$ac_cv_with_libcaes" != x && test "x$ac_cv_with_libcaes" != xauto-detect && test "x$ac_cv_with_libcaes" != xyes],
[AS_IF(
[test -d "$ac_cv_with_libcaes"],
[CFLAGS="$CFLAGS -I${ac_cv_with_libcaes}/include"
Expand Down Expand Up @@ -111,8 +113,9 @@ AC_DEFUN([AX_LIBCAES_CHECK_LIB],
ac_cv_libcaes_LIBADD="-lcaes"])
])
AS_IF(
[test "x$ac_cv_with_libcaes" != x && test "x$ac_cv_with_libcaes" != xauto-detect && test "x$ac_cv_libcaes" != xyes],
[test "x$ac_cv_with_libcaes" != x && test "x$ac_cv_with_libcaes" != xauto-detect && test "x$ac_cv_with_libcaes" != xyes],
[AC_MSG_FAILURE(
[unable to find supported libcaes in directory: $ac_cv_with_libcaes],
[1])
Expand Down
9 changes: 6 additions & 3 deletions m4/libcdata.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcdata required headers and functions
dnl
dnl Version: 20230108
dnl Version: 20240308

dnl Function to detect if libcdata is available
dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCDATA_CHECK_LIB],
[ac_cv_libcdata=no],
[ac_cv_libcdata=check
dnl Check if the directory provided as parameter exists
dnl For both --with-libcdata which returns "yes" and --with-libcdata= which returns ""
dnl treat them as auto-detection.
AS_IF(
[test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect],
[test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_with_libcdata" != xyes],
[AS_IF(
[test -d "$ac_cv_with_libcdata"],
[CFLAGS="$CFLAGS -I${ac_cv_with_libcdata}/include"
Expand Down Expand Up @@ -497,8 +499,9 @@ AC_DEFUN([AX_LIBCDATA_CHECK_LIB],
ac_cv_libcdata_LIBADD="-lcdata"])
])
AS_IF(
[test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_libcdata" != xyes],
[test "x$ac_cv_with_libcdata" != x && test "x$ac_cv_with_libcdata" != xauto-detect && test "x$ac_cv_with_libcdata" != xyes],
[AC_MSG_FAILURE(
[unable to find supported libcdata in directory: $ac_cv_with_libcdata],
[1])
Expand Down
7 changes: 5 additions & 2 deletions m4/libcdatetime.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcdatetime required headers and functions
dnl
dnl Version: 20230115
dnl Version: 20240308

dnl Function to detect if libcdatetime is available
dnl ac_libcdatetime_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -10,6 +10,8 @@ AC_DEFUN([AX_LIBCDATETIME_CHECK_LIB],
[ac_cv_libcdatetime=no],
[ac_cv_libcdatetime=check
dnl Check if the directory provided as parameter exists
dnl For both --with-libcdatetime which returns "yes" and --with-libcdatetime= which returns ""
dnl treat them as auto-detection.
AS_IF(
[test "x$ac_cv_with_libcdatetime" != x && test "x$ac_cv_with_libcdatetime" != xauto-detect],
[AS_IF(
Expand Down Expand Up @@ -217,8 +219,9 @@ AC_DEFUN([AX_LIBCDATETIME_CHECK_LIB],
ac_cv_libcdatetime_LIBADD="-lcdatetime"])
])
AS_IF(
[test "x$ac_cv_with_libcdatetime" != x && test "x$ac_cv_with_libcdatetime" != xauto-detect && test "x$ac_cv_libcdatetime" != xyes],
[test "x$ac_cv_with_libcdatetime" != x && test "x$ac_cv_with_libcdatetime" != xauto-detect && test "x$ac_cv_with_libcdatetime" != xyes],
[AC_MSG_FAILURE(
[unable to find supported libcdatetime in directory: $ac_cv_with_libcdatetime],
[1])
Expand Down
14 changes: 9 additions & 5 deletions m4/libcerror.m4
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
dnl Checks for libcerror required headers and functions
dnl
dnl Version: 20190308
dnl Version: 20240308

dnl Function to detect if libcerror is available
dnl ac_libcerror_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
AC_DEFUN([AX_LIBCERROR_CHECK_LIB],
[AS_IF(
[test "x$ac_cv_enable_shared_libs" = xno || test "x$ac_cv_with_libcerror" = xno],
[ac_cv_libcerror=no],
[dnl Check if the directory provided as parameter exists
[ac_cv_libcerror=check
dnl Check if the directory provided as parameter exists
dnl For both --with-libcerror which returns "yes" and --with-libcerror= which returns ""
dnl treat them as auto-detection.
AS_IF(
[test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect],
[test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect && test "x$ac_cv_with_libcerror" != xyes],
[AS_IF(
[test -d "$ac_cv_with_libcerror"],
[CFLAGS="$CFLAGS -I${ac_cv_with_libcerror}/include"
Expand All @@ -19,7 +22,7 @@ AC_DEFUN([AX_LIBCERROR_CHECK_LIB],
[no such directory: $ac_cv_with_libcerror],
[1])
])
ac_cv_libcerror=check],
],
[dnl Check for a pkg-config file
AS_IF(
[test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
Expand Down Expand Up @@ -98,8 +101,9 @@ AC_DEFUN([AX_LIBCERROR_CHECK_LIB],
ac_cv_libcerror_LIBADD="-lcerror"])
])
AS_IF(
[test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect && test "x$ac_cv_libcerror" != xyes],
[test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xauto-detect && test "x$ac_cv_with_libcerror" != xyes],
[AC_MSG_FAILURE(
[unable to find supported libcerror in directory: $ac_cv_with_libcerror],
[1])
Expand Down
9 changes: 6 additions & 3 deletions m4/libcfile.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcfile required headers and functions
dnl
dnl Version: 20190308
dnl Version: 20240308

dnl Function to detect if libcfile is available
dnl ac_libcfile_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCFILE_CHECK_LIB],
[ac_cv_libcfile=no],
[ac_cv_libcfile=check
dnl Check if the directory provided as parameter exists
dnl For both --with-libcfile which returns "yes" and --with-libcfile= which returns ""
dnl treat them as auto-detection.
AS_IF(
[test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect],
[test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_with_libcfile" != xyes],
[AS_IF(
[test -d "$ac_cv_with_libcfile"],
[CFLAGS="$CFLAGS -I${ac_cv_with_libcfile}/include"
Expand Down Expand Up @@ -203,8 +205,9 @@ AC_DEFUN([AX_LIBCFILE_CHECK_LIB],
ac_cv_libcfile_LIBADD="-lcfile"])
])
AS_IF(
[test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_libcfile" != xyes],
[test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xauto-detect && test "x$ac_cv_with_libcfile" != xyes],
[AC_MSG_FAILURE(
[unable to find supported libcfile in directory: $ac_cv_with_libcfile],
[1])
Expand Down
9 changes: 6 additions & 3 deletions m4/libclocale.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libclocale required headers and functions
dnl
dnl Version: 20190308
dnl Version: 20240308

dnl Function to detect if libclocale is available
dnl ac_libclocale_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCLOCALE_CHECK_LIB],
[ac_cv_libclocale=no],
[ac_cv_libclocale=check
dnl Check if the directory provided as parameter exists
dnl For both --with-libclocale which returns "yes" and --with-libclocale= which returns ""
dnl treat them as auto-detection.
AS_IF(
[test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect],
[test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_with_libclocale" != xyes],
[AS_IF(
[test -d "$ac_cv_with_libclocale"],
[CFLAGS="$CFLAGS -I${ac_cv_with_libclocale}/include"
Expand Down Expand Up @@ -126,8 +128,9 @@ AC_DEFUN([AX_LIBCLOCALE_CHECK_LIB],
ac_cv_libclocale_LIBADD="-lclocale"])
])
AS_IF(
[test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_libclocale" != xyes],
[test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xauto-detect && test "x$ac_cv_with_libclocale" != xyes],
[AC_MSG_FAILURE(
[unable to find supported libclocale in directory: $ac_cv_with_libclocale],
[1])
Expand Down
9 changes: 6 additions & 3 deletions m4/libcnotify.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcnotify required headers and functions
dnl
dnl Version: 20190308
dnl Version: 20240308

dnl Function to detect if libcnotify is available
dnl ac_libcnotify_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -10,8 +10,10 @@ AC_DEFUN([AX_LIBCNOTIFY_CHECK_LIB],
[ac_cv_libcnotify=no],
[ac_cv_libcnotify=check
dnl Check if the directory provided as parameter exists
dnl For both --with-libcnotify which returns "yes" and --with-libcnotify= which returns ""
dnl treat them as auto-detection.
AS_IF(
[test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect],
[test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_with_libcnotify" != xyes],
[AS_IF(
[test -d "$ac_cv_with_libcnotify"],
[CFLAGS="$CFLAGS -I${ac_cv_with_libcnotify}/include"
Expand Down Expand Up @@ -96,8 +98,9 @@ AC_DEFUN([AX_LIBCNOTIFY_CHECK_LIB],
ac_cv_libcnotify_LIBADD="-lcnotify"])
])
AS_IF(
[test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_libcnotify" != xyes],
[test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xauto-detect && test "x$ac_cv_with_libcnotify" != xyes],
[AC_MSG_FAILURE(
[unable to find supported libcnotify in directory: $ac_cv_with_libcnotify],
[1])
Expand Down
Loading

0 comments on commit f5aa2e2

Please sign in to comment.