+(defun Custom-make-one-dependency ()
+ "Extract custom dependencies from .el files in one dir, on the command line.
+Like `Custom-make-dependencies' but snarfs only one command-line argument,
+making it useful in a chain of batch commands in a single XEmacs invocation."
+ (let ((subdir (car command-line-args-left)))
+ (setq command-line-args-left (cdr command-line-args-left))
+ (Custom-make-dependencies-1 (list subdir))))
+
+;;;###autoload
+(defun Custom-make-dependencies (&optional subdirs)
+ "Extract custom dependencies from .el files in SUBDIRS.
+SUBDIRS is a list of directories. If it is nil, the command-line
+arguments are used. If it is a string, only that directory is
+processed. This function is especially useful in batch mode.
+
+Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS"
+ (interactive "DDirectory: ")
+ (and (stringp subdirs)
+ (setq subdirs (list subdirs)))
+ (or subdirs
+ ;; Usurp the command-line-args
+ (setq subdirs command-line-args-left
+ command-line-args-left nil))
+ (Custom-make-dependencies-1 subdirs))
+