build-sys: work around automake issue with files with a leading '-'
authorKay Sievers <kay@vrfy.org>
Thu, 27 Jun 2013 19:34:24 +0000 (21:34 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 3 Jul 2013 03:15:49 +0000 (23:15 -0400)
We should probably work around it, until it is sorted out.

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728

Makefile.am
units/x-.slice [moved from units/-.slice with 100% similarity]

index ca4513b..0dd384e 100644 (file)
@@ -380,7 +380,7 @@ dist_systemunit_DATA = \
        units/swap.target \
        units/slices.target \
        units/system.slice \
-       units/-.slice \
+       units/x-.slice \
        units/systemd-initctl.socket \
        units/systemd-shutdownd.socket \
        units/syslog.socket \
@@ -499,6 +499,17 @@ EXTRA_DIST += \
        units/rc-local.service.in \
        units/halt-local.service.in
 
+# automake is broken and can't handle files with a dash in front
+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
+units-install-hook:
+       mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
+
+units-uninstall-hook:
+       rm -f $(DESTDIR)/$(systemunitdir)/-.slice
+
+INSTALL_DATA_HOOKS += units-install-hook
+UNINSTALL_DATA_HOOKS += units-uninstall-hook
+
 dist_doc_DATA = \
        README \
        NEWS \
similarity index 100%
rename from units/-.slice
rename to units/x-.slice