SuperBuild: git clone gets deleted when recreating build dir

Valentin Rusu kde at rusu.info
Tue Sep 13 11:54:38 UTC 2011


On 09/12/2011 11:08 PM, Alexander Neundorf wrote:
> On Sunday, August 28, 2011 09:33:01 PM Valentin Rusu wrote:
>> Hello,
>>
>> In my setup, the sources are cloned outside the ../build/ directory, as
>> that
>> let me easily find and modify them. But I just found out that the source
>> directory gets deleted when I recreate the corresponding build directory.
>>
>> To make it clear, here are the steps:
>> 1- go to one of the superbuild subdirs,
>> 2- mkdir build
>> 3- cd build
>> 4- cmake ..
>> 5- make
>> This will clone the sources in the src directory then build them. On my
>> setup, the src directory is outside this build directory.
>>
>>
>> Now, if the build directory created at step 2 is deleted (rm -rf build),
>> then steps 2 to 5 are re-executed, the src located directory will get
>> recreated at step 5 and all local modifications will be lost.
>>
>> I looked into the cmake externalproject_add macro documentation, but it
>> says
>> nothing about this. What would be the option that we must use to prevent
>> git clone if existing sources are in place?
> I think nothing.
> The source dir is part of the build dir. 
Well, that's the default setting. But I tried using superbuild to build
sources I work on. So I adjusted the configuration to get the sources
outside of this directory, in a common source dir. This also has the
advantage to let me see what are the repos I got from GIT.

> Why do you want to delete it 
> completely ? 
In some cases like recompiling QT a complete rebuild is needed.
> It should be enough to delete only the "Build" dir in the build 
> dir (and not the "Source" dir which is with the default setup its sibling).
>
> So, for a superbuild, the building is the whole process, i.e. getting the 
> sources, configuring, and updating them.
Is superbuild intended for those who want to contribute to KDE or it's
only packager-oriented? Should developers stick with kde-srcbuild or
techbase scripts?

> By deleting the build dir of this super- or meta-build, all steps have to be 
> redone, including getting the sources.
> I'll have a closer look again in the next days.
Could you also check the updating operation please, as it's currently
using "git fetch" instead of "git pull". E.g., if the build dir is not
deleted and the clone is already there, newer sources are never
retrieved inside the clone.

-- 
Valentin Rusu (IRC valir, KDE vrusu)
KSecretsService (former KSecretService, KWallet replacement)



More information about the Kde-buildsystem mailing list