Russ Allbery <[EMAIL PROTECTED]> writes:

> Goswin von Brederlow <[EMAIL PROTECTED]> writes:
>
>> I need exactly the same thing. I was lloking for an include statement
>> for series files though. Something like
>
>> debian/patches/series.common:
>> version.patch
>> foo.patch
>> barf.patch
>
>> debian/patches/series.amd64:
>> #include "series.common"
>> amd64.patch
>
>> debian/patches/series.i386:
>> #include "series.common" 
>> i386.patch 
>
>> Quilt does not seem to have this. But it shouldn't be hard to write a
>> makefile target that creates the series file by running
>> debian/patches/series.$ARCH through cpp. That is the way I'm going
>> anyway, hence the syntax.
>
> That seems like overkill.  Why not just do:
>
> ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
>
> patch: patch-stamp
> patch-stamp:
>       cp debian/patches/series.common debian/patches/series
>       set -e; if [ -f debian/patches/series.$(ARCH) ] ; then \
>           cat debian/patches/series.$(ARCH) >> debian/patches/series ; \
>       fi
>       quilt push -a || test $$? == 2
>       touch patch-stamp
>
> and remove debian/patches/series in unpatch?

That isn't very flexible.

By using cpp I can use #include recursively and at any point of the
series. I can also use #ifdef or any other cpp construct. I can insert
an architecture specific patch by enclosing it in #ifdef __arch__. If
I cat the files together I would have to split files into smaller
chunks.

Obviously I hope that quilt includes a feature like include and even
conditional patches in the future.

MfG
        Goswin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to