diff --git a/README.md b/README.md index d3b04d0..0a8d14b 100644 --- a/README.md +++ b/README.md @@ -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' +#include "mystr.h" + +int main() +{ + printf("%s\n", mystr); + return 0; +} diff --git a/t/example/mystr.c b/t/example/mystr.c new file mode 100644 index 0000000..b64b7a5 --- /dev/null +++ b/t/example/mystr.c @@ -0,0 +1,4 @@ + +#include "mystr.h" + +char *mystr = "Hello, world!"; diff --git a/t/example/mystr.h b/t/example/mystr.h new file mode 100644 index 0000000..1bf584e --- /dev/null +++ b/t/example/mystr.h @@ -0,0 +1,6 @@ +#ifndef __MYSTR_H +#define __MYSTR_H + +extern char *mystr; + +#endif