[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
some clean rules don't work when some file starts with '-'
From: |
Vincent Lefevre |
Subject: |
some clean rules don't work when some file starts with '-' |
Date: |
Thu, 20 Mar 2008 13:26:21 +0100 |
User-agent: |
Mutt/1.5.17-vl-r21552 (2008-03-11) |
automake 1.10.1 generates a Makefile with:
mostlyclean-compile:
-rm -f *.$(OBJEXT)
This results in:
$ /usr/bin/make clean && echo OK
[...]
rm -f *.o
rm: invalid option -- .
Try `rm ./-.o' to remove the file `-.o'.
Try `rm --help' for more information.
make[1]: [mostlyclean-compile] Error 1 (ignored)
test "" = "" || rm -f *_.c
rm -f *.lo
make[1]: Leaving directory `/home/vlefevre/software/mpfr'
OK
(and make doesn't even exit with a non-zero exit status).
The rule should have been:
mostlyclean-compile:
-rm -f -- *.$(OBJEXT)
or:
mostlyclean-compile:
-rm -f ./*.$(OBJEXT)
Other similar rules are in the same case.
--
Vincent Lefèvre <address@hidden> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
- some clean rules don't work when some file starts with '-',
Vincent Lefevre <=