Ian Campbell <[EMAIL PROTECTED]> wrote: > On Wed, 2005-03-30 at 16:56 +0200, Frank Küster wrote: > >> There is a way to cause make to re-read a Makefile: Makefile remaking. >> >> debian/rules: debian/rules.in >> $(command that recreates debian/rules) --infile $< --outfile $@ >> >> ... make will reread the file after it has updated it. > > does that mean that something as simple as > > debian/rules: patch > # nothing or "/bin/true" or "touch debian/rules"? > > where patch is the target that does the patching should also cause a > reread?
If it is "touch debian/rules", then it will be reread; however it will (try to )patch it over and over again. This works: ,----[ Makefile ] | all: | echo hello | | Makefile: patch-stamp | touch $@ | | patch-stamp: | patch -p0 < Makefile.patch | touch patch-stamp `---- ,----[ Makefile.patch ] | --- Makefile.orig 2005-03-30 20:49:16.000000000 +0200 | +++ Makefile 2005-03-30 20:49:20.000000000 +0200 | @@ -1,5 +1,5 @@ | all: | - echo hello | + echo goodbye | | Makefile: patch-stamp | touch $@ `---- Regards, Frank -- Frank Küster Inst. f. Biochemie der Univ. Zürich Debian Developer