Skip to content
Permalink
Browse files

autotroll.m4: Make it work with Qt 5.9.1 under openBSD.

On this platform, qmake produces

  LFLAGS = ... $(LDFLAGS)

which would eventually lead to the endless recursion

  QT_LDFLAGS = ... $(QT_LDFLAGS)

with the old sed expression.  We now do the prefixing with `QT_' only for
the variables that are exported (except LDFLAGS).

Problem reported by Vadim Penzin <vadim@penzin.net>.
  • Loading branch information...
lemzwerg committed Jun 22, 2019
1 parent 765a4da commit a32df6e7051e7d0a9e47df518180ce96b03111f6
Showing with 13 additions and 5 deletions.
  1. +13 −5 build-aux/autotroll.m4
@@ -571,14 +571,22 @@ EOF
AC_SUBST([QT_VERSION_MAJOR])

# This sed filter is applied after an expression of the form
# /^FOO.*=/!d; it starts by removing the beginning of the line,
# removing references to SUBLIBS, removing unnecessary
# whitespaces at the beginning, and prefixes all variable uses by
# QT_.
# /^FOO.*=/!d; it starts by removing the beginning of the line
# (using the empty regular expression //, which repeats the last
# regular expression match), removing references to SUBLIBS,
# removing unnecessary whitespace at the beginning, then prefixing
# our exported variables with QT_. Note that `LDFLAGS' is
# intentionally omitted.
qt_sed_filter='s///;
s/$(SUBLIBS)//g;
s/^ *//;
s/\$(\(@<:@A-Z_@:>@@<:@A-Z_@:>@*\))/$(QT_\1)/g'
s/\$(DEFINES)/$(QT_DEFINES)/g;
s/\$(CFLAGS)/$(QT_CFLAGS)/g;
s/\$(CXXFLAGS)/$(QT_CXXFLAGS)/g;
s/\$(INCPATH)/$(QT_INCPATH)/g;
s/\$(CPPFLAGS)/$(QT_CPPFLAGS)/g;
s/\$(LFLAGS)/$(QT_LFLAGS)/g;
s/\$(LIBS)/$(QT_LIBS)/g'

# Find the Makefile (qmake happens to generate a fake Makefile
# which invokes a Makefile.Debug or Makefile.Release). If we

0 comments on commit a32df6e

Please sign in to comment.
You can’t perform that action at this time.