Change definitions of $1,$2,$3 to match djb's redo.

If you use "redo --old-args", it will switch back to the old
(apenwarr-style) arguments for now, to give you time to update your .do
scripts.  This option will go away eventually.

Note: minimal/do doesn't understand the --old-args option.  If you're using
minimal/do in your project, keep using the old one until you update your use
of $1/$2, and then update to the new one.

apenwarr-style default.o.do:
   $1      foo
   $2      .o
   $3      whatever.tmp

djb-style default.o.do:
   $1      foo.o
   $2      foo
   $3      whatever.tmp

apenwarr-style foo.o.do:
   $1      foo.o
   $2      ""
   $3      whatever.tmp

djb-style foo.o.do:
   $1      foo.o
   $2      foo.o  (I think?)
   $3      whatever.tmp
This commit is contained in:
Avery Pennarun 2011-12-31 02:45:38 -05:00
commit 21f88094d5
27 changed files with 84 additions and 68 deletions

View file

@ -48,10 +48,10 @@ of .h files it depends on. You can pass this information
along to redo-ifchange, so if any of those headers are
changed or deleted, your .c file will be rebuilt:
redo-ifchange $1.c
gcc -o $3 -c $1.c \
-MMD -MF $1.deps
read DEPS <$1.deps
redo-ifchange $2.c
gcc -o $3 -c $2.c \
-MMD -MF $2.deps
read DEPS <$2.deps
redo-ifchange ${DEPS#*:}
This is much less confusing than the equivalent