Bug 329444 - support for includes relative to included file
Summary: support for includes relative to included file
Status: RESOLVED FIXED
Alias: None
Product: kdesrc-build
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR major
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-30 23:35 UTC by David Faure
Modified: 2014-01-02 05:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 1.16


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Faure 2013-12-30 23:35:28 UTC
I'd like to split kf5-qt5-build-include into three files (frameworks, workspace, applications), and to keep kf5-qt5-build-include as the file that includes the other three.

But if my kdesrc-buildrc says
include extragear/utils/kdesrc-build/kf5-qt5-build-include
and that file says
include kf5-frameworks-build-include
then kdesrc-build is looking for that file in the current directory, not in the extragear/utils/kdesrc-build directory.

Could include files with a relative path be considered relative to the file including it? Maybe with a "./" syntax if the current semantics have to be kept, but I doubt that?
will

Reproducible: Always

Steps to Reproduce:
1. cd extragear/utils/kdesrc-build
2. wget http://www.davidfaure.fr/2013/0001-split-up-kf5-qt5-build-include.patch
3. git am 0001-split-up-kf5-qt5-build-include.patch
4. cd ../../..
5. ./kdesrc-build
Actual Results:  
Config error: Unable to open file ./kf5-frameworks-build-include which was included from line 1
        Can't continue, so stopping now.
Comment 1 Michael Pyne 2014-01-02 05:36:27 UTC
Git commit 83a91b98c3148bdf3b181eb093c7c45020a9157d by Michael Pyne.
Committed on 02/01/2014 at 05:23.
Pushed by mpyne into branch 'master'.

Make relative include entries relative to their own rc-file.

As opposed to making them relative to script location, original rc-file,
initial cwd, or similar. This allows for whole directory trees to be
moved around if need be as well as long as the internal links remain
consistent.

I've tested this on a sample here and also on the provided test case
with the bug and it seems to work well although I have not had time to
run through a whole build, merely the --pretend sequence.
FIXED-IN:1.16

M  +2    -1    modules/ksb/Application.pm
M  +41   -0    modules/ksb/RecursiveFH.pm

http://commits.kde.org/kdesrc-build/83a91b98c3148bdf3b181eb093c7c45020a9157d