Results 1 to 3 of 3

Thread: qmake "make dist" not including my DISTFILES

  1. #1
    Join Date
    Jun 2011
    Posts
    23
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default qmake "make dist" not including my DISTFILES

    Hello,

    I have a .pro file and in it i declare some DISTFILES. some of these files are from the current directory and some are from another directory (../bin/)

    Qt Code:
    1. DISTFILES += \
    2. a_status.sh \
    3. a_tracks.sh \
    4. a_monitor.sh \
    5. ../bin/AApp \
    6. ../bin/LApp.xml
    To copy to clipboard, switch view to plain text mode 
    [/CODE]

    when i do a qmake I can see them all in the Makefile:
    Qt Code:
    1. DIST = a_status.sh \
    2. a_tracks.sh \
    3. a_monitor.sh \
    4. ../bin/AApp \
    5. ../bin/LApp.xml \
    To copy to clipboard, switch view to plain text mode 

    Then i do a make dist and when i look in the tar.gz file all files are there except for the 2 files from the ../bin directory which are not there. If i put the 2 files in the same directory as the scripts it works fine (but i don't want to do this) so when I do a rpmbuild -ta xxxNumber.tar.gz, this then of course fails as there is no ../bin/* files.

    How do i get it to include files from other directories other than the directory the .pro file lives in?

    Thank you.

  2. #2
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qmake "make dist" not including my DISTFILES

    You can try and play with a couple of options and see. Just for testing:

    1. Try to remove all other files and keep only 1 file in your DISTFILES list, like DISTFILES = ../bin/LApp.xml
    2. Try to enlist the files comma or space separated
    3. Try to make multiple +=(append) into the variable DISTFILES

  3. #3
    Join Date
    Jun 2011
    Posts
    23
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: qmake "make dist" not including my DISTFILES

    Thanks for the reply. It got me thinking and the problem is in the Makefile.
    It looks like this:

    Qt Code:
    1. COPY_FILE = cp -f -R
    2.  
    3. dist: distdir FORCE
    4. (cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) #-r $(DISTDIR)
    5. distdir: FORCE
    6. @test -d $(DISTDIR) || mkdir -p $(DISTDIR)
    7. $(COPY_FILE) --parents $(DIST) $(DISTDIR)/
    8. $(COPY_FILE) --parents /../lib64/qt5/mkspecs/features/data/dummy.cpp $(DISTDIR)/
    9. $(COPY_FILE) --parents <a list of my header files> $(DISTDIR)/
    10. $(COPY_FILE) --parents <a list of my source files> $(DISTDIR)/
    To copy to clipboard, switch view to plain text mode 

    From my source directory I run the test command
    Qt Code:
    1. cp -f -R --parents ../bin/LApp.xml /tmp
    To copy to clipboard, switch view to plain text mode 

    and it fails to copy the file to the tmp directory.

    I would have thought the copy options would have been able to handle copying the LApp.xml file? But no.

    If i remove the --parents from this line ($(COPY_FILE) --parents $(DIST) $(DISTDIR)/) then it works...

    but my problem now is that my Makefile is generated from a .pro with qmake.... how do I get it to remove the --parents from the line in the Makefile without having to manually remove it every time i do a qmake?

    Thanks.

Similar Threads

  1. Replies: 2
    Last Post: 6th December 2020, 00:20
  2. QMake Error on executing "qmake ; make"
    By swati27 in forum Qt Tools
    Replies: 3
    Last Post: 14th June 2016, 19:36
  3. Replies: 3
    Last Post: 15th February 2010, 18:27
  4. "make install" and "make clean" on Windows for Qt
    By Berberis in forum Installation and Deployment
    Replies: 0
    Last Post: 30th November 2009, 00:02
  5. Replies: 3
    Last Post: 8th July 2008, 20:37

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.