Welcome! Log In Create A New Profile

Advanced

[PATCH] Use pipe as a delimiter for sed(1) to fix build for libnjs target

Sergey A. Osokin
May 11, 2023 11:16PM
# HG changeset patch
# User Sergey A. Osokin <osa@FreeBSD.org.ru>
# Date 1683860927 -10800
# Fri May 12 06:08:47 2023 +0300
# Node ID 9d717a336e89a34ac92b87a6294a5f552dc56f74
# Parent 1f84f3c34bb08b3489040319aac5cd46ca172bec
Use pipe as a delimiter for sed(1) to fix build for libnjs target.

sed(1) command line utility may fail with the following error:
sed: 1: "s,@EXTRA_LIBS@,-lm -L ...": bad in substitute command: '-'
when a replacement for @EXTRA_LIBS@ contains a comma symbol.

diff -r 1f84f3c34bb0 -r 9d717a336e89 auto/make
--- a/auto/make Wed May 10 22:36:53 2023 -0700
+++ b/auto/make Fri May 12 06:08:47 2023 +0300
@@ -320,11 +320,11 @@
pc: $NJS_BUILD_DIR/njs.pc

$NJS_BUILD_DIR/njs.pc: $NJS_BUILD_DIR/njs_auto_config.h
- sed -e "s,@PREFIX@,$(pwd)/$NJS_BUILD_DIR," \\
- -e "s,@LIBDIR@,$(pwd)/$NJS_BUILD_DIR," \\
- -e "s,@CFLAGS@,-I$(pwd)/$NJS_BUILD_DIR -I$(pwd)/src," \\
- -e "s,@VERSION@,\$(NJS_VER)," \\
- -e "s,@EXTRA_LIBS@,-lm $NJS_LIBS $NJS_LIB_AUX_LIBS," \\
+ sed -e "s|@PREFIX@|$(pwd)/$NJS_BUILD_DIR|" \\
+ -e "s|@LIBDIR@|$(pwd)/$NJS_BUILD_DIR|" \\
+ -e "s|@CFLAGS@|-I$(pwd)/$NJS_BUILD_DIR -I$(pwd)/src|" \\
+ -e "s|@VERSION@|\$(NJS_VER)|" \\
+ -e "s|@EXTRA_LIBS@|-lm $NJS_LIBS $NJS_LIB_AUX_LIBS|" \\
src/njs.pc.in > \$@
END

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Use pipe as a delimiter for sed(1) to fix build for libnjs target

Sergey A. Osokin 291 May 11, 2023 11:16PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 228
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready