Subject: filenames starting with a dash confuse automake

From: Zbigniew Jędrzejewski-Szmek <[email-masked]>
Date: Thu, 27 Jun 2013 06:37:40 +0200

Hi,
I encountered this in systemd, which recently added a file with 
a dash in the name [1].

Basically, various commands like install and rm are called
without guarding the file list with --, which causes them
to interpret the file name as an option. In case of
systemd, 'make uninstall' and thus 'make distcheck' are
affected, but depending on the type of the file (SCRIPT, DATA, etc),
other targets can be affected.

$ make install DESTDIR=/var/tmp/inst2
make[1]: Entering directory `home/zbyszek/src/automake-dash'
 /usr/bin/mkdir -p '/var/tmp/inst2/usr/local/bin'
 /usr/bin/install -c -.sh '/var/tmp/inst2/usr/local/bin'
/usr/bin/install: invalid option -- '.'

Attached toy "project" reproduces this error.

Thanks,
Zbyszek

[1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=4ad49000