Modifying the del command in makefile?
-
Basically I am using IFW and like to update an installer.exe and a repository folder, which does not really work.
Therefore, I am using rebuild. The exe is being removed and build again. However, the repository does not change. The reason is that the repository is a folder and not a single file.
I am on windows. The problem is that the folder is not cleaned, because the del command triggers an input from keyboard, which will not come of course. The only thing to do would be adding the parameter '/Q' to the del command as used in the makefile.However, the makefile is generated by qmake. Are there possibilities to modify the standard commands for the makefile through *.pro file?
-
mrjj Lifetime Qt Championreplied to koahnig on 3 May 2017, 20:49 last edited by mrjj 5 Mar 2017, 20:51
Hi
Disclaimer: I dont know IFW so forgive me if not what u ask for.I think u can alter the
"C:\Qt\5.7\mingw53_32\mkspecs\features\spec_post.prf" (note compiler)QMAKE_DEL_FILE = del
http://stackoverflow.com/questions/20324061/where-are-variables-such-as-mkdir-and-copy-dir-defined
The link below also mention
win32:QMAKE_DEL_FILE = del /q
( The talk seems for older version of Qt so not sure it still works)http://www.qtcentre.org/threads/9287-How-do-I-get-QMAKE_CLEAN-to-delete-a-directory
Did not test. Just read.
-
Thanks for reply.
I was actually looking for such thing like QMAKE_DEL_FILE, but it is not documented (anymore?).
BTW it has to be in this case
win32:QMAKE_DEL_FILE = del /q /s
because of subfolders.
It still works for Qt 5.4.
-
@koahnig said in Modifying the del command in makefile?:
Ok super. that might come in handy.
I could not find the any docs either beside this one
https://wiki.qt.io/Undocumented_QMake
which might explain the lack other the other docs:) -
@koahnig
Np, the SUBDIRS section looks interesting.
Also i had no idea that wildcards can be used iscopes :)
win32-msvc* { -
Well, the wildcard thing I know for a very long time already ;)
Exactly since this reply to my very first post in this forum.
-
@koahnig
Hehe. 6 years. :)
How time flies.
I assume modifying spec_post.prf is a bad idea since it might be overwritten and
if
win32:QMAKE_DEL_FILE = del /q
works there might be no reason at all. -
@koahnig
If you promise not to tell anymore, i just discovered that it can actually autocomplete in .pro file :)
Very handy. ;)
6/10