Modifying the del command in makefile?


  • Moderators

    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?


  • Qt Champions 2016

    @koahnig

    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.


  • Moderators

    @mrjj

    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.


  • Qt Champions 2016

    @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:)


  • Moderators

    @mrjj

    Thanks for sharing this link.

    Maybe it was that doc I had read it before. When, it have been a long time ago.


  • Qt Champions 2016

    @koahnig
    Np, the SUBDIRS section looks interesting.
    Also i had no idea that wildcards can be used iscopes :)
    win32-msvc* {


  • Moderators

    @mrjj

    Well, the wildcard thing I know for a very long time already ;)

    Exactly since this reply to my very first post in this forum.


  • Qt Champions 2016

    @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.


  • Moderators

    @mrjj

    I am not sure, but I think I had to use once again. And yes, time flies :)

    And for sure for QMAKE_DEL_FILE there is no relevance.


  • Qt Champions 2016

    @koahnig
    If you promise not to tell anymore, i just discovered that it can actually autocomplete in .pro file :)
    Very handy. ;)