[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Conditionally applying an architecture-dependent patch



Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de> 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?

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: