[Top][All Lists]

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

Re: patch and dist rules

From: Brian Dessent
Subject: Re: patch and dist rules
Date: Sun, 04 May 2008 17:43:00 -0700

Jack Bates wrote:

> I created a "patch" rule in our application for applying
> these patches:
> patch: patch-stamp
> patch-stamp: patches/*
>         cat patches/* | patch -p0
>         touch $@

It seems to me like this would break VPATH builds since it assumes
you're building in the source dir.

> Any suggestions how to ensure automake's "dist" rule generates a tarball
> with our patches applied?

You could create a plain static Makefile in the patches directory and
then add 'patches' to the beginning of SUBDIRS ahead of ".".  This
Makefile's only task would be to patch in $(srcdir) for the 'all'
target, patch in $(distdir) for the 'distdir' target, and provide empty
rules for all the other required targets as explained in the manual
section "Third-Party Makefiles".


reply via email to

[Prev in Thread] Current Thread [Next in Thread]