[sheepdog] [PATCH] script/Makefile.am: remove manual install script

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Sep 5 09:31:29 CEST 2013


This also fixes dependency of /etc/bash_completion.d/dog.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 script/Makefile.am                 | 28 +++++++++-------------------
 script/{generic.in => sheepdog.in} |  0
 2 files changed, 9 insertions(+), 19 deletions(-)
 rename script/{generic.in => sheepdog.in} (100%)

diff --git a/script/Makefile.am b/script/Makefile.am
index 0ff5e62..a2fa93e 100644
--- a/script/Makefile.am
+++ b/script/Makefile.am
@@ -1,15 +1,16 @@
 MAINTAINERCLEANFILES    = Makefile.in
 
-EXTRA_DIST		= generic.in
+EXTRA_DIST		= sheepdog.in
 
-noinst_HEADERS		= bash_completion_dog checkarch.sh vditest gen_man.pl \
-			  gen_bash_completion.pl
+noinst_HEADERS		= checkarch.sh vditest gen_man.pl gen_bash_completion.pl
 
-target_INIT             = generic
+initscript_SCRIPTS	= sheepdog
+initscriptdir		= $(INITDDIR)
 
-target_BASH_COMPLETION  = bash_completion_dog
+completion_DATA		= dog
+completiondir		= $(sysconfdir)/bash_completion.d
 
-bash_completion_dog: $(top_srcdir)/dog/dog gen_bash_completion.pl Makefile
+dog: gen_bash_completion.pl Makefile
 	rm -f $@-t $@
 	$(top_srcdir)/script/gen_bash_completion.pl $(top_builddir)/dog/dog > $@-t
 	mv $@-t $@
@@ -25,18 +26,7 @@ bash_completion_dog: $(top_srcdir)/dog/dog gen_bash_completion.pl Makefile
 	chmod 0755 $@-t
 	mv $@-t $@
 
-all-local: $(target_INIT) $(target_BASH_COMPLETION)
+all-local: $(initscript_SCRIPTS) $(completion_DATA)
 
 clean-local:
-	rm -rf $(target_INIT)
-	rm -rf $(target_BASH_COMPLETION)
-
-install-exec-local:
-	$(INSTALL) -d $(DESTDIR)/$(INITDDIR)
-	$(INSTALL) -m 755 generic $(DESTDIR)/$(INITDDIR)/sheepdog
-	$(INSTALL) -d $(DESTDIR)/$(sysconfdir)/bash_completion.d
-	$(INSTALL) bash_completion_dog $(DESTDIR)/$(sysconfdir)/bash_completion.d/dog
-
-uninstall-local:
-	cd $(DESTDIR)/$(INITDDIR) && rm -f sheepdog
-	cd $(DESTDIR)/$(sysconfdir)/bash_completion.d && rm -f dog
+	rm -rf $(initscript_SCRIPTS) $(completion_DATA)
diff --git a/script/generic.in b/script/sheepdog.in
similarity index 100%
rename from script/generic.in
rename to script/sheepdog.in
-- 
1.8.1.3.566.gaa39828




More information about the sheepdog mailing list