[Qt-interest] make dist recursive?

Vyacheslav V. Yurkov uvv.mail at gmail.com
Tue Jul 7 19:29:50 CEST 2009


Lorenzo Bettini wrote:
> Vyacheslav V. Yurkov wrote:
>   
>> But I did already =)
>> I get the idea how to create /make dist/ target from qfe project on 
>> sourceforge.net.
>> This is its address http://sourceforge.net/projects/qfe/
>>
>>     
>
> I haven't seen your answer in the newsgroup... can you summarize the 
> solution if possible, please?
>
> thanks
> cheers
> 	Lorenz
I created the /misc/ directory at the top-level of my project. It 
contains a script named /make_dist.sh/. The script has the following 
contest:

#!/bin/sh

#

# Unix & MacOS script to create source package

#

if [ "$1" = "" ]; then

        echo "Script may be run only from Makefile."

        exit 0

fi

PWDDIR=`pwd`

cd ..

rm -f $1

mkdir -p .tmp

rm -f .tmp/$1

PROGDIR=`pwd`

PROGDIR=`basename "$PROGDIR"`

OUTFILE=$PROGDIR/.tmp/$1

cd ..

tar --exclude="$PROGDIR/.distignore" --exclude-from="$PROGDIR/.distignore" -jcvf $OUTFILE "$PROGDIR"

mv -f $OUTFILE "$PROGDIR"

cd "$PWDDIR"

rmdir ../.tmp

exit 0

I added to the top-level project file these lines:

MAINTARGET = AppName

APPNAME_VERSION = 0.2

unix:!mac:exists(.distignore) {

    DISTARCH = "$$MAINTARGET"-"$$APPNAME_VERSION".tar.bz2

        dist.target = dist

        dist.commands = @cd misc && ./make_dist.sh $$DISTARCH

        QMAKE_EXTRA_UNIX_TARGETS += dist

}

Where an AppName is your project's name.
The top-level directory have to contain file /.distignore/ I attached. 
It contains file name extensions which should be excluded from target 
archive.
I hope this would help to you.

-- 
Vyacheslav V. Yurkov <uvv.mail at gmail.com>	Team Leader
Norilsk						Tel: +79069001870

Software Development Department
Joint Stock Company "Channel-7", ISP

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: .distignore
Url: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090708/38f3cd43/attachment.pl 


More information about the Qt-interest-old mailing list