On Cygwin and MinGW, second rebuld by using main.mk will be faild.
<verbatim>
$ make -f Makefile.linux-gcc libsqlite3.a
(The first building will suceed.)
$ make -f Makefile.linux-gcc clean
$ make -f Makefile.linux-gcc libsqlite3.a
(The second rebuilding will failed.)
gcc -g -O2 -o mkkeywordhash -DNDEBUG=1 -
DHAVE_FDATASYNC=1 ../sqlite/tool/mkkeywordhash.c
./mkkeywordhash >keywordhash.h
cp ../sqlite/src/parse.y .
rm -f parse.h
./lemon -DNDEBUG=1 -DHAVE_FDATASYNC=1 parse.y
Can't open the template file "lempar.c".
make: *** [parse.c] Error 1
$ rm lemon.exe mkkeywordhash.exe
$ make -f Makefile.linux-gcc libsqlite3.a
(Rebuilding will suceed.)
</verbatim>
When you read, please replace ``foo'' to ``lemon'' or ``mkkeywordhash''.
On Cygwin and MinGW, foo.exe will be generated by following rule.
<verbatim>
foo: foo.c
$(CC) -o $@ $<
</verbatim>
But, following ``clean'' rule can not delete foo.exe.
<verbatim>
clean:
$(RM) foo
</verbatim>
So, I suggest to revise some rules for executable files as following.
<verbatim>
foo$(EXE): foo.c
$(CC) -o $@ $<
clean:
$(RM) foo$(EXE)
</verbatim>
|