guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[shepherd] 03/06: Move commands to (shepherd scripts xyz).


From: Ludovic Courtès
Subject: [shepherd] 03/06: Move commands to (shepherd scripts xyz).
Date: Wed, 27 Jan 2016 10:24:11 +0000

civodul pushed a commit to branch master
in repository shepherd.

commit 279d8939a13183e8e7b5985684fa8bf6dbc282a4
Author: Ludovic Courtès <address@hidden>
Date:   Wed Jan 27 10:37:48 2016 +0100

    Move commands to (shepherd scripts xyz).
    
    * Makefile.am (dist_shepherd_DATA): Remove {herd,halt,reboot}.scm.
    (scriptsdir, dist_scripts_DATA, nodist_scripts_DATA): New variables.
    (CLEANFILES): Add $(nodist_scripts_DATA).
    * modules/halt.scm, modules/herd.scm, modules/reboot.scm: Move to...
    * modules/scripts/{halt,herd,reboot}.scm: ... here.
    * halt.in, herd.in, reboot.in: Adjust accordingly.
---
 Makefile.am                               |   18 +++++++++++++-----
 halt.in                                   |    2 +-
 herd.in                                   |    2 +-
 modules/{ => shepherd/scripts}/halt.scm   |    2 +-
 modules/{ => shepherd/scripts}/herd.scm   |    2 +-
 modules/{ => shepherd/scripts}/reboot.scm |    2 +-
 reboot.in                                 |    2 +-
 7 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 6743904..ecd3cb9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
 # Makefile.am -- How to build and install the Shepherd.
-# Copyright (C) 2002, 2003 Wolfgang J�hrling <address@hidden>
+# Copyright © 2002, 2003 Wolfgang Jährling <address@hidden>
+# Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <address@hidden>
 #
 # This file is part of the GNU Shepherd.
 #
@@ -28,12 +29,10 @@ templates =                                 \
 BUILT_SOURCES = modules/shepherd/config.scm
 
 # The source files.
+# XXX: we can't use 'nobase_' because of the modules/ subdirectory.
 shepherddir = ${datadir}/shepherd
 dist_shepherd_DATA =                           \
-  modules/herd.scm                             \
-  modules/shepherd.scm                         \
-  modules/halt.scm                             \
-  modules/reboot.scm
+  modules/shepherd.scm
 nodist_shepherd_DATA = $(dist_shepherd_DATA:%.scm=%.go)
 
 shepherdsubdir = $(shepherddir)/shepherd
@@ -50,8 +49,17 @@ nodist_shepherdsub_DATA =                    \
   modules/shepherd/system.go                   \
   $(dist_shepherdsub_DATA:%.scm=%.go)
 
+scriptsdir = $(shepherdsubdir)/scripts
+dist_scripts_DATA =                            \
+  modules/shepherd/scripts/halt.scm            \
+  modules/shepherd/scripts/herd.scm            \
+  modules/shepherd/scripts/reboot.scm
+nodist_scripts_DATA =                          \
+  $(dist_scripts_DATA:%.scm=%.go)
+
 CLEANFILES =                                           \
   $(nodist_shepherd_DATA) $(nodist_shepherdsub_DATA)   \
+  $(nodist_scripts_DATA)                               \
   $(bin_SCRIPTS) $(sbin_SCRIPTS)
 
 # Documentation.
diff --git a/halt.in b/halt.in
index 2aaa3d3..93ac83c 100644
--- a/halt.in
+++ b/halt.in
@@ -4,4 +4,4 @@
 
 (set! %load-path (cons "%modsrcdir%" %load-path))
 (set! %load-compiled-path (cons "%modbuilddir%" %load-compiled-path))
-(apply (@ (halt) main) (cdr (command-line)))
+(apply (@ (shepherd scripts halt) main) (cdr (command-line)))
diff --git a/herd.in b/herd.in
index bbf25e7..d190390 100644
--- a/herd.in
+++ b/herd.in
@@ -4,4 +4,4 @@
 
 (set! %load-path (cons "%modsrcdir%" %load-path))
 (set! %load-compiled-path (cons "%modbuilddir%" %load-compiled-path))
-(apply (@ (herd) main) (cdr (command-line)))
+(apply (@ (shepherd scripts herd) main) (cdr (command-line)))
diff --git a/modules/halt.scm b/modules/shepherd/scripts/halt.scm
similarity index 98%
rename from modules/halt.scm
rename to modules/shepherd/scripts/halt.scm
index 86603d4..836a312 100644
--- a/modules/halt.scm
+++ b/modules/shepherd/scripts/halt.scm
@@ -16,7 +16,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with the GNU Shepherd.  If not, see <http://www.gnu.org/licenses/>.
 
-(define-module (halt)
+(define-module (shepherd scripts halt)
   #:use-module (shepherd support)
   #:use-module (shepherd args)
   #:use-module (shepherd comm)
diff --git a/modules/herd.scm b/modules/shepherd/scripts/herd.scm
similarity index 99%
rename from modules/herd.scm
rename to modules/shepherd/scripts/herd.scm
index 5af708a..55265ca 100644
--- a/modules/herd.scm
+++ b/modules/shepherd/scripts/herd.scm
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with the GNU Shepherd.  If not, see <http://www.gnu.org/licenses/>.
 
-(define-module (herd)
+(define-module (shepherd scripts herd)
   #:use-module (shepherd config)
   #:use-module (shepherd support)
   #:use-module (shepherd args)
diff --git a/modules/reboot.scm b/modules/shepherd/scripts/reboot.scm
similarity index 98%
rename from modules/reboot.scm
rename to modules/shepherd/scripts/reboot.scm
index 54cb4ed..e151cbb 100644
--- a/modules/reboot.scm
+++ b/modules/shepherd/scripts/reboot.scm
@@ -16,7 +16,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with the GNU Shepherd.  If not, see <http://www.gnu.org/licenses/>.
 
-(define-module (reboot)
+(define-module (shepherd scripts reboot)
   #:use-module (shepherd support)
   #:use-module (shepherd args)
   #:use-module (shepherd comm)
diff --git a/reboot.in b/reboot.in
index 1c15e5c..254b095 100644
--- a/reboot.in
+++ b/reboot.in
@@ -4,4 +4,4 @@
 
 (set! %load-path (cons "%modsrcdir%" %load-path))
 (set! %load-compiled-path (cons "%modbuilddir%" %load-compiled-path))
-(apply (@ (reboot) main) (cdr (command-line)))
+(apply (@ (shepherd scripts reboot) main) (cdr (command-line)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]