Jack Bates wrote: > I created a "patch" rule in our application Makefile.am 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". Brian