[Qt-interest] Using `$' in QMAKE_LINK_SHLIB_CMD

Albert Chin qt-interest at mlists.thewrittenword.com
Fri Jan 9 13:36:02 CET 2009


I'm building Qt 4.4.3 on AIX and would like to change the value of
QMAKE_LINK_SHLIB_CMD in mkspecs/aix-xlc/qmake.conf to:
  QMAKE_LINK_SHLIB_CMD    = rm -f objects.o; \
        ld -r -o objects.o -bnogc $(OBJECTS) $(OBJMOC); \
        rm -f lib.exp; /usr/ccs/bin/nm -BCpg objects.o | \
        awk '{ if ((($$2 == "T") || ($$2 == "D") || ($$2 == "B")) && \
        (substr($$3,1,1) != ".")) { print $$3 } }' | sort -u >lib.exp; \
        xlC -G -qmkshrobj -bbigtoc -bE:lib.exp -o $(TARGETD) \
        $(LFLAGS) objects.o $(LIBS); rm objects.o

qmake inserts this in the generated Makefile as:
        rm -f objects.o; ld -r -o objects.o -bnogc $(OBJECTS) $(OBJMOC); rm -f lib.exp; /usr/ccs/bin/nm -BCpg objects.o | awk { if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } } | sort -u >lib.exp; g++ -shared -Wl,-bE:lib.exp -o $(TARGETD) $(LFLAGS) objects.o $(LIBS); rm objects.o

In the awk statement, I want '$$2', not '$2'. How do I get qmake to
insert a literal '$' in QMAKE_LINK_SHLIB_CMD?

-- 
albert chin (china at thewrittenword.com)



More information about the Qt-interest-old mailing list