[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: CVS error: cvs [update aborted]: could not chdir to kdemultimedia/noatun/noatun: Not a directory
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-11-07 14:52:45
[Download RAW message or body]

On Mercredi 7 Novembre 2001 15:22, Rob Kaper wrote:
> When updating kdemultimedia I run into the following error.
> 
> cvs [update aborted]: could not chdir to kdemultimedia/noatun/noatun: Not a
> directory
> 
> There is probably an attic directory on the server while there's a file in
> my local tree, which is compiled every single time. Can someone fix this on
> the server?

Not really, since it would break the 2.2.x branch.

The best solution is to use srcdir!=builddir so that the binary doesn't get
created in the same directory as the sources.
See instructions in the attached file. I just updated them, maybe this should
go on developer.kde.org.

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE 3.0: Konquering the Desktops


["srccdir_builddir.txt" (text/plain)]

The srcdir!=builddir setup.

Why
===
It separates source and generated stuff. Makes it
easy to rebuild from scratch (rm -rf build :-), to look at
the source files (grep only greps sources, ls only lists sources, etc.),
to package the sources for a RPM or a tar.gz, etc.

Tip
===
Something very handy for users of the srcdir!=builddir setup:
 
1) Use zsh
2) name the toplevel directory "kdecvs"
3) Define those aliases:
alias cb='cd kdecvs kdecvs/build'
alias cs='cd kdecvs/build kdecvs'

Non zsh users might use something like
alias cb='cd `pwd | sed -e 's,kdecvs,kdecvs/build,'`'
alias cs='cd `pwd | sed -e 's,kdecvs/build,kdecvs,'`'

4) export OBJ_REPLACEMENT='s#kdecvs#kdecvs/build#'
This is used by the "makeobj" script from kdesdk/scripts
 
->
cb (change to build dir) goes to the builddir corresponding to the current
    source dir
cs (change to source dir) does the opposite.
 
Example:
-zsh- dfaure 14:27 /mnt/devel/kde/kde2/koffice/kspread>cb
/mnt/devel/kde/kde2/build/koffice/kspread
-zsh- dfaure 14:27 /mnt/devel/kde/kde2/build/koffice/kspread>
 
This allows to switch between both, very handy for changing a source file
and then recompiling.

You can also use "makeobj" from kdesdk/scripts, it automatically
switches to the builddir when compiling.
 
How
===
Once this is set up, here is how to use it :

cd kdelibs
make -f Makefile.cvs    (yes, this has to be done in the source dir)
cd ../build
mkdir kdelibs           (create a build dir for kdelibs)
cd kdelibs
/full/path/to/srcdir/kdelibs/configure        (use a full path, not ../../, for xemacs)
make
make install

Well, you can make a script for all that.

Alternative
===========
Instead of a completely separate directory with all modules,
you might prefer a build directory inside each module.
To set that up, export OBJ_SUBDIR=build, and don't export OBJ_REPLACEMENT.
This will make "makeobj" use <cvsmodule>/build/ to compile.


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic