[Qt-interest] QMake...

BRM bm_witness at yahoo.com
Wed Mar 24 22:11:48 CET 2010


Hm...yeah that's a rather nasty hack. I can avoid that one.

I've been trying to find the QMAKE variable for the target output - in my case, libraries (mostly static, but some dynamic at some point too).

Basically, on some projects it's okay to do:

QMAKE_CLEAN *= $$DESTDIR/*

But on others, there may be more than one project putting its file there, and I'd like to limit it to just the files that project puts there - which could be a library file and a PRL file.

I'm aware of the TARGET variable, but it doesn't give me what I want.

(Also, I'm working on Qt4.5, not 4.6 but I'm not sure that really makes much difference on this one.)

Ben



----- Original Message ----
> From: Christopher Probst <cprobst at ics.com>
> To: BRM <bm_witness at yahoo.com>
> Cc: qt-interest <qt-interest at trolltech.com>
> Sent: Wed, March 24, 2010 11:11:05 AM
> Subject: Re: [Qt-interest] QMake...
> 
> yes... but it's a very naughty hack

QMAKE_DISTCLEAN += $$DESTDIR/* 
> |  rm -rf $$DESTDIR



On 24 Mar 2010, at 14:39, BRM 
> wrote:

> Thanks. That looks to do the trick:
>
> 
> QMAKE_CLEAN *= $$DESTDIR/*
>
> Any trick to removing 
> directories?
> E.g.:
>
> QMAKE_DISTCLEAN *= 
> $$DESTDIR
>
>
> Ben
>
>
> ----- Original 
> Message ----
>> From: Christopher Probst <
> ymailto="mailto:cprobst at ics.com" 
> href="mailto:cprobst at ics.com">cprobst at ics.com>
>> To: BRM <
> ymailto="mailto:bm_witness at yahoo.com" 
> href="mailto:bm_witness at yahoo.com">bm_witness at yahoo.com>
>> Cc: 
> qt-interest <
> href="mailto:qt-interest at trolltech.com">qt-interest at trolltech.com>
>> 
> Sent: Wed, March 24, 2010 6:07:38 AM
>> Subject: Re: [Qt-interest] 
> QMake...
>>
>> sorry make that
>
> QMAKE_CLEAN += 
> $$DESTDIR/*
>
> or
>
> QMAKE_CLEAN
>> += 
> $$DESTDIR/lib*
>
> slashes work better on your platform 
> ;)
>
> On 24
>> Mar 2010, at 09:48, Christopher Probst 
> wrote:
>
>> Hello
>> Ben,
>>
>> I 
> would add  the following to your pro
>> 
> file.
>>
>> QMAKE_CLEAN += 
> $$DESTDIR\*
>>
>>
>> or
>>
>> 
> QMAKE_CLEAN += $$DESTDIR\lib*
>>
>>
>>
>> 
> depending on what you want deleted on a make 
> clean..
>>
>>
>> see
>>
>> for more 
> details see
>>
>>
>> 
> http://doc.trolltech.com/4.5/qmake-variable-reference.html#qmake- 
>> 
> clean
>>
>>
>> Thanks,
>> 
> Christo
>>
>>
>> On 24 Mar 2010, at 00:28, 
> BRM
>> wrote:
>>
>>> I have a number of projects 
> that use Qmake; some have
>> sub-projects
>>> as 
> dependencies.
>>> Each project is laid out
>> as 
> follows:
>>>
>>> <project dir>\
>>> 
> <project
>> dir>\src
>>> <project 
> dir>\include
>>>
>>> Most
>> all of the 
> dependencies build into static libraries using
>>> Qmake, 
> and
>> as such leave their binaries in the 
> following:
>>>
>>>
>> <project 
> dir>\lib
>>> <project
>> 
> dir>\lib.debug
>>>
>>> This all works, the projects 
> find
>> their dependencies and link
>>> without 
> a
>> problem.
>>>
>>> The problem is when a 
> dependency fails to
>> build, the previous build
>>> is 
> often still in the output location -
>> even when I run 
> 'make
>>> distclean'; thus the full project links even
>> 
> when it should not.
>>>
>>> The output directory is 
> specified as
>> follow in the QMake 
> file:
>>>
>>> CONFIG(debug,debug|release)
>> 
> {
>>>  DESTDIR = ../lib.debug
>>> } 
> else
>> {
>>>  DESTDIR = ../lib
>>> 
> }
>>>
>>> Is
>> there a way I can get it the 
> QMake project to clean out the
>>> DESTDIR
>> location? At 
> the very least when I run "make distclean",
>>> though
>> 
> preferably on "make clean" too.
>>> Note: The project only needs 
> to
>> clean out what it puts in there
>>> 
> itself.
>>>
>>>
>> 
> TIA,
>>>
>>> 
> Ben
>>>
>>>
>>>
>> 
> _______________________________________________
>>> Qt-interest 
> mailing
>> list
>>>
>> href="mailto:
> ymailto="mailto:Qt-interest at trolltech.com" 
> href="mailto:Qt-interest at trolltech.com">Qt-interest at trolltech.com">
> ymailto="mailto:Qt-interest at trolltech.com" 
> href="mailto:Qt-interest at trolltech.com">Qt-interest at trolltech.com
>>>
>> 
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>
>>
>>
>> 
> _______________________________________________
>> Qt-interest 
> mailing
>> list
>>
>> href="mailto:
> ymailto="mailto:Qt-interest at trolltech.com" 
> href="mailto:Qt-interest at trolltech.com">Qt-interest at trolltech.com">
> ymailto="mailto:Qt-interest at trolltech.com" 
> href="mailto:Qt-interest at trolltech.com">Qt-interest at trolltech.com
>>
>> 
> href="
> target=_blank 
> >http://lists.trolltech.com/mailman/listinfo/qt-interest"  
>> 
> target=_blank
>>> 
> href="http://lists.trolltech.com/mailman/listinfo/qt-interest" target=_blank 
> >http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>
> 
> _______________________________________________
> Qt-interest mailing 
> list
> 
> href="mailto:Qt-interest at trolltech.com">Qt-interest at trolltech.com
> 
> href="http://lists.trolltech.com/mailman/listinfo/qt-interest" target=_blank 
> >http://lists.trolltech.com/mailman/listinfo/qt-interest
>




More information about the Qt-interest-old mailing list