Skip to content

Commit f72ba71

Browse files
authored
(xmlsec-build) Fixed minor issues build scripts and makefiles (#1390)
1 parent 7928d28 commit f72ba71

10 files changed

Lines changed: 43 additions & 22 deletions

‎autogen.sh‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/bin/sh
22
# Run this to generate all the initial makefiles, etc.
33
# This is just a trivial wrapper around autoreconf and configure.
4+
#
5+
# The generated configure script runs in the current working directory, so
6+
# for an out-of-tree build create a build directory first, e.g.:
7+
# mkdir build
8+
# cd build
9+
# ../autogen.sh [configure options]
410

511
set -e
612

‎configure.ac‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ AC_MSG_RESULT([$LIBXSLT_FOUND])
662662
dnl Finally set variables
663663
if test "z$LIBXSLT_FOUND" = "zyes" ; then
664664
XMLSEC_NO_LIBXSLT="0"
665-
LIBXSLT_PC_FILE_COND=", libxslt >= $LIBXSLT_MIN_VERSION"
665+
LIBXSLT_PC_FILE_COND="libxslt >= $LIBXSLT_MIN_VERSION"
666666
else
667667
XMLSEC_NO_LIBXSLT="1"
668668
LIBXSLT_PC_FILE_COND=""
@@ -745,7 +745,7 @@ dnl Priority 3: Guess with pkg_config
745745
if test "z$OPENSSL_FOUND" = "zno" -a "z$PKGCONFIG_FOUND" = "zyes" ; then
746746
PKG_CHECK_MODULES(OPENSSL, openssl >= $OPENSSL_MIN_VERSION,
747747
[OPENSSL_FOUND=yes
748-
OPENSSL_PC_REQUIRES="openssl >= $OPENSSL_MIN_VERSION, "],
748+
OPENSSL_PC_REQUIRES="openssl >= $OPENSSL_MIN_VERSION"],
749749
[OPENSSL_FOUND=no])
750750
fi
751751

