Skip to content

Commit

Permalink
autotroll.m4: Make it work with Qt 5.9.1 under openBSD.
Browse files Browse the repository at this point in the history
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 a32df6e
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions build-aux/autotroll.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a32df6e

Please sign in to comment.