Skip to content

Commit

Permalink
use the term 'gnumake' instead of m32/Makefile.m32 [ci skip]
Browse files Browse the repository at this point in the history
Of course both autotools and cmake uses (or can use) GNU Make. Within
curl-for-win it means using raw/pure GNU Make without an extra generator
layer like cmake/autotools (or something proprietary).

This makes the term project agnostic. (E.g. curl uses `Makefile.m32`,
awaiting [1] a rename to `Makefile.mk`, libssh2 uses `GNUMakefile`,
etc.)

It's also more greppable and less ambiguous than some alternatives
('make', 'gmake', 'mk').

[1] curl/curl#9764
  • Loading branch information
vszakats committed Nov 21, 2022
1 parent ef8e8d0 commit 4729ed6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
8 changes: 4 additions & 4 deletions _build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ set -o xtrace -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o p
# - https://github.com/netwide-assembler/nasm

# Build times (2022-09-26):
# - m32: 38 min 13 sec 2293s 100%
# - gnumake: 38 min 13 sec 2293s 100%
# - cmake: 45 min 48 sec 2748s 120% 100%
# - autotools: 49 min 32 sec 2972s 130% 108%
# - autotools w/o recv patch: 54 min 8 sec 3248s 142% 118%
Expand Down Expand Up @@ -111,7 +111,7 @@ set -o xtrace -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o p
# wolfssh autotools
# libssh cmake
# libssh2 autotools, cmake
# curl cmake, autotools, Makefile.m32
# curl cmake, autotools, gnumake

cd "$(dirname "$0")"

Expand Down Expand Up @@ -285,14 +285,14 @@ _ori_path="${PATH}"

bld() {
pkg="$1"
if [ -z "${CW_BLD:-}" ] || echo " ${CW_BLD} " | grep -q -E " ${pkg}(-(cmake|autotools|make|m32))? "; then
if [ -z "${CW_BLD:-}" ] || echo " ${CW_BLD} " | grep -q -E " ${pkg}(-(cmake|autotools|gnumake))? "; then
shift

pkgori="${pkg}"
[ -n "${2:-}" ] && pkg="$2"
# allow selecting an alternate build tool
withbuildtool="$(echo "${CW_BLD:-}" | \
grep -a -o -E "${pkg}-(cmake|autotools|make|m32)" || true)"
grep -a -o -E "${pkg}-(cmake|autotools|gnumake)" || true)"
if [ -n "${withbuildtool}" ] && [ -f "${withbuildtool}.sh" ]; then
pkg="${withbuildtool}"
fi
Expand Down
15 changes: 8 additions & 7 deletions curl-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,14 @@ _VER="$1"
LIBS="${LIBS} -lbcrypt" # for auto-detection

if [ "${CW_DEV_CROSSMAKE_REPRO:-}" = '1' ]; then
# By passing -lssh2 _before_ -lcrypto (of openssl/libressl) to the linker,
# DLL size becomes closer/identical to autotools/m32-built DLLs. Otherwise
# this is not necessary, and there should not be any functional difference.
# Could not find the reason for it. File-offset-stripped-then-sorted .map
# files are identical either way. It would be useful to have a linker
# option to sort object/lib inputs to make output deterministic (these
# builds do not rely on ordering side-effects.)
# By passing -lssh2 _before_ -lcrypto (of openssl/libressl) to the
# linker, DLL size becomes closer/identical to autotools/gnumake-built
# DLLs. Otherwise this is not necessary, and there should not be any
# functional difference. Could not find the reason for it.
# File-offset-stripped-then-sorted .map files are identical either way.
# It would be useful to have a linker option to sort object/lib inputs
# to make output deterministic (these builds do not rely on ordering
# side-effects.)
LDFLAGS="${LDFLAGS} -L${_TOP}/libssh2/${_PP}/lib"
LIBS="${LIBS} -lssh2"
fi
Expand Down
2 changes: 1 addition & 1 deletion curl-m32.sh → curl-gnumake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -o xtrace -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o p

export _NAM _VER _OUT _BAS _DST

_NAM="$(basename "$0" | cut -f 1 -d '.' | sed 's/-m32//')"
_NAM="$(basename "$0" | cut -f 1 -d '.' | sed 's/-gnumake//')"
_VER="$1"

(
Expand Down
2 changes: 1 addition & 1 deletion curl.sh

0 comments on commit 4729ed6

Please sign in to comment.