@@ -1051,39 +1051,39 @@ if test "z$NSPR_FOUND" = "zno" -a "z$PKGCONFIG_FOUND" = "zyes" -a "z$with_mozill
10511051
if test "z$NSPR_FOUND" = "zno" ; then
10521052
PKG_CHECK_MODULES(NSPR, mozilla-nspr >= $MOZILLA_MIN_VERSION,
10531053
[NSPR_FOUND=yes NSPR_PACKAGE=mozilla-nspr
1054-
NSPR_PC_REQUIRES="mozilla-nspr >= $MOZILLA_MIN_VERSION, "],
1054+
NSPR_PC_REQUIRES="mozilla-nspr >= $MOZILLA_MIN_VERSION"],
10551055
[NSPR_FOUND=no])
10561056
fi
10571057
if test "z$NSPR_FOUND" = "zno" ; then
10581058
PKG_CHECK_MODULES(NSPR, xulrunner-nspr >= $NSPR_MIN_VERSION,
10591059
[NSPR_FOUND=yes NSPR_PACKAGE=xulrunner-nspr
1060-
NSPR_PC_REQUIRES="xulrunner-nspr >= $NSPR_MIN_VERSION, "],
1060+
NSPR_PC_REQUIRES="xulrunner-nspr >= $NSPR_MIN_VERSION"],
10611061
[NSPR_FOUND=no])
10621062
fi
10631063
if test "z$NSPR_FOUND" = "zno" ; then
10641064
PKG_CHECK_MODULES(NSPR, nspr >= $NSPR_MIN_VERSION,
10651065
[NSPR_FOUND=yes NSPR_PACKAGE=nspr
1066-
NSPR_PC_REQUIRES="nspr >= $NSPR_MIN_VERSION, "],
1066+
NSPR_PC_REQUIRES="nspr >= $NSPR_MIN_VERSION"],
10671067
[NSPR_FOUND=no])
10681068
fi
10691069
fi
10701070
if test "z$NSS_FOUND" = "zno" -a "z$PKGCONFIG_FOUND" = "zyes" -a "z$with_mozilla_ver" = "z" ; then
10711071
if test "z$NSS_FOUND" = "zno" ; then
10721072
PKG_CHECK_MODULES(NSS, mozilla-nss >= $MOZILLA_MIN_VERSION,
10731073
[NSS_FOUND=yes NSS_PACKAGE=mozilla-nss
1074-
NSS_PC_REQUIRES="mozilla-nss >= $MOZILLA_MIN_VERSION, "],
1074+
NSS_PC_REQUIRES="mozilla-nss >= $MOZILLA_MIN_VERSION"],
10751075
[NSS_FOUND=no])
10761076
fi
10771077
if test "z$NSS_FOUND" = "zno" ; then
10781078
PKG_CHECK_MODULES(NSS, xulrunner-nss >= $NSS_MIN_VERSION,
10791079
[NSS_FOUND=yes NSS_PACKAGE=xulrunner-nss
1080-
NSS_PC_REQUIRES="xulrunner-nss >= $NSS_MIN_VERSION, "],
1080+
NSS_PC_REQUIRES="xulrunner-nss >= $NSS_MIN_VERSION"],
10811081
[NSS_FOUND=no])
10821082
fi
10831083
if test "z$NSS_FOUND" = "zno" ; then
10841084
PKG_CHECK_MODULES(NSS, nss >= $NSS_MIN_VERSION,
10851085
[NSS_FOUND=yes NSS_PACKAGE=nss
1086-
NSS_PC_REQUIRES="nss >= $NSS_MIN_VERSION, "],
1086+
NSS_PC_REQUIRES="nss >= $NSS_MIN_VERSION"],
10871087
[NSS_FOUND=no])
10881088
fi
10891089
fi
@@ -1321,13 +1321,13 @@ if test "z$GNUTLS_FOUND" = "zno" -a "z$PKGCONFIG_FOUND" = "zyes" ; then
13211321
if test "z$GNUTLS_FOUND" = "zno" ; then
13221322
PKG_CHECK_MODULES(GNUTLS, gnutls >= $GNUTLS_MIN_VERSION,
13231323
[GNUTLS_FOUND=yes GNUTLS_PACKAGE=gnutls
1324-
GNUTLS_PC_REQUIRES="gnutls >= $GNUTLS_MIN_VERSION, "],
1324+
GNUTLS_PC_REQUIRES="gnutls >= $GNUTLS_MIN_VERSION"],
13251325
[GNUTLS_FOUND=no])
13261326
fi
13271327
if test "z$GNUTLS_FOUND" = "zno" ; then
13281328
PKG_CHECK_MODULES(GNUTLS, libgnutls >= $GNUTLS_MIN_VERSION,
13291329
[GNUTLS_FOUND=yes GNUTLS_PACKAGE=libgnutls
1330-
GNUTLS_PC_REQUIRES="libgnutls >= $GNUTLS_MIN_VERSION, "],
1330+
GNUTLS_PC_REQUIRES="libgnutls >= $GNUTLS_MIN_VERSION"],
13311331
[GNUTLS_FOUND=no])
13321332
fi
13331333
fi
@@ -1642,25 +1642,25 @@ if test "z$GCRYPT_FOUND" = "zno" -a "z$PKGCONFIG_FOUND" = "zyes" ; then
16421642
if test "z$GCRYPT_FOUND" = "zno" ; then
16431643
PKG_CHECK_MODULES(GCRYPT, gcrypt >= $GCRYPT_MIN_VERSION,
16441644
[GCRYPT_FOUND=yes GCRYPT_PACKAGE=gcrypt
1645-
GCRYPT_PC_REQUIRES="gcrypt >= $GCRYPT_MIN_VERSION, "],
1645+
GCRYPT_PC_REQUIRES="gcrypt >= $GCRYPT_MIN_VERSION"],
16461646
[GCRYPT_FOUND=no])
16471647
fi
16481648
if test "z$GCRYPT_FOUND" = "zno" ; then
16491649
PKG_CHECK_MODULES(GCRYPT, libgcrypt20 >= $GCRYPT_MIN_VERSION,
16501650
[GCRYPT_FOUND=yes GCRYPT_PACKAGE=libgcrypt20
1651-
GCRYPT_PC_REQUIRES="libgcrypt20 >= $GCRYPT_MIN_VERSION, "],
1651+
GCRYPT_PC_REQUIRES="libgcrypt20 >= $GCRYPT_MIN_VERSION"],
16521652
[GCRYPT_FOUND=no])
16531653
fi
16541654
if test "z$GCRYPT_FOUND" = "zno" ; then
16551655
PKG_CHECK_MODULES(GCRYPT, libgcrypt11 >= $GCRYPT_MIN_VERSION,
16561656
[GCRYPT_FOUND=yes GCRYPT_PACKAGE=libgcrypt11
1657-
GCRYPT_PC_REQUIRES="libgcrypt11 >= $GCRYPT_MIN_VERSION, "],
1657+
GCRYPT_PC_REQUIRES="libgcrypt11 >= $GCRYPT_MIN_VERSION"],
16581658
[GCRYPT_FOUND=no])
16591659
fi
16601660
if test "z$GCRYPT_FOUND" = "zno" ; then
16611661
PKG_CHECK_MODULES(GCRYPT, libgcrypt >= $GCRYPT_MIN_VERSION,
16621662
[GCRYPT_FOUND=yes GCRYPT_PACKAGE=libgcrypt
1663-
GCRYPT_PC_REQUIRES="libgcrypt >= $GCRYPT_MIN_VERSION, "],
1663+
GCRYPT_PC_REQUIRES="libgcrypt >= $GCRYPT_MIN_VERSION"],
16641664
[GCRYPT_FOUND=no])
16651665
fi
16661666
fi

