base: Rename (mcron core) module to (mcron base).
The 'configure' script deletes the 'core.*' files. Having a file named 'base.scm' instead of 'core.scm' simplifies the build process without changing the semantics. * src/mcron/mcron-core.scm: Rename to ... * src/mcron/base.scm: ... this. All module users changed. * Makefile.am (MODULES): Add 'src/mcron/base.scm'. (CP): Remove variable. (src/mcron/core.scm): Remove target. (GEN_MODULES): Remove 'src/mcron/core.scm'. (dist_mcronmodule_DATA): Remove 'src/mcron/mcron-core.scm' * doc/mcron.texi: Adapt to name change. * .gitignore: Update.
This commit is contained in:
		
					parent
					
						
							
								52364699ed
							
						
					
				
			
			
				commit
				
					
						418b81e1af
					
				
			
		
					 7 changed files with 23 additions and 29 deletions
				
			
		
							
								
								
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -31,7 +31,6 @@ config.log
 | 
				
			||||||
config.scm
 | 
					config.scm
 | 
				
			||||||
config.status
 | 
					config.status
 | 
				
			||||||
configure
 | 
					configure
 | 
				
			||||||
core.scm
 | 
					 | 
				
			||||||
depcomp
 | 
					depcomp
 | 
				
			||||||
install-sh
 | 
					install-sh
 | 
				
			||||||
missing
 | 
					missing
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										12
									
								
								Makefile.am
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								Makefile.am
									
										
									
									
									
								
							| 
						 | 
					@ -23,6 +23,7 @@ mcron_DEPENDENCIES = $(GOBJECTS) # Build Guile modules before linking.
 | 
				
			||||||
mcron_LDADD = @GUILE_LIBS@
 | 
					mcron_LDADD = @GUILE_LIBS@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MODULES =				\
 | 
					MODULES =				\
 | 
				
			||||||
 | 
					  src/mcron/base.scm			\
 | 
				
			||||||
  src/mcron/environment.scm		\
 | 
					  src/mcron/environment.scm		\
 | 
				
			||||||
  src/mcron/job-specifier.scm		\
 | 
					  src/mcron/job-specifier.scm		\
 | 
				
			||||||
  src/mcron/main.scm			\
 | 
					  src/mcron/main.scm			\
 | 
				
			||||||
| 
						 | 
					@ -31,13 +32,7 @@ MODULES =				\
 | 
				
			||||||
  src/mcron/vixie-time.scm
 | 
					  src/mcron/vixie-time.scm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GEN_MODULES =				\
 | 
					GEN_MODULES =				\
 | 
				
			||||||
  src/mcron/config.scm			\
 | 
					  src/mcron/config.scm
 | 
				
			||||||
  src/mcron/core.scm
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CP = @CP@
 | 
					 | 
				
			||||||
# XXX: Prevent the 'configure' script to delete the 'core.*' files.
 | 
					 | 
				
			||||||
src/mcron/core.scm: src/mcron/mcron-core.scm
 | 
					 | 
				
			||||||
	$(CP) $< $@
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
GOBJECTS =				\
 | 
					GOBJECTS =				\
 | 
				
			||||||
  $(GEN_MODULES:%.scm=%.go)		\
 | 
					  $(GEN_MODULES:%.scm=%.go)		\
 | 
				
			||||||
| 
						 | 
					@ -49,8 +44,7 @@ mcronmodule_DATA =			\
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dist_mcronmodule_DATA = 		\
 | 
					dist_mcronmodule_DATA = 		\
 | 
				
			||||||
  $(MODULES)				\
 | 
					  $(MODULES)				\
 | 
				
			||||||
  src/mcron/crontab.scm			\
 | 
					  src/mcron/crontab.scm
 | 
				
			||||||
  src/mcron/mcron-core.scm
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling.  Otherwise, if
 | 
					# Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling.  Otherwise, if
 | 
				
			||||||
# $GUILE_LOAD_COMPILED_PATH contains $(mcronmoduledir), we may find .go files
 | 
					# $GUILE_LOAD_COMPILED_PATH contains $(mcronmoduledir), we may find .go files
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -104,7 +104,7 @@ Detailed invoking
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Guile modules
 | 
					Guile modules
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* The core module::             The job list and execution loop.
 | 
					* The base module::             The job list and execution loop.
 | 
				
			||||||
* The redirect module::         Sending output of jobs to a mail box.
 | 
					* The redirect module::         Sending output of jobs to a mail box.
 | 
				
			||||||
* The vixie-time module::       Parsing vixie-style time specifications.
 | 
					* The vixie-time module::       Parsing vixie-style time specifications.
 | 
				
			||||||
* The job-specifier module::    All commands for scheme configuration files.
 | 
					* The job-specifier module::    All commands for scheme configuration files.
 | 
				
			||||||
| 
						 | 
					@ -327,7 +327,7 @@ taken to be program code made up of the functions @code{(next-second
 | 
				
			||||||
. args)}, @code{(next-minute...)}, etc, where the optional arguments
 | 
					. args)}, @code{(next-minute...)}, etc, where the optional arguments
 | 
				
			||||||
can be supplied with the @code{(range)} function above (these
 | 
					can be supplied with the @code{(range)} function above (these
 | 
				
			||||||
functions are analogous to the ones above except that they implicitly
 | 
					functions are analogous to the ones above except that they implicitly
 | 
				
			||||||
assume the current time; it is supplied by the mcron core when the
 | 
					assume the current time; it is supplied by the mcron base when the
 | 
				
			||||||
list is eval'd).
 | 
					list is eval'd).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@cindex time specification
 | 
					@cindex time specification
 | 
				
			||||||
| 
						 | 
					@ -1150,26 +1150,26 @@ non-absolute time specified on the Gregorian calendar (the first day
 | 
				
			||||||
of next week, for example).  Finally, it may be the wish of the user to
 | 
					of next week, for example).  Finally, it may be the wish of the user to
 | 
				
			||||||
provide a program with the functionality of mcron plus a bit extra.
 | 
					provide a program with the functionality of mcron plus a bit extra.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The core module maintains mcron's internal job lists, and provides the
 | 
					The base module maintains mcron's internal job lists, and provides the
 | 
				
			||||||
main wait-run-wait loop that is mcron's main function.  It also
 | 
					main wait-run-wait loop that is mcron's main function.  It also
 | 
				
			||||||
introduces the facilities for accumulating a set of environment
 | 
					introduces the facilities for accumulating a set of environment
 | 
				
			||||||
modifiers, which take effect when jobs run.
 | 
					modifiers, which take effect when jobs run.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@menu
 | 
					@menu
 | 
				
			||||||
* The core module::             The job list and execution loop.
 | 
					* The base module::             The job list and execution loop.
 | 
				
			||||||
* The redirect module::         Sending output of jobs to a mail box.
 | 
					* The redirect module::         Sending output of jobs to a mail box.
 | 
				
			||||||
* The vixie-time module::       Parsing vixie-style time specifications.
 | 
					* The vixie-time module::       Parsing vixie-style time specifications.
 | 
				
			||||||
* The job-specifier module::    All commands for scheme configuration files.
 | 
					* The job-specifier module::    All commands for scheme configuration files.
 | 
				
			||||||
* The vixie-specification module::  Commands for reading vixie-style crontabs.
 | 
					* The vixie-specification module::  Commands for reading vixie-style crontabs.
 | 
				
			||||||
@end menu
 | 
					@end menu
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@node The core module, The redirect module, Guile modules, Guile modules
 | 
					@node The base module, The redirect module, Guile modules, Guile modules
 | 
				
			||||||
@section The core module
 | 
					@section The base module
 | 
				
			||||||
@cindex guile module
 | 
					@cindex guile module
 | 
				
			||||||
@cindex core module
 | 
					@cindex base module
 | 
				
			||||||
@cindex modules, core
 | 
					@cindex modules, base
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This module may be used by including @code{(use-modules (mcron core))}
 | 
					This module may be used by including @code{(use-modules (mcron base))}
 | 
				
			||||||
in a program.  The main functions are @code{add-job} and
 | 
					in a program.  The main functions are @code{add-job} and
 | 
				
			||||||
@code{run-job-loop}, which allow a program to create a list of job
 | 
					@code{run-job-loop}, which allow a program to create a list of job
 | 
				
			||||||
specifications to run, and then to initiate the wait-run-wait loop
 | 
					specifications to run, and then to initiate the wait-run-wait loop
 | 
				
			||||||
| 
						 | 
					@ -1221,7 +1221,7 @@ becoming available for reading on one of the file descriptors in the
 | 
				
			||||||
fd-list, if supplied.  Only in this case will the procedure return to
 | 
					fd-list, if supplied.  Only in this case will the procedure return to
 | 
				
			||||||
the calling program, which may then make modifications to the job list
 | 
					the calling program, which may then make modifications to the job list
 | 
				
			||||||
before calling the @code{run-job-loop} procedure again to resume execution of
 | 
					before calling the @code{run-job-loop} procedure again to resume execution of
 | 
				
			||||||
the mcron core.
 | 
					the mcron base.
 | 
				
			||||||
@end deffn
 | 
					@end deffn
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@deffn{Scheme procedure} remove-user-jobs user
 | 
					@deffn{Scheme procedure} remove-user-jobs user
 | 
				
			||||||
| 
						 | 
					@ -1242,7 +1242,7 @@ last job that was reported in the schedule report.  The report itself
 | 
				
			||||||
is returned to the calling program as a string.
 | 
					is returned to the calling program as a string.
 | 
				
			||||||
@end deffn
 | 
					@end deffn
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@node The redirect module, The vixie-time module, The core module, Guile modules
 | 
					@node The redirect module, The vixie-time module, The base module, Guile modules
 | 
				
			||||||
@section The redirect module
 | 
					@section The redirect module
 | 
				
			||||||
@cindex redirect module
 | 
					@cindex redirect module
 | 
				
			||||||
@cindex modules, redirect
 | 
					@cindex modules, redirect
 | 
				
			||||||
| 
						 | 
					@ -1263,7 +1263,7 @@ vixie-time))}.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This module provides a single method for converting a vixie-style time
 | 
					This module provides a single method for converting a vixie-style time
 | 
				
			||||||
specification into a procedure which can be used as the
 | 
					specification into a procedure which can be used as the
 | 
				
			||||||
@code{next-time-function} to the core @code{add-job} procedure, or to
 | 
					@code{next-time-function} to the base @code{add-job} procedure, or to
 | 
				
			||||||
the @code{job-specifier} @code{job} procedure.  See @ref{Vixie Syntax}
 | 
					the @code{job-specifier} @code{job} procedure.  See @ref{Vixie Syntax}
 | 
				
			||||||
for full details of the allowed format for the time string.
 | 
					for full details of the allowed format for the time string.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,7 +18,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define-module (mcron core)
 | 
					(define-module (mcron base)
 | 
				
			||||||
  #:use-module (mcron environment)
 | 
					  #:use-module (mcron environment)
 | 
				
			||||||
  #:use-module (srfi srfi-9)
 | 
					  #:use-module (srfi srfi-9)
 | 
				
			||||||
  #:export     (add-job
 | 
					  #:export     (add-job
 | 
				
			||||||
| 
						 | 
					@ -20,12 +20,13 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; This module defines all the functions that can be used by scheme mcron
 | 
					;; This module defines all the functions that can be used by scheme mcron
 | 
				
			||||||
;; configuration files, namely the procedures for working out next times, the
 | 
					;; configuration files, namely the procedures for working out next times, the
 | 
				
			||||||
;; job procedure for registering new jobs (actually a wrapper around the core
 | 
					;; job procedure for registering new jobs (actually a wrapper around the
 | 
				
			||||||
;; add-job function), and the procedure for declaring environment modifications.
 | 
					;; base add-job function), and the procedure for declaring environment
 | 
				
			||||||
 | 
					;; modifications.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define-module (mcron job-specifier)
 | 
					(define-module (mcron job-specifier)
 | 
				
			||||||
  #:use-module (ice-9 match)
 | 
					  #:use-module (ice-9 match)
 | 
				
			||||||
  #:use-module (mcron core)
 | 
					  #:use-module (mcron base)
 | 
				
			||||||
  #:use-module (mcron environment)
 | 
					  #:use-module (mcron environment)
 | 
				
			||||||
  #:use-module (mcron vixie-time)
 | 
					  #:use-module (mcron vixie-time)
 | 
				
			||||||
  #:use-module (srfi srfi-1)
 | 
					  #:use-module (srfi srfi-1)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,7 +25,7 @@
 | 
				
			||||||
  #:use-module (ice-9 rdelim)
 | 
					  #:use-module (ice-9 rdelim)
 | 
				
			||||||
  #:use-module (ice-9 regex)
 | 
					  #:use-module (ice-9 regex)
 | 
				
			||||||
  #:use-module (mcron config)
 | 
					  #:use-module (mcron config)
 | 
				
			||||||
  #:use-module (mcron core)
 | 
					  #:use-module (mcron base)
 | 
				
			||||||
  #:use-module (mcron job-specifier)
 | 
					  #:use-module (mcron job-specifier)
 | 
				
			||||||
  #:use-module (mcron vixie-specification)
 | 
					  #:use-module (mcron vixie-specification)
 | 
				
			||||||
  #:use-module (srfi srfi-2)
 | 
					  #:use-module (srfi srfi-2)
 | 
				
			||||||
| 
						 | 
					@ -389,7 +389,7 @@ option.\n")
 | 
				
			||||||
        (lambda () (display (getpid)) (newline)))))
 | 
					        (lambda () (display (getpid)) (newline)))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ;; Now the main loop. Forever execute the run-job-loop procedure in the
 | 
					  ;; Now the main loop. Forever execute the run-job-loop procedure in the
 | 
				
			||||||
  ;; mcron core, and when it drops out (can only be because a message has come
 | 
					  ;; mcron base, and when it drops out (can only be because a message has come
 | 
				
			||||||
  ;; in on the socket) we process the socket request before restarting the
 | 
					  ;; in on the socket) we process the socket request before restarting the
 | 
				
			||||||
  ;; loop again.  Sergey Poznyakoff: we can also drop out of run-job-loop
 | 
					  ;; loop again.  Sergey Poznyakoff: we can also drop out of run-job-loop
 | 
				
			||||||
  ;; because of a SIGCHLD, so must test FDES-LIST.
 | 
					  ;; because of a SIGCHLD, so must test FDES-LIST.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +30,7 @@
 | 
				
			||||||
            read-vixie-file
 | 
					            read-vixie-file
 | 
				
			||||||
            check-system-crontab)
 | 
					            check-system-crontab)
 | 
				
			||||||
  #:use-module ((mcron config) :select (config-socket-file))
 | 
					  #:use-module ((mcron config) :select (config-socket-file))
 | 
				
			||||||
  #:use-module (mcron core)
 | 
					  #:use-module (mcron base)
 | 
				
			||||||
  #:use-module (mcron job-specifier)
 | 
					  #:use-module (mcron job-specifier)
 | 
				
			||||||
  #:use-module (mcron redirect)
 | 
					  #:use-module (mcron redirect)
 | 
				
			||||||
  #:use-module (mcron vixie-time))
 | 
					  #:use-module (mcron vixie-time))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue