Skip to content

Commit 5acfacc

Browse files
committed
build: sed portability fixes
Recently generating the version-def.h file and the config-list.h file have been updated, which broke versions of "sed" that do not want to be fed a file that ends with an incomplete line, and/or that do not understand the more recent "-E" option to use extended regular expression. Fix them in response to a build-failure reported on Solaris boxes. cf. https://lore.kernel.org/git/[email protected]/ Reported-by: Brad Smith <[email protected]> Reviewed-by: Collin Funk <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6a9e1c3 commit 5acfacc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

GIT-VERSION-GEN

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ read GIT_MAJOR_VERSION GIT_MINOR_VERSION GIT_MICRO_VERSION GIT_PATCH_LEVEL trail
8282
$(echo "$GIT_VERSION" 0 0 0 0 | tr '.a-zA-Z-' ' ')
8383
EOF
8484

85-
REPLACED=$(printf "%s" "$INPUT" | sed -e "s|@GIT_VERSION@|$GIT_VERSION|" \
85+
REPLACED=$(printf "%s\n" "$INPUT" | sed -e "s|@GIT_VERSION@|$GIT_VERSION|" \
8686
-e "s|@GIT_MAJOR_VERSION@|$GIT_MAJOR_VERSION|" \
8787
-e "s|@GIT_MINOR_VERSION@|$GIT_MINOR_VERSION|" \
8888
-e "s|@GIT_MICRO_VERSION@|$GIT_MICRO_VERSION|" \

generate-configlist.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ print_config_list () {
1313
cat <<EOF
1414
static const char *config_name_list[] = {
1515
EOF
16-
sed -E '
17-
/^`?[a-zA-Z].*\..*`?::$/ {
16+
sed -e '
17+
/^`*[a-zA-Z].*\..*`*::$/ {
1818
/deprecated/d;
1919
s/::$//;
2020
s/`//g;
2121
s/^.*$/ "&",/;
2222
s/, */",\n "/g;
2323
p;};
24-
d' \
24+
d' \
2525
"$SOURCE_DIR"/Documentation/*config.adoc \
26-
"$SOURCE_DIR"/Documentation/config/*.adoc|
26+
"$SOURCE_DIR"/Documentation/config/*.adoc |
2727
sort
2828
cat <<EOF
2929
NULL,

0 commit comments

Comments
 (0)