‎docs/md/Makefile.am‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ endif
5959

6060
else
6161

62-
docs, docs-copy, docs-manpages:
62+
docs docs-copy docs-manpages:
6363
@(echo "=== ERROR: To build Markdown docs, make sure pandoc and python3 are installed" ; exit 1; )
6464

6565
endif

‎scripts/README-WINDOWS.md.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ CMAKE_XMLSEC_RUNTIME="MultiThreadedDLL"
1010
CMAKE_XMLSEC_CONFIG=Release
1111
CMAKE_XMLSEC_SHARED_LIBS=ON
1212

13-
cmake -B <build-path>" -A "${CMAKE_XMLSEC_ARCH}" -G "${CMAKE_XMLSEC_GENERATOR}" \
13+
cmake -B "<build-path>" -A "${CMAKE_XMLSEC_ARCH}" -G "${CMAKE_XMLSEC_GENERATOR}" \
1414
-D CMAKE_MSVC_RUNTIME_LIBRARY="${CMAKE_XMLSEC_RUNTIME}" \
1515
-D BUILD_SHARED_LIBS="${CMAKE_XMLSEC_SHARED_LIBS}" \
1616
-D CMAKE_PREFIX_PATH="<top-install-path>" \
@@ -20,7 +20,7 @@ cmake -B <build-path>" -A "${CMAKE_XMLSEC_ARCH}" -G "${CMAKE_XMLSEC_GENERATOR}"
2020
-D LIBXML2_WITH_ZLIB=OFF \
2121
-D LIBXML2_WITH_TESTS=OFF
2222

23-
cmake --build <build-path>" --config "${CMAKE_XMLSEC_CONFIG}"
23+
cmake --build "<build-path>" --config "${CMAKE_XMLSEC_CONFIG}"
2424

2525
cmake --install "<build-path>" --config "${CMAKE_XMLSEC_CONFIG}"
2626

‎scripts/build_coverity.sh‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,20 @@ cov_url="https://scan.coverity.com/builds?project=xmlsec"
1414
cov_email="aleksey@aleksey.com"
1515
cur_pwd=`pwd`
1616
script_pwd=$(dirname "$0")
17+
srcdir=$(cd "$script_pwd/.." && pwd)
1718
today=`date +%F-%H-%M-%S`
1819
tar_file="xmlsec1-$version-$today.tar.gz"
1920

21+
# Restore the caller's working directory on any exit (including 'set -e'
22+
# failures), since the script builds in the source tree.
23+
trap 'cd "$cur_pwd"' EXIT
24+
2025
echo "============== Building xmlsec"
21-
"$script_pwd/../configure" --enable-legacy-features --enable-ftp --enable-http --with-gcrypt
26+
cd "$srcdir"
27+
# Regenerate the build system so that configure always matches the current
28+
# configure.ac, even if a stale configure was left over from a previous run.
29+
autoreconf -i -f
30+
./configure --enable-legacy-features --enable-ftp --enable-http --with-gcrypt
2231
make clean
2332
rm -rf cov-int/
2433
cov-build --dir cov-int make -j4

‎scripts/build_release.sh‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ set -e
33
#
44
# Usage: build_release.sh <version> [<release-candidate-tag>]
55
#
6+
# Note: the temporary build area under /tmp ($build_root, created at the
7+
# start of the run) is intentionally left in place when the script finishes,
8+
# so that the cloned source and the built artifacts can be inspected;
9+
# remove it manually when it is no longer needed, e.g. with
10+
# 'rm -rf /tmp/xmlsec-build-area-<date-time>'.
11+
#
612

713

814
# Configuration.

‎xmlsec-gcrypt.pc.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ includedir=@includedir@
66
Name: xmlsec1-gcrypt
77
Version: @VERSION@
88
Description: XML Security Library implements XML Signature and XML Encryption standards
9-
Requires: @GCRYPT_PC_REQUIRES@libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@
9+
Requires: @GCRYPT_PC_REQUIRES@ libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@
1010
Cflags: @XMLSEC_GCRYPT_CFLAGS@
1111
Cflags.private: -DXMLSEC_STATIC
1212
Libs: @XMLSEC_GCRYPT_LIBS@

‎xmlsec-gnutls.pc.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ includedir=@includedir@
66
Name: xmlsec1-gnutls
77
Version: @VERSION@
88
Description: XML Security Library implements XML Signature and XML Encryption standards
9-
Requires: @GNUTLS_PC_REQUIRES@libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@
9+
Requires: @GNUTLS_PC_REQUIRES@ libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@
1010
Cflags: @XMLSEC_GNUTLS_CFLAGS@
1111
Cflags.private: -DXMLSEC_STATIC
1212
Libs: @XMLSEC_GNUTLS_LIBS@

‎xmlsec-nss.pc.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ includedir=@includedir@
66
Name: xmlsec1-nss
77
Version: @VERSION@
88
Description: XML Security Library implements XML Signature and XML Encryption standards
9-
Requires: @NSS_PC_REQUIRES@@NSPR_PC_REQUIRES@libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@
9+
Requires: @NSS_PC_REQUIRES@ @NSPR_PC_REQUIRES@ libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@
1010
Cflags: @XMLSEC_NSS_CFLAGS@
1111
Cflags.private: -DXMLSEC_STATIC
1212
Libs: @XMLSEC_NSS_LIBS@

‎xmlsec-openssl.pc.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ includedir=@includedir@
66
Name: xmlsec1-openssl
77
Version: @VERSION@
88
Description: XML Security Library implements XML Signature and XML Encryption standards
9-
Requires: @OPENSSL_PC_REQUIRES@libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@
9+
Requires: @OPENSSL_PC_REQUIRES@ libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@
1010
Cflags: @XMLSEC_OPENSSL_CFLAGS@
1111
Cflags.private: -DXMLSEC_STATIC
1212
Libs: @XMLSEC_OPENSSL_LIBS@

0 commit comments

Comments
 (0)