Add t/example, a basic example build environment suitable for a tutorial.

This commit is contained in:
Avery Pennarun 2010-11-17 19:49:41 -08:00
commit eae3e7cdef
14 changed files with 51 additions and 8 deletions

View file

@ -64,9 +64,9 @@ But the easiest way to show it is with an example.
Create a file called default.o.do:
redo-ifchange $1.c
gcc -MD -MF deps.tmp -c -o $3 $1.c
DEPS=$(sed -e "s/^$3://" -e 's/\\//g' <deps.tmp)
rm -f deps.tmp
gcc -MD -MF $3.deps.tmp -c -o $3 $1.c
DEPS=$(sed -e "s/^$3://" -e 's/\\//g' <$3.deps.tmp)
rm -f $3.deps.tmp
redo-ifchange $DEPS
Create a file called myprog.do: