octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60413] build: sed expression problems when pr


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #60413] build: sed expression problems when prefix is empty or slash
Date: Sun, 18 Apr 2021 07:21:49 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36 Edg/89.0.774.77

Follow-up Comment #8, bug #60413 (project octave):

The sed command in comment #7 wouldn't correctly match the prefix in
OCT_LINK_OPTS which looks like the following on Windows with Octave 6.2:

>> mkoctfile -p OCT_LINK_OPTS
-Wl,-rpath-link,C:\PROGRA~1\GNUOCT~1\OCTAVE~2.0\mingw64\/lib
-LC:\PROGRA~1\GNUOCT~1\OCTAVE~2.0\mingw64\/lib
-LC:\PROGRA~1\GNUOCT~1\OCTAVE~2.0\mingw64\/qt5/lib -Wl,--export-all-symbols


Maybe something like this instead?

if test -n "@prefix@"; then echo '@OCT_LINK_OPTS@' | sed -E "s%(-L|-I|
|,)@prefix@([/\\ ]|$)%\1\$\{prefix\}\2%g"; else echo '@OCT_LINK_OPTS@'; fi


Still not sure about "sed -E" or "sed -r". Neither seems to be documented for
POSIX sed:
https://www.unix.com/man-page/posix/1p/sed/


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60413>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]