Browse files

13194: change in module configuration system

  • Loading branch information...
1 parent ad5f958 commit 49a1ad7516f84672dcea24bc6178f87f92789c7c Peter Stephenson committed Nov 26, 2000
@@ -1,3 +1,20 @@
+2000-11-26 Peter Stephenson <>
+ * 13194: INSTALL,, Config/,
+ Etc/zsh-development-guide, Src/.distfiles, Src/,
+ Src/, Src/, Src/,
+ Src/zsh.mdd, Src/Builtins/rlimits.mdd, Src/Builtins/sched.mdd,
+ Src/Modules/cap.mdd, Src/Modules/clone.mdd,
+ Src/Modules/example.mdd, Src/Modules/files.mdd,
+ Src/Modules/mapfile.mdd, Src/Modules/mathfunc.mdd,
+ Src/Modules/parameter.mdd, Src/Modules/stat.mdd,
+ Src/Modules/zftp.mdd, Src/Modules/zprof.mdd, Src/Modules/zpty.mdd,
+ Src/Modules/zutil.mdd, Src/Zle/compctl.mdd, Src/Zle/complete.mdd,
+ Src/Zle/complist.mdd, Src/Zle/computil.mdd, Src/Zle/deltochar.mdd,
+ Src/Zle/zle.mdd, Src/Zle/zleparameter.mdd: New module
+ configuration system using file config.modules set up by
+ configure.
2000-11-25 Bart Schaefer <>
* 13192: Completion/Core/compinit, Src/params.c: Turn off
@@ -63,9 +63,6 @@ DLLD = @DLLD@
-# choose modules not to compile and install
# utilities
@@ -7,7 +7,7 @@ This development takes place by mailing list. Check the META-FAQ for the
various zsh mailing lists and how to subscribe to them. The development
is very open and anyone is welcomed and encouraged to join and contribute.
Because zsh is a very large package whose development can sometimes
-be very rapid, I kindly ask that people observe a few guidelines when
+be very rapid, we kindly ask that people observe a few guidelines when
contributing patches and feedback to the mailing list. These guidelines
are very simple and hopefully should make for a more orderly development
of zsh.
@@ -181,6 +181,17 @@ sourced when zsh is built. To describe the module it can/should set the
following shell variables:
- name name of the module
+ - link `static', `dynamic' or `no', as described in INSTALL.
+ May also be a command string, which will be run within
+ configure and whose output is used to set the value
+ of `link' in config.modules. This allows a
+ system-specific choice of modules. For example,
+ link='case $host in *-hpux*) echo dynamic; ;;
+ *) echo no; ;; esac'
+ - load `yes' or `no': whether the shell should include hooks
+ for loading the module automatically as necessary.
+ (This corresponds to an `L' in xmods.conf in the
+ old mechanism.)
- moddeps modules on which this module depends (default none)
- nozshdep non-empty indicates no dependence on the `zsh/main'
@@ -66,53 +66,44 @@ The zsh distribution contains several modules, in the Src/Builtins,
Src/Modules and Src/Zle directories. If you have any additional zsh
modules that you wish to compile for this version of zsh, create another
subdirectory of the Src directory and put them there. You can create
-as many extra subdirectory hierarchies as you need. The subdirectories
-must be actual directories; symbolic links will not work.
-If you wish to add or remove modules or module directories after you
-have already run make, then after adding or removing the modules run:
- make prep
-You can also instruct the configuration process that a certain module
-should neither be compiled nor installed without modifying any files. To
-do this, give the argument `--enable-omit-modules=mod1,mod2,...' to
-configure. The module arguments are the full names of the modules,
-probably including the prefix `zsh/'. For example,
-`configure --enable-omit-modules=zsh/zpty,zsh/example' says that the
-modules zsh/zpty and zsh/example are not to be compiled nor installed.
-Note that it is up to you to make sure the modules in question are not going
-to be compiled into the main zsh binary, as described in the next section.
-It is unlikely you would want to omit any of the modules liable to be
-compiled in by default.
-Controlling what is compiled into the main zsh binary
+as many extra subdirectories as you need, but currently configure will only
+search in immediate subdirectories of Src. The subdirectories must be
+actual directories; symbolic links will not work. You will then need to
+rerun configure; the easiest way is to run `config.status --recheck' from
+the top-level build directory which retains the existing configuration as
+much as possible.
+The key to the module system is the file config.modules, created in the
+configuration process. Each module has a line in the file. It may be
+edited to change the following values for each module; be careful to retain
+the (strict) format for the file:
+link - `dynamic', if the module is to be dynamically linked -- meaningless
+ if this is not available on your system.
+ `static' if the module is to be linked directly into the executable.
+ `no' if the module is not to be linked at all. In this case it will
+ not even be compiled.
+load - `yes' if the module is to be visible to the user. This will make
+ builtins, parameters etc. visible to the user without any need
+ to use the zmodload builtin.
+ `no' if an explicit zmodload command is to be required to load the
+ utilities in the module. Note that this applies both to
+ statically and dynamically linked modules.
+auto - `yes' if the entry is to be regenerated whenever configure is run.
+ `no' if you wish to retain your hand-edited version.
+Do not edit the entry for the pseudo-module zsh/main, which is the main
+shell. After you have edited this file, run `make prep' in the Src
By default the complete, compctl, zle, computil, complist, sched, parameter,
zleparameter and rlimits modules are compiled into non-dynamic zsh and no
modules are compiled into the main binary if dynamic loading is available.
-This can be overridden by creating the file mymods.conf in the compilation
-directory (Src, unless you have told configure to use another directory)
-with the list of modules which are to be compiled into the main binary, one
-module name per line with no punctuation and no suffix. See the zshmodules
-manual page for the list of available modules.
-Note that mymods.conf replaces the standard list of linked-in modules from
-Src/xmods.conf. If you wish to add to the standard list, copy the lines
-that begin with "L " from xmods.conf into mymods.conf and remove the "L "
-from each such line in mymods.conf. Then add the names of other modules
-that you want to link. Module names typically must begin with "zsh/";
-see the ".mdd" file for the module for the actual name. The modules must
-be listed in dependency order, e.g., "zsh/zle" must precede "zsh/complete",
-"zsh/complete" must precede "zsh/compctl", and similarly for any other
Note that the modules depending on zle or complete (e.g.: complist and
deltochar) cannot be loaded dynamically on systems which do not allow symbols
in one dynamically loaded library to be visible from another; this is true,
for example, of version 4 of SunOS. The most convenient workaround is to
-compile zle and complete into the base executable by including them in
-mymods.conf as described above.
+compile zle and complete into the base executable by setting their `link'
+entries in config.modules to `static' as described above.
Compiler Options or Using a Different Compiler
@@ -5,9 +5,9 @@ DISTFILES_SRC='
ansi2knr.c modentry.c
builtin.c compat.c cond.c exec.c glob.c hashtable.c hashtable.h
hist.c init.c input.c jobs.c lex.c linklist.c loop.c main.c makepro.awk
- math.c mem.c
+ math.c mem.c
module.c options.c params.c parse.c pattern.c prompt.c prototypes.h
signals.c signals.h string.c subst.c system.h text.c utils.c
- watch.c xmods.conf zsh.h zsh.mdd ztype.h
+ watch.c zsh.h zsh.mdd ztype.h
zsh.rc zsh.ico
@@ -1,4 +1,6 @@
autobins="limit ulimit unlimit"
@@ -1,3 +1,7 @@
@@ -109,17 +109,7 @@ rm-modobjs-tmp:
-Makemod modules.index prep: modules-bltin $(CONFIG_INCS)
- ( cd $(sdir_top) && OMIT_MODULES="$(OMIT_MODULES)" \
- $(SHELL) $(subdir)/ $(subdir) ) \
- > modules.index.tmp
- @if cmp -s modules.index.tmp modules.index; then \
- rm -f modules.index.tmp; \
- echo "\`modules.index' is up to date."; \
- else \
- mv -f modules.index.tmp modules.index; \
- echo "Updated \`modules.index'."; \
- fi
+Makemod prep: $(CONFIG_INCS) $(dir_top)/config.modules
@case $(sdir_top) in \
/*) top_srcdir=$(sdir_top) ;; \
*) top_srcdir=$(subdir)/$(sdir_top) ;; \
@@ -140,21 +130,6 @@ FORCE:
@echo Linking with the standard modules.
-modules-bltin:: mymods.conf
- @if test -f mymods.conf; then \
- echo cat mymods.conf \> $@; \
- cat mymods.conf > $@; \
- fi
-modules-bltin:: $(dir_top)/config.status $(sdir)/xmods.conf
- if test -f mymods.conf; then \
- cat mymods.conf > $@; \
- elif test @D@ = N; then \
- sed -n '/L.* /{s/^.* //;p;}' < $(sdir)/xmods.conf > $@; \
- else \
- echo > $@; \
- fi
modules: $(@E@NTRYOBJ)
@@ -228,14 +203,13 @@ mostlyclean-here:
.PHONY: mostlyclean-here
- rm -f modules.index.tmp modules.stamp zsh$(EXEEXT) ansi2knr.o ansi2knr
+ rm -f modules.stamp zsh$(EXEEXT) ansi2knr.o ansi2knr
rm -f libzsh-*.$(DL_EXT)
.PHONY: clean-here
rm -f TAGS tags
- rm -f modules.index modules-bltin
- rm -f Makefile mymods.conf
+ rm -f Makefile
.PHONY: distclean-here
mostlyclean: mostlyclean-modules
@@ -245,7 +219,7 @@ realclean: realclean-modules
.PHONY: mostlyclean clean distclean realclean
# Don't remake Makemod just to delete things, even if it doesn't exist.
-mostlyclean-modules clean-modules distclean-modules realclean-modules: modules.index
+mostlyclean-modules clean-modules distclean-modules realclean-modules:
if test -f Makemod; then \
$(MAKE) -f Makemod $(MAKEDEFS) `echo $@ | sed 's/-modules//'`; \
fi; \
@@ -177,7 +177,8 @@ $(makefile): $(makefile).in $(dir_top)/config.status
cd $(dir_top) && \
$(SHELL) $$top_srcdir/Src/ -m $(subdir) $(makefile)
-$(makefile).in: $(sdir_src)/ $(sdir_src)/ $(MDDS) $(dir_src)/modules-bltin
+$(makefile).in: $(sdir_src)/ $(sdir_src)/ $(MDDS) \
+ $(dir_top)/config.modules
@case $(sdir_top) in \
/*) top_srcdir=$(sdir_top) ;; \
*) top_srcdir=$(subdir)/$(sdir_top) ;; \
@@ -188,5 +189,3 @@ $(makefile).in: $(sdir_src)/ $(sdir_src)/ $(MDDS) $(dir
cd $(dir_top) && \
$(SHELL) $$top_srcdir/Src/ -i $(subdir) $(makefile)
- @cd $(dir_src) && $(MAKE) $(MAKEDEFS) modules-bltin
@@ -1,3 +1,7 @@
autobins="cap getcap setcap"
@@ -1,3 +1,7 @@
@@ -1,3 +1,12 @@
+autoparams="exint exstr exarr"
+automathfuncs="sum length"
@@ -1,3 +1,7 @@
-autobins="ln mkdir mv rm rmdir sync"
+autobins="chgrp chown ln mkdir mv rm rmdir sync"
@@ -1,3 +1,7 @@
@@ -1,3 +1,7 @@
@@ -1,3 +1,7 @@
-autoparams="parameters commands functions options"
+autoparams="parameters commands functions dis_functions funcstack builtins dis_builtins reswords dis_reswords options modules dirstack history historywords jobtexts jobdirs jobstates nameddirs userdirs aliases dis_aliases galiases dis_galiases"
@@ -1,3 +1,7 @@
@@ -1,3 +1,7 @@
@@ -1,3 +1,7 @@
@@ -1,4 +1,6 @@
@@ -1,3 +1,9 @@
-autobins="zformat zstyle"
+autobins="zformat zstyle zregexparse zparseopts"
@@ -1,4 +1,6 @@
moddeps="zsh/complete zsh/zle"
@@ -1,4 +1,6 @@
@@ -1,3 +1,7 @@
-moddeps="comp1 zle"
+moddeps="zsh/complete zsh/zle"
@@ -1,4 +1,6 @@
moddeps="zsh/complete zsh/zle"
@@ -1,3 +1,7 @@
Oops, something went wrong.

0 comments on commit 49a1ad7

Please sign in to comment.