pax_global_header00006660000000000000000000000064121007740740014514gustar00rootroot0000000000000052 comment=9ca9ca434cd4dabbf6952cb3c0229e8dd6512437 modules-3.2.10/000077500000000000000000000000001210077407400132475ustar00rootroot00000000000000modules-3.2.10/.spec.in000066400000000000000000000043261210077407400146140ustar00rootroot00000000000000Name: modules Version: @VERSION@ Release: 1 Summary: Environment Modules Distribution: Berkeley Laboratory Distribution Vendor: Lawrence Berkeley National Laboratory Packager: Eric Roman (modified by R.K.Owen Group: Utilities/Shell Copyright: GPL Source: ftp://modules.sourceforge.net/pub/modules/modules-@VERSION@.tar.gz %description The Modules package provides for the dynamic modification of a user's environment via modulefiles. Each modulefile contains the information needed to configure the shell for an application. Once the Modules package is initialized, the environment can be modified dynamically on a per-module basis using the module command which interprets modulefiles. Typically modulefiles instruct the module command to alter or set shell environment variables such as PATH, MANPATH, etc. modulefiles may be shared by many users on a system and users may have their own collection to supplement or replace the shared modulefiles. The modules environment is common on SGI/Crays and many workstation farms. # prep section. Tell RPM how to untar. %prep %setup -n modules-@VERSION@ %patch # build section. Tell RPM how to run make %buildroot /usr/local/Modules/test %build ./configure \ --prefix=/usr \ --with-version-path=/usr/local/Modules/versions \ --with-module-path=/usr/local/Modules/modulefiles \ --with-etc-path=/etc \ --with-skel-path=/etc/skel \ --x-include=/usr/include/X11 \ --x-libraries=/usr/X11R6/lib --with-tcl-include=/usr/include \ --with-tcl-libraries=/usr/lib make %install make install %clean rm -rf /usr/local/Modules/@VERSION@ %files # Tell RPM where to find the files that just spewed all over the disk... /usr/bin/modulecmd /etc/Modules/init/bash /etc/Modules/init/csh /etc/Modules/init/perl /etc/Modules/init/sh /etc/Modules/init/tcsh /etc/Modules/init/zsh /etc/Modules/init/ksh /etc/Modules/init/.modulespath /usr/man/man1/module.1 /usr/man/man4/modulefile.4 /etc/Modules/modulefiles/modules /etc/Modules/modulefiles/module-info /etc/Modules/modulefiles/module-cvs /etc/Modules/modulefiles/null /etc/Modules/modulefiles/use.own /etc/Modules/modulefiles/dot modules-3.2.10/ChangeLog000066400000000000000000002477421210077407400150410ustar00rootroot00000000000000Do Not Edit! This is a generated file. You should edit the NEWS file instead. 2012-12-19 R.K. Owen * .gitignore, ChangeLog, Makefile.am, NEWS, cvs2cl.pl, gitlog2changelog.py: Added a python script by Marcus D. Hanwell to automatically generate the ChangeLog. Also no reason to manage ChangeLog under code management. 2012-12-18 R.K. Owen * tcl/Makefile, tcl/README-EMACS.txt, tcl/README.txt, tcl/init/.gitignore, tcl/init/Makefile, tcl/init/README.txt, tcl/init/bash.in, tcl/init/csh.in, tcl/init/ksh.in, tcl/init/lisp.in, tcl/init/modulerc, tcl/init/perl.in, tcl/init/python.in, tcl/init/sh.in, tcl/init/tcsh.in, tcl/init/zsh.debug, tcl/init/zsh.in, tcl/modulecmd.tcl: Removed the Tcl-only version from the branch. Now that it's been forked to its own project. * .gitignore, NEWS, configure.ac, modulefiles/.gitignore, modulefiles/Makefile.am, modulefiles/module-cvs.in, modulefiles/module-git.in: Changed the packaged modulefile for getting the sources from git for the specific branch. 2012-12-17 R.K. Owen * NEWS, testsuite/modulefiles/load/.version, testsuite/modulefiles/load/00, testsuite/modulefiles/load/10, testsuite/modulefiles/load/11, testsuite/modulefiles/load/12, testsuite/modulefiles/load/13, testsuite/modulefiles/load/14, testsuite/modulefiles/load/15, testsuite/modulefiles/load/16, testsuite/modulefiles/load/17, testsuite/modulefiles/load/18, testsuite/modulefiles/load/19, testsuite/modulefiles/load/20, testsuite/modulefiles/load/21, testsuite/modulefiles/load/22, testsuite/modulefiles/load/23, testsuite/modulefiles/load/24, testsuite/modulefiles/load/25, testsuite/modulefiles/load/26, testsuite/modulefiles/load/27, testsuite/modulefiles/load/28, testsuite/modulefiles/load/29, testsuite/modulefiles/load/30, testsuite/modulefiles/load/all, testsuite/modules.50-cmds/197-load-lots.exp: * Tested loading 20 other modulefiles from a single one 2012-12-13 R.K. Owen * .gitignore, NEWS, config/tcl.m4: * Search /usr/lib64 for tclConfig.sh also (Jan Synacek) 2012-12-06 R.K. Owen * NEWS, cmdInfo.c, doc/modulefile.4.in, testsuite/modulefiles/info/type, testsuite/modules.50-cmds/089-info-type.exp: * Forked the Tcl-only version to be maintained by Kent Mein. * Added the "module-info type" query to return 'C' to indicate that the modulecmd executable is the "C" version. (The Tcl-only version will return 'Tcl'.) 2012-11-19 R.K. Owen * LICENSE.GPL, NEWS: * Updated the FSF address in LICENSE.GPL (Jan Synacek) 2012-11-12 R.K. Owen * ModuleCmd_Init.c, NEWS, cmdPath.c, cmdXResource.c, utility.c: * Fixed the segfault problem with Tcl_RegExpCompile() (Kenneth Hoste, Tyson Whitehead) 2012-11-08 R.K. Owen * ModuleCmd_Avail.c, NEWS, configure.ac, doc/module.1.in, doc/modulefile.4.in: * Use the locale for sorting modulefiles by the avail command 2012-11-05 R.K. Owen * ModuleCmd_Update.c, NEWS: * Increased the "update" buffer (Leon Kos) 2012-11-01 R.K. Owen * .gitattributes, etc/add.modules.in, ext/add.ext.in, init/.modulespath.in: More $Id$ * Makefile.am, ModuleCmd_Avail.c, ModuleCmd_Clear.c, ModuleCmd_Display.c, ModuleCmd_Help.c, ModuleCmd_Init.c, ModuleCmd_List.c, ModuleCmd_Load.c, ModuleCmd_Purge.c, ModuleCmd_Refresh.c, ModuleCmd_Switch.c, ModuleCmd_Update.c, ModuleCmd_Use.c, ModuleCmd_Whatis.c, cmdAlias.c, cmdConflict.c, cmdInfo.c, cmdIsLoaded.c, cmdLog.c, cmdMisc.c, cmdModule.c, cmdPath.c, cmdSetenv.c, cmdTrace.c, cmdUlvl.c, cmdUname.c, cmdVerbose.c, cmdVersion.c, cmdWhatis.c, cmdXResource.c, configure.ac, error.c, etc/Makefile.am, ext/Makefile.am, getopt.c, init.c, init/Makefile.am, locate_module.c, main.c, modulefiles/Makefile.am, utility.c: Trying the git version of $Id$ * NEWS, init/perl.pm.in, modules_def.h, testsuite/modules.50-cmds/121-prereq-module.exp, utility.c: * If a bash shell check if interactive or not for alias/functions * Fix the flags with regards to recursive load/unload * Fix perl.pm init file typo (bug 3497092) 2012-10-29 R.K. Owen * .gitignore, NEWS, cmdPath.c, testsuite/modulefiles/append/1.1, testsuite/modulefiles/prepend/1.1, testsuite/modules.50-cmds/172-seap-app-delim.exp, testsuite/modules.50-cmds/172-swap-app-delim.exp, testsuite/modules.50-cmds/173-swap-app-delim.exp, testsuite/modules.50-cmds/177-swap-prep-delim.exp, testsuite/modules.50-cmds/178-swap-prep-delim.exp: * Fix the module swap with the --delim option (Tyson Whitehead) 2012-10-25 R.K. Owen * .cvsignore, .gitignore, config/.cvsignore, config/.gitignore, doc/.cvsignore, doc/.gitignore, etc/.cvsignore, etc/.gitignore, etc/global/.cvsignore, etc/global/.gitignore, etc/skel/.cvsignore, etc/skel/.gitignore, ext/.cvsignore, ext/.gitignore, ext/common/.cvsignore, ext/common/.gitignore, init/.cvsignore, init/.gitignore, modulefiles/.cvsignore, modulefiles/.gitignore, tcl/init/.cvsignore, tcl/init/.gitignore, testsuite/.cvsignore, testsuite/.gitignore, testsuite/etc/.cvsignore, testsuite/etc/.gitignore, testsuite/home/.cvsignore, testsuite/home/.gitignore: Moved the .cvsignore files to .gitignore 2012-05-17 rkowen * ModuleCmd_Load.c, NEWS, modules_def.h, testsuite/modulefiles/recurs/modA, testsuite/modulefiles/recurs/modB, testsuite/modules.50-cmds/085-info-flags.exp, testsuite/modules.50-cmds/195-load-recurs.exp: * Fix the flags with regards to recursive load/unload 2011-11-28 rkowen * ModuleCmd_Purge.c, ModuleCmd_Update.c, ModuleCmd_Use.c, NEWS, cmdPath.c, cmdSetenv.c, testsuite/modules.00-init/080-begenv.exp, utility.c, version.c: Test ptrs yielded by EMGetEnv. 2011-11-11 rkowen * ModuleCmd_Purge.c, ModuleCmd_Update.c, ModuleCmd_Use.c, NEWS, cmdPath.c, cmdSetenv.c, init.c, modules_def.h, utility.c, version.c: Crucial bug fix ... TclGetEnv/TclSetEnv are Tcl routines, so renamed these to EMGetEnv/EMSetEnv. Fix due to Orion Poplawski. 2011-11-10 rkowen * ChangeLog, NEWS, version.c: Preparation for distribution. 2011-10-17 rkowen * Makefile.am, NEWS, init.c, init/Makefile.am, init/ruby.rb.in, utility.c: * Added support for Ruby (Tammo Tjarks) 2011-10-03 rkowen * cmdPath.c, utility.c: Rolled in Poor Yorick's changes to Remove_Path() which fixes the memory corruption of "module purge". * ModuleCmd_Avail.c, ModuleCmd_Update.c, NEWS, cmdLog.c, cmdVersion.c, cmdWhatis.c, error.c, locate_module.c, modules_def.h, utility.c: * Optionally use Tcl memory check routines for malloc/realloc. * ModuleCmd_Display.c, ModuleCmd_Help.c, ModuleCmd_Load.c, ModuleCmd_Purge.c, ModuleCmd_Refresh.c, ModuleCmd_Update.c, ModuleCmd_Use.c, ModuleCmd_Whatis.c, NEWS, cmdPath.c, cmdSetenv.c, init.c, modules_def.h, utility.c: * Isolated calls to the new interpreter and get & set env.vars. 2010-11-11 rkowen * ModuleCmd_Load.c, NEWS: * Fix the coexistence of load/remove flags (due to Martin Siegert) * ChangeLog, Makefile.am, ModuleCmd_Avail.c, ModuleCmd_Clear.c, ModuleCmd_Display.c, ModuleCmd_Help.c, ModuleCmd_Init.c, ModuleCmd_List.c, ModuleCmd_Load.c, ModuleCmd_Purge.c, ModuleCmd_Refresh.c, ModuleCmd_Switch.c, ModuleCmd_Update.c, ModuleCmd_Use.c, ModuleCmd_Whatis.c, NEWS, TODO, cmdAlias.c, cmdConflict.c, cmdInfo.c, cmdIsLoaded.c, cmdLog.c, cmdMisc.c, cmdModule.c, cmdPath.c, cmdSetenv.c, cmdTrace.c, cmdUlvl.c, cmdUname.c, cmdVerbose.c, cmdVersion.c, cmdWhatis.c, cmdXResource.c, config/emtcl.m4, config/tcl.m4, configure.ac, doc/.cvsignore, doc/module.1.in, doc/modulefile.4.in, error.c, etc/add.modules.in, etc/global/bashrc.in, etc/global/csh.modules.in, etc/global/profile.modules.in, etc/mkroot.in, ext/add.ext.in, ext/mkroot.in, init.c, init/.modulespath.in, init/Makefile.am, init/bash.in, init/cmake.in, init/csh.in, init/ksh.in, init/perl.pm.in, init/python.py.in, init/sh.in, init/zsh.in, locate_module.c, main.c, modulefiles/Makefile.am, modulefiles/dot.in, modulefiles/module-cvs.in, modulefiles/module-info.in, modulefiles/modules.in, modulefiles/null.in, modulefiles/use.own.in, modulefiles/version.in, modules.lsm.in, modules_def.h, testsuite/config/unix.exp, testsuite/modulefiles.deep/modulerc/.modulerc, testsuite/modulefiles.deep/modulerc/dir1/.modulerc, testsuite/modulefiles.deep/modulerc/dir1/1.0, testsuite/modulefiles.deep/modulerc/dir1/2.0, testsuite/modulefiles.deep/modulerc/dir2/.modulerc, .../modulefiles.deep/modulerc/dir2/1.0/.modulerc, testsuite/modulefiles.deep/modulerc/dir2/1.0/rc1, testsuite/modulefiles.deep/modulerc/dir2/1.0/rc2, testsuite/modulefiles.deep/modulerc/dir2/2.0, testsuite/modulefiles.deep/modulerc/dir2/3.0, testsuite/modulefiles.deep/plain/dir1/1.0, testsuite/modulefiles.deep/plain/dir1/2.0, testsuite/modulefiles.deep/plain/dir2/1.0, testsuite/modulefiles.deep/plain/dir2/2.0, testsuite/modulefiles.deep/version/.version, testsuite/modulefiles.deep/version/dir1/.version, testsuite/modulefiles.deep/version/dir1/1.0, testsuite/modulefiles.deep/version/dir1/2.0, testsuite/modulefiles.deep/version/dir2/.version, testsuite/modulefiles.deep/version/dir2/1.0, .../modulefiles.deep/version/dir2/2.0/.version, testsuite/modulefiles.deep/version/dir2/2.0/rc1, testsuite/modulefiles.deep/version/dir2/2.0/rc2, testsuite/modulefiles.deep/version/dir2/3.0, testsuite/modulefiles/break/2.0, testsuite/modulefiles/info/shellsexp, testsuite/modules.00-init/006-procs.exp, testsuite/modules.00-init/030-shells.exp, testsuite/modules.00-init/080-begenv.exp, testsuite/modules.10-use/030-use.exp, testsuite/modules.10-use/031-append.exp, testsuite/modules.10-use/070-unuse.exp, testsuite/modules.20-locate/050-locrc.exp, testsuite/modules.35-trace/010-init_ts.exp, testsuite/modules.50-cmds/015-use.exp, testsuite/modules.50-cmds/017-use-undo.exp, testsuite/modules.50-cmds/020-setenv.exp, testsuite/modules.50-cmds/022-setenv-eschars.exp, testsuite/modules.50-cmds/025-setenv-undo.exp, testsuite/modules.50-cmds/030-unsetenv.exp, testsuite/modules.50-cmds/035-unsetenv-undo.exp, testsuite/modules.50-cmds/036-unsetenv-x.exp, testsuite/modules.50-cmds/040-append.exp, testsuite/modules.50-cmds/042-append-delim.exp, testsuite/modules.50-cmds/045-append-undo.exp, testsuite/modules.50-cmds/047-app-del-undo.exp, testsuite/modules.50-cmds/050-prepend.exp, testsuite/modules.50-cmds/052-prepend-delim.exp, testsuite/modules.50-cmds/055-prepend-undo.exp, testsuite/modules.50-cmds/057-pre-del-undo.exp, testsuite/modules.50-cmds/060-remove.exp, testsuite/modules.50-cmds/065-remove-undo.exp, testsuite/modules.50-cmds/075-alias.exp, testsuite/modules.50-cmds/077-alias-undo.exp, testsuite/modules.50-cmds/078-refresh.exp, testsuite/modules.50-cmds/080-info-name.exp, testsuite/modules.50-cmds/086-info-shells.exp, testsuite/modules.50-cmds/087-info-shells-exp.exp, testsuite/modules.50-cmds/088-info-isloaded.exp, testsuite/modules.50-cmds/095-uname.exp, testsuite/modules.50-cmds/100-loglevel.exp, testsuite/modules.50-cmds/170-swap.exp, testsuite/modules.50-cmds/175-swap2.exp, testsuite/modules.50-cmds/190-load.exp, testsuite/modules.50-cmds/200-break.exp, testsuite/modules.50-cmds/210-exit.exp, testsuite/modules.50-cmds/220-continue.exp, testsuite/modules.50-cmds/230-loop.exp, testsuite/modules.70-maint/045-listlong.exp, testsuite/modules.70-maint/070-display.exp, testsuite/modules.80-deep/010-init_ts.exp, testsuite/modules.80-deep/020-load.exp, testsuite/modules.80-deep/030-display.exp, testsuite/modules.80-deep/040-list.exp, testsuite/modules.80-deep/999-cleanup.exp, testsuite/modules.90-avail/030-multiple.exp, testsuite/modules.90-avail/050-long.exp, testsuite/modules.95-version/020-load.exp, testsuite/modules.95-version/020-unload.exp, testsuite/modules.95-version/022-load2.exp, testsuite/modules.95-version/022-unload2.exp, testsuite/modules.95-version/040-xgetenv.exp, utility.c, version.c, xref/ModuleCmd_Avail.c.html, xref/ModuleCmd_Avail.c.src.html, xref/ModuleCmd_Clear.c.html, xref/ModuleCmd_Clear.c.src.html, xref/ModuleCmd_Display.c.html, xref/ModuleCmd_Display.c.src.html, xref/ModuleCmd_Help.c.html, xref/ModuleCmd_Help.c.src.html, xref/ModuleCmd_Init.c.html, xref/ModuleCmd_Init.c.src.html, xref/ModuleCmd_List.c.html, xref/ModuleCmd_List.c.src.html, xref/ModuleCmd_Load.c.html, xref/ModuleCmd_Load.c.src.html, xref/ModuleCmd_Purge.c.html, xref/ModuleCmd_Purge.c.src.html, xref/ModuleCmd_Refresh.c.html, xref/ModuleCmd_Refresh.c.src.html, xref/ModuleCmd_Switch.c.html, xref/ModuleCmd_Switch.c.src.html, xref/ModuleCmd_Update.c.html, xref/ModuleCmd_Update.c.src.html, xref/ModuleCmd_Use.c.html, xref/ModuleCmd_Use.c.src.html, xref/ModuleCmd_Whatis.c.html, xref/ModuleCmd_Whatis.c.src.html, xref/cmdAlias.c.html, xref/cmdAlias.c.src.html, xref/cmdChdir.c.html, xref/cmdChdir.c.src.html, xref/cmdConflict.c.html, xref/cmdConflict.c.src.html, xref/cmdInfo.c.html, xref/cmdInfo.c.src.html, xref/cmdIsLoaded.c.html, xref/cmdIsLoaded.c.src.html, xref/cmdLog.c.html, xref/cmdLog.c.src.html, xref/cmdMisc.c.html, xref/cmdMisc.c.src.html, xref/cmdModule.c.html, xref/cmdModule.c.src.html, xref/cmdPath.c.html, xref/cmdPath.c.src.html, xref/cmdSetenv.c.html, xref/cmdSetenv.c.src.html, xref/cmdTrace.c.html, xref/cmdTrace.c.src.html, xref/cmdUlvl.c.html, xref/cmdUlvl.c.src.html, xref/cmdUname.c.html, xref/cmdUname.c.src.html, xref/cmdVerbose.c.html, xref/cmdVerbose.c.src.html, xref/cmdVersion.c.html, xref/cmdVersion.c.src.html, xref/cmdWhatis.c.html, xref/cmdWhatis.c.src.html, xref/cmdXResource.c.html, xref/cmdXResource.c.src.html, xref/cxref.apdx.html, xref/cxref.function, xref/cxref.html, xref/cxref.include, xref/cxref.typedef, xref/cxref.variable, xref/error.c.html, xref/error.c.src.html, xref/getopt.c.html, xref/getopt.c.src.html, xref/init.c.html, xref/init.c.src.html, xref/locate_module.c.html, xref/locate_module.c.src.html, xref/main.c.html, xref/main.c.src.html, xref/utility.c.html, xref/utility.c.src.html, xref/version.c.html, xref/version.c.src.html: Setting up the modules-3-2-9 branch. 2010-07-27 rkowen * cmdChdir.c, init/bash_completion.in, testsuite/modulefiles/alias/1.0, testsuite/modulefiles/append/0.1, testsuite/modulefiles/append/0.2, testsuite/modulefiles/append/1.0, testsuite/modulefiles/append/2.1, testsuite/modulefiles/append/2.2, testsuite/modulefiles/break/4.0, testsuite/modulefiles/continue/1.0, testsuite/modulefiles/continue/2.0, testsuite/modulefiles/continue/3.0, testsuite/modulefiles/continue/4.0, testsuite/modulefiles/exit/1.0, testsuite/modulefiles/exit/2.0, testsuite/modulefiles/exit/3.0, testsuite/modulefiles/prepend/0.1, testsuite/modulefiles/prepend/0.2, testsuite/modulefiles/prepend/1.0, testsuite/modulefiles/prepend/2.1, testsuite/modulefiles/prepend/2.2, testsuite/modules.50-cmds/042-append-delim.exp, testsuite/modules.50-cmds/047-app-del-undo.exp, testsuite/modules.50-cmds/052-prepend-delim.exp, testsuite/modules.50-cmds/057-pre-del-undo.exp, testsuite/modules.50-cmds/076-alias-sub.exp, testsuite/modules.50-cmds/175-swap2.exp, testsuite/modules.50-cmds/210-exit.exp, testsuite/modules.50-cmds/220-continue.exp, testsuite/modules.50-cmds/230-loop.exp, testsuite/modules.50-cmds/999-cleanup.exp: Base version is 3-2-0, then merged to 3-2-7. 2006-01-19 rkowen * ChangeLog, Makefile.am, modules.lsm.in: Changed from sunsite to ibiblio (same thing though). 2006-01-18 rkowen * ChangeLog, xref/config.h.html, xref/config.h.src.html: Updated. * xref/cmdModule.c.html, xref/cmdModule.c.src.html, xref/cmdPath.c.html, xref/cmdXResource.c.html, xref/cmdXResource.c.src.html, xref/cxref.apdx.html, xref/cxref.function, xref/modules_def.h.src.html, xref/utility.c.html, xref/utility.c.src.html: Updated. * MACHINES, NEWS: News about eliminating --with-force-path. 2006-01-17 rkowen * ChangeLog, README, cmdModule.c, configure.ac, modules_def.h, utility.c: Removed the --with-force-path option ... which basically makes sure that PATH and LD_LIBRARY_PATH have some minimum values, given by a couple of MODULE_*_SACRED env.vars. If you need something like this, then you've probably written your modulefiles wrong! 2006-01-12 rkowen * xref/cxref.variable, xref/main.c.html, xref/main.c.src.html, xref/modules_def.h.html, xref/modules_def.h.src.html, xref/version.c.html, xref/version.c.src.html: Updated the cxref docs * ChangeLog, version.c: Updated version date. * main.c, modules_def.h: Have --version list out the version date also. * xref/ModuleCmd_Avail.c.html, xref/ModuleCmd_Avail.c.src.html, xref/ModuleCmd_Clear.c.html, xref/ModuleCmd_Clear.c.src.html, xref/ModuleCmd_Display.c.html, xref/ModuleCmd_Display.c.src.html, xref/ModuleCmd_Help.c.html, xref/ModuleCmd_Help.c.src.html, xref/ModuleCmd_Init.c.html, xref/ModuleCmd_Init.c.src.html, xref/ModuleCmd_List.c.html, xref/ModuleCmd_List.c.src.html, xref/ModuleCmd_Load.c.html, xref/ModuleCmd_Load.c.src.html, xref/ModuleCmd_Purge.c.html, xref/ModuleCmd_Purge.c.src.html, xref/ModuleCmd_Refresh.c.src.html, xref/ModuleCmd_Switch.c.html, xref/ModuleCmd_Switch.c.src.html, xref/ModuleCmd_Update.c.src.html, xref/ModuleCmd_Use.c.html, xref/ModuleCmd_Use.c.src.html, xref/ModuleCmd_Whatis.c.html, xref/ModuleCmd_Whatis.c.src.html, xref/cmdAlias.c.html, xref/cmdAlias.c.src.html, xref/cmdConflict.c.html, xref/cmdConflict.c.src.html, xref/cmdInfo.c.html, xref/cmdInfo.c.src.html, xref/cmdIsLoaded.c.html, xref/cmdIsLoaded.c.src.html, xref/cmdLog.c.html, xref/cmdLog.c.src.html, xref/cmdMisc.c.html, xref/cmdMisc.c.src.html, xref/cmdModule.c.html, xref/cmdModule.c.src.html, xref/cmdPath.c.html, xref/cmdPath.c.src.html, xref/cmdSetenv.c.html, xref/cmdSetenv.c.src.html, xref/cmdTrace.c.html, xref/cmdTrace.c.src.html, xref/cmdUlvl.c.html, xref/cmdUlvl.c.src.html, xref/cmdUname.c.html, xref/cmdUname.c.src.html, xref/cmdVerbose.c.html, xref/cmdVerbose.c.src.html, xref/cmdVersion.c.html, xref/cmdVersion.c.src.html, xref/cmdWhatis.c.html, xref/cmdWhatis.c.src.html, xref/cmdXResource.c.html, xref/cmdXResource.c.src.html, xref/config.h.html, xref/config.h.src.html, xref/error.c.html, xref/error.c.src.html, xref/getopt.c.html, xref/getopt.c.src.html, xref/init.c.html, xref/init.c.src.html, xref/locate_module.c.html, xref/locate_module.c.src.html, xref/main.c.html, xref/main.c.src.html, xref/modules_def.h.html, xref/modules_def.h.src.html, xref/utility.c.html, xref/utility.c.src.html, xref/version.c.src.html: Updated the cxref docs to 3.2.0rc4 * .cvsignore, doc/.cvsignore, etc/.cvsignore, init/.cvsignore: More things to ignore. * ModuleCmd_Init.c, NEWS, version.c: Reworked the "module init*" subcommand to handle dot files with multiple "module load" lines. * config/emtcl.m4, config/tcl.m4, configure.ac: Reintroduced (or added) the configure options --with-tcl-{versions|lib|include} to allow the user to specify any values which may be missing from the tclConfig.sh script. * testsuite/home/.modules, testsuite/home/.modules.save, testsuite/modules.60-initx/005-init.exp, testsuite/modules.60-initx/010-list.exp, testsuite/modules.60-initx/020-add.exp, testsuite/modules.60-initx/030-switch.exp, testsuite/modules.60-initx/040-prepend.exp, testsuite/modules.60-initx/050-rm.exp, testsuite/modules.60-initx/060-2nd.exp, testsuite/modules.60-initx/095-cleanup.exp: Added a test suite for the "module init*" subcommands. 2005-12-15 rkowen * ChangeLog, INSTALL: Updating the INSTALL doc for 3.2.0 2005-12-05 rkowen * ChangeLog, cvs2cl.pl: Changed the ChangeLog script to not record changes about itself to itself. * ChangeLog, Makefile.am, NEWS, cvs2cl.pl, stripmkf, version.c: Added the cvs2cl.pl perl script for generating the ChangeLog semi-automatically. Removed stripmkf - an artifact from older releases. * ChangeLog, etc/Makefile.am, ext/Makefile.am: Put the add.modules/add.ext & mkroot scripts under the --prefix bin directory since those scripts are platform independent, and the modules modulefile will point to these scripts. 2005-12-02 rkowen * ChangeLog, configure.ac, init/Makefile.am, modulefiles/Makefile.am: Put the init/ scripts under the --exec-prefix directory, because they point to the platform specific modulecmd. 2005-11-30 rkowen * ChangeLog, cmdSetenv.c, configure.ac, init/.modulespath.in, modulefiles/Makefile.am, modules_def.h, utility.c, version.c: * Eliminated any warnings caused by using Tcl 8.4 * Fixed any mixed size differences when using ints and pointers. (Only an issue with 64 bit machines.) 2005-11-29 rkowen * ModuleCmd_Avail.c, ModuleCmd_Clear.c, ModuleCmd_Display.c, ModuleCmd_Help.c, ModuleCmd_List.c, ModuleCmd_Load.c, ModuleCmd_Switch.c, ModuleCmd_Whatis.c, cmdAlias.c, cmdConflict.c, cmdInfo.c, cmdIsLoaded.c, cmdLog.c, cmdMisc.c, cmdTrace.c, cmdUlvl.c, cmdUname.c, cmdVerbose.c, cmdVersion.c, cmdWhatis.c, error.c, getopt.c, init.c, locate_module.c, main.c, utility.c: Made all the 'First Edition' years to be 4 digits. * ModuleCmd_Clear.c, ModuleCmd_Init.c, ModuleCmd_Purge.c, ModuleCmd_Refresh.c, ModuleCmd_Update.c, ModuleCmd_Use.c, cmdAlias.c, cmdConflict.c, cmdInfo.c, cmdIsLoaded.c, cmdLog.c, cmdMisc.c, cmdModule.c, cmdPath.c, cmdSetenv.c, cmdTrace.c, cmdUlvl.c, cmdUname.c, cmdVerbose.c, cmdVersion.c, cmdWhatis.c, cmdXResource.c, init.c, locate_module.c, main.c, modules_def.h, utility.c, version.c: Added the CONST84 qualifier to eliminate compiler warnings, and the side effects. 2005-11-26 rkowen * Makefile.am, configure.ac, modules.lsm.in: Updated the LSM and the creation and handling of distribution tarballs. * Makefile.am, modulefiles/Makefile.am: Rolled in the Make versioning install fragment from the predeep branch. 2005-11-25 rkowen * xref/ModuleCmd_Avail.c.html, xref/ModuleCmd_Display.c.html, xref/ModuleCmd_Refresh.c.html, xref/ModuleCmd_Refresh.c.src.html, xref/ModuleCmd_Update.c.html, xref/ModuleCmd_Update.c.src.html, xref/cmdConflict.c.html, xref/cmdConflict.c.src.html, xref/cmdInfo.c.src.html, xref/cmdModule.c.html, xref/cmdModule.c.src.html, xref/cmdPath.c.html, xref/cmdPath.c.src.html, xref/cmdSetenv.c.html, xref/cmdSetenv.c.src.html, xref/cmdTrace.c.html, xref/cmdTrace.c.src.html, xref/cmdUlvl.c.html, xref/cmdUlvl.c.src.html, xref/cmdWhatis.c.html, xref/config.h.html, xref/config.h.src.html, xref/cxref.apdx.html, xref/cxref.css, xref/cxref.function, xref/cxref.html, xref/cxref.include, xref/cxref.variable, xref/error.c.html, xref/init.c.html, xref/main.c.html, xref/main.c.src.html, xref/modules_def.h.html, xref/modules_def.h.src.html, xref/utility.c.html, xref/version.c.html, xref/version.c.src.html: Updated the cxref docs with the "refresh" changes. * configure.ac, testsuite/modules.50-cmds/070-alias-proc.exp, testsuite/modules.50-cmds/075-alias.exp, testsuite/modules.50-cmds/078-refresh.exp: Finished the alias/refresh tests for sourcing a tmpfile, and also the special case for the Bourne shell where funcs and no aliases. 2005-11-22 rkowen * ModuleCmd_Refresh.c, ModuleCmd_Update.c, main.c, testsuite/modules.00-init/006-procs.exp, testsuite/modules.50-cmds/070-alias-proc.exp, testsuite/modules.50-cmds/075-alias.exp, testsuite/modules.50-cmds/077-alias-undo.exp, testsuite/modules.50-cmds/078-refresh.exp: Cleaned up the test proc code, and normalized the "refresh" code to the existing standard. 2005-11-21 rkowen * ChangeLog, Makefile.am, ModuleCmd_Refresh.c, cmdConflict.c, cmdInfo.c, cmdModule.c, cmdPath.c, cmdSetenv.c, cmdTrace.c, cmdUlvl.c, doc/module.1.in, main.c, modules_def.h: * ModuleCmd_Refresh.c: Like "update" but refreshes only the non-persistent attributes of the currently loaded modules, regardless of the state of the loaded modules (i.e. refresh aliases). (still needs some test code) * ChangeLog, cmdConflict.c, version.c: * cmdConflict.c: Fixed memory allocation bug in cmdPrereq(). When there is more than 1 argument to the prereq command, both savedlens and savedlists were indexed past what the initial malloc allowed. 2005-11-15 rkowen * .cxref, Makefile.am, xref/ModuleCmd_Avail.c.html, xref/ModuleCmd_Avail.c.src.html, xref/ModuleCmd_Clear.c.html, xref/ModuleCmd_Clear.c.src.html, xref/ModuleCmd_Display.c.html, xref/ModuleCmd_Display.c.src.html, xref/ModuleCmd_Help.c.html, xref/ModuleCmd_Help.c.src.html, xref/ModuleCmd_Init.c.html, xref/ModuleCmd_Init.c.src.html, xref/ModuleCmd_List.c.html, xref/ModuleCmd_List.c.src.html, xref/ModuleCmd_Load.c.html, xref/ModuleCmd_Load.c.src.html, xref/ModuleCmd_Purge.c.html, xref/ModuleCmd_Purge.c.src.html, xref/ModuleCmd_Switch.c.html, xref/ModuleCmd_Switch.c.src.html, xref/ModuleCmd_Update.c.html, xref/ModuleCmd_Update.c.src.html, xref/ModuleCmd_Use.c.html, xref/ModuleCmd_Use.c.src.html, xref/ModuleCmd_Whatis.c.html, xref/ModuleCmd_Whatis.c.src.html, xref/cmdAlias.c.html, xref/cmdAlias.c.src.html, xref/cmdConflict.c.html, xref/cmdConflict.c.src.html, xref/cmdInfo.c.html, xref/cmdInfo.c.src.html, xref/cmdIsLoaded.c.html, xref/cmdIsLoaded.c.src.html, xref/cmdLog.c.html, xref/cmdLog.c.src.html, xref/cmdMisc.c.html, xref/cmdMisc.c.src.html, xref/cmdModule.c.html, xref/cmdModule.c.src.html, xref/cmdPath.c.html, xref/cmdPath.c.src.html, xref/cmdSetenv.c.html, xref/cmdSetenv.c.src.html, xref/cmdTrace.c.html, xref/cmdTrace.c.src.html, xref/cmdUlvl.c.html, xref/cmdUlvl.c.src.html, xref/cmdUname.c.html, xref/cmdUname.c.src.html, xref/cmdVerbose.c.html, xref/cmdVerbose.c.src.html, xref/cmdVersion.c.html, xref/cmdVersion.c.src.html, xref/cmdWhatis.c.html, xref/cmdWhatis.c.src.html, xref/cmdXResource.c.html, xref/cmdXResource.c.src.html, xref/config.h.html, xref/config.h.src.html, xref/cxref.apdx.html, xref/cxref.function, xref/cxref.html, xref/cxref.include, xref/cxref.typedef, xref/cxref.variable, xref/error.c.html, xref/error.c.src.html, xref/getopt.c.html, xref/getopt.c.src.html, xref/getopt.h.html, xref/getopt.h.src.html, xref/index.html, xref/init.c.html, xref/init.c.src.html, xref/locate_module.c.html, xref/locate_module.c.src.html, xref/main.c.src.html, xref/modules_def.h.html, xref/modules_def.h.src.html, xref/utility.c.html, xref/utility.c.src.html, xref/version.c.html, xref/version.c.src.html: Updated the cxref docs 2005-11-14 rkowen * ChangeLog, Makefile.am, ModuleCmd_Avail.c, ModuleCmd_Bootstrap.c, ModuleCmd_Init.c, ModuleCmd_List.c, ModuleCmd_Update.c, ModuleCmd_Use.c, README, acinclude.m4, cmdConflict.c, cmdInfo.c, cmdIsLoaded.c, cmdModule.c, cmdPath.c, cmdTrace.c, cmdUlvl.c, cmdVersion.c, config/tcl.m4, configure.ac, doc/module.1.in, error.c, init.c, lib/.cvsignore, lib/Makefile.am, lib/avec.h, lib/avec.man, lib/avec/.cvsignore, lib/avec/avec_.c, lib/avec/avec_.h, lib/avec/avec_accessor.c, lib/avec/avec_alloc.c, lib/avec/avec_close.c, lib/avec/avec_ctor.c, lib/avec/avec_dealloc.c, lib/avec/avec_decrease.c, lib/avec/avec_delete.c, lib/avec/avec_dtor.c, lib/avec/avec_increase.c, lib/avec/avec_init.c, lib/avec/avec_insert.c, lib/avec/avec_keys.c, lib/avec/avec_lookup.c, lib/avec/avec_remove.c, lib/avec/avec_resize.c, lib/avec/avec_resize_percentage.c, lib/avec/avec_set_fns.c, lib/avec/avec_values.c, lib/avec/avec_walk.c, lib/avec/avec_walk_r.c, lib/configure.ac, lib/iprime.h, lib/iprime.man, lib/iprime/.cvsignore, lib/iprime/chprime.c, lib/iprime/hprime.c, lib/iprime/iprime.c, lib/iprime/iprime_.h, lib/iprime/iprime_lut.c, lib/iprime/lprime.c, lib/iprime/scprime.c, lib/iprime/ucprime.c, lib/iprime/uhprime.c, lib/iprime/uiprime.c, lib/iprime/ulprime.c, lib/isqrt.h, lib/isqrt.man, lib/isqrt/.cvsignore, lib/isqrt/chsqrt.c, lib/isqrt/hsqrt.c, lib/isqrt/isqrt.c, lib/isqrt/isqrt_.h, lib/isqrt/isqrt_lut.c, lib/isqrt/lsqrt.c, lib/isqrt/scsqrt.c, lib/isqrt/ucsrt.c, lib/isqrt/uhsqrt.c, lib/isqrt/uisqrt.c, lib/isqrt/ulsqrt.c, lib/list.h, lib/list.man, lib/list/.cvsignore, lib/list/list_.c, lib/list/list_.h, lib/list/list_append.c, lib/list/list_ctor.c, lib/list/list_delete.c, lib/list/list_dtor.c, lib/list/list_exists.c, lib/list/list_first.c, lib/list/list_insert.c, lib/list/list_last.c, lib/list/list_number.c, lib/list/list_pop.c, lib/list/list_push.c, lib/list/list_qsort.c, lib/list/list_shift.c, lib/list/list_sizeof.c, lib/list/list_swap.c, lib/list/list_unshift.c, lib/memdebug.c, lib/memdebug.h, lib/memdebug.man, lib/strmalloc.c, lib/strmalloc.h, lib/strmalloc.man, lib/tests/.cvsignore, lib/tests/Makefile.am, lib/tests/tavec.c, lib/tests/tiprime.c, lib/tests/tisqrt.c, lib/tests/tstrmalloc.c, lib/tests/tuvec.c, lib/uvec.h, lib/uvec.man, lib/uvec/.cvsignore, lib/uvec/str2uvec.c, lib/uvec/uvec2str.c, lib/uvec/uvec2uvec.c, lib/uvec/uvec_accessor.c, lib/uvec/uvec_add.c, lib/uvec/uvec_alloc.c, lib/uvec/uvec_close.c, lib/uvec/uvec_copy.c, lib/uvec/uvec_copy_str.c, lib/uvec/uvec_copy_vec.c, lib/uvec/uvec_count_tok.c, lib/uvec/uvec_ctor.c, lib/uvec/uvec_dealloc.c, lib/uvec/uvec_dtor.c, lib/uvec/uvec_init.c, lib/uvec/uvec_insert.c, lib/uvec/uvec_push.c, lib/uvec/uvec_randomize.c, lib/uvec/uvec_reverse.c, lib/uvec/uvec_shift.c, lib/uvec/uvec_sort.c, lib/uvec/uvec_strfns.c, lib/uvec/uvec_strfree.c, lib/uvec/vec2uvec.c, locate_module.c, main.c, modulefiles/module-cvs.in, modules_def.h, testsuite/.cvsignore, testsuite/config/unix.exp, testsuite/modules.00-init/005-init_ts.exp, testsuite/modules.00-init/006-procs.exp, testsuite/modules.00-init/010-environ.exp, testsuite/modules.00-init/015-version.exp, testsuite/modules.00-init/030-shells.exp, testsuite/modules.00-init/050-modpath.exp, testsuite/modules.00-init/080-begenv.exp, testsuite/modules.20-locate/040-alias.exp, testsuite/modules.20-locate/045-symvers.exp, testsuite/modules.20-locate/046-getsym.exp, testsuite/modules.20-locate/047-symerrs.exp, testsuite/modules.20-locate/048-symexec.exp, testsuite/modules.20-locate/050-locrc.exp, testsuite/modules.20-locate/060-rc.exp, testsuite/modules.20-locate/070-homerc.exp, testsuite/modules.30-userlvl/040-advanced.exp, testsuite/modules.30-userlvl/045-adv.exp, testsuite/modules.30-userlvl/050-expert.exp, testsuite/modules.30-userlvl/055-exp.exp, testsuite/modules.35-trace/010-init_ts.exp, testsuite/modules.35-trace/020-default.exp, testsuite/modules.35-trace/030-all-on.exp, testsuite/modules.35-trace/031-all-off.exp, testsuite/modules.35-trace/040-load-all.exp, testsuite/modules.35-trace/041-load-all.exp, testsuite/modules.35-trace/042-load-on.exp, testsuite/modules.35-trace/043-load-onoff.exp, testsuite/modules.35-trace/044-load-ovr.exp, testsuite/modules.35-trace/050-disp-onoff.exp, testsuite/modules.35-trace/060-dilo-onoff.exp, testsuite/modules.35-trace/070-colon.exp, testsuite/modules.35-trace/095-cleanup.exp, testsuite/modules.50-cmds/015-use.exp, testsuite/modules.50-cmds/017-use-undo.exp, testsuite/modules.50-cmds/020-setenv.exp, testsuite/modules.50-cmds/022-setenv-eschars.exp, testsuite/modules.50-cmds/025-setenv-undo.exp, testsuite/modules.50-cmds/030-unsetenv.exp, testsuite/modules.50-cmds/035-unsetenv-undo.exp, testsuite/modules.50-cmds/036-unsetenv-x.exp, testsuite/modules.50-cmds/040-append.exp, testsuite/modules.50-cmds/045-append-undo.exp, testsuite/modules.50-cmds/050-prepend.exp, testsuite/modules.50-cmds/055-prepend-undo.exp, testsuite/modules.50-cmds/060-remove.exp, testsuite/modules.50-cmds/065-remove-undo.exp, testsuite/modules.50-cmds/070-alias-proc.exp, testsuite/modules.50-cmds/075-alias.exp, testsuite/modules.50-cmds/077-alias-undo.exp, testsuite/modules.50-cmds/080-info-name.exp, testsuite/modules.50-cmds/081-info-user.exp, testsuite/modules.50-cmds/082-info-user-exp.exp, testsuite/modules.50-cmds/083-info-mode.exp, testsuite/modules.50-cmds/084-info-mode-exp.exp, testsuite/modules.50-cmds/085-info-flags.exp, testsuite/modules.50-cmds/086-info-shells.exp, testsuite/modules.50-cmds/087-info-shells-exp.exp, testsuite/modules.50-cmds/088-info-isloaded.exp, testsuite/modules.50-cmds/095-uname.exp, testsuite/modules.50-cmds/101-badfac.exp, testsuite/modules.50-cmds/110-verbose.exp, testsuite/modules.50-cmds/115-verbose-msg.exp, testsuite/modules.50-cmds/120-prereq-full.exp, testsuite/modules.50-cmds/121-prereq-module.exp, testsuite/modules.50-cmds/130-conflict-full.exp, testsuite/modules.50-cmds/131-conflict-module.exp, testsuite/modules.50-cmds/140-system.exp, testsuite/modules.50-cmds/150-module.exp, testsuite/modules.50-cmds/170-swap.exp, testsuite/modules.50-cmds/190-load.exp, testsuite/modules.50-cmds/200-break.exp, testsuite/modules.70-maint/020-update.exp, testsuite/modules.70-maint/030-purge.exp, testsuite/modules.70-maint/050-whatis-load.exp, testsuite/modules.70-maint/060-apropos.exp, testsuite/modules.70-maint/095-cleanup.exp, testsuite/modules.95-version/020-load.exp, testsuite/modules.95-version/020-unload.exp, testsuite/modules.95-version/022-load2.exp, testsuite/modules.95-version/022-unload2.exp, testsuite/modules.95-version/040-xgetenv.exp, testsuite/modules.95-version/999-cleanup.exp, utility.c, version.c: Merged in the modules_3_2_predeep_branch branch to the main trunk. Removed the hash library. 2004-11-18 lakata * tcl/README-EMACS.txt, tcl/init/.cvsignore, tcl/init/lisp.in: submitted by tbennett@nvidia.com * tcl/init/Makefile, tcl/modulecmd.tcl: patch for Emacs from tbennett@nvidia.com 2004-05-25 sirdude * tcl/init/bash.in, tcl/init/csh.in, tcl/init/ksh.in, tcl/init/perl.in, tcl/init/python.in, tcl/init/sh.in, tcl/init/tcsh.in, tcl/init/zsh.in: tcl version of modules now looks at environment var TCLSH if it exits and uses that first. Suggested by David Astrom. Kent 2004-01-16 sirdude * tcl/Makefile, testsuite/config/unix.exp: Made it so that the testsuite works with the tcl version of modules. Current stats for the tcl version are: # of expected passes 146 # of unexpected failures 376 Not too shabby, I'm guessing it will be fairly straight forward to increase this by quite a bit. Kent 2004-01-15 sirdude * tcl/init/bash.in, tcl/init/csh.in, tcl/init/ksh.in, tcl/init/perl.in, tcl/init/python.in, tcl/init/sh.in, tcl/init/tcsh.in, tcl/init/zsh.in: Modified the tcl init files so that they try to find tclsh, this should make them quite a bit faster assuming they find it. (This way it locates the shell just once instead of for every single command.) Kent 2003-07-30 lakata * tcl/README.txt, tcl/modulecmd.tcl: version 0.98: fixed a bug in the error_count (missing closing brace). also implemented check to abort the tempfile sourcing if the tempfile is empty. this is to be more blackboxish, avoiding relying on the shell to do a clean up. one of our users is not using the module command correctly, and it is created a whole bunch of empty /tmp/modulescript files in the /tmp dir. 2003-07-10 harlan * ChangeLog, tcl/modulecmd.tcl: * tcl/modulecmd.tcl: If g_force is set, ignore *_modshare. When we produce a shell function, preface the definition with "function" in case it's already defined. Default g_force to 1 now. 2003-05-30 lakata * tcl/init/README.txt, tcl/init/bash.in, tcl/init/csh.in, tcl/init/ksh.in, tcl/init/modulerc, tcl/init/perl.in, tcl/init/sh.in, tcl/init/tcsh.in, tcl/init/zsh.in: changed the way MODULEPATH is set up. since this is another environment variable like all the others, it is now set using the module command itself. pretty sneaky, huh? 2003-03-28 lakata * tcl/README.txt, tcl/modulecmd.tcl: changes for cygwin. files should not have cr/lf (DOS) endings. * tcl/init/Makefile, tcl/init/README.txt, tcl/init/bash, tcl/init/bash.in, tcl/init/csh, tcl/init/csh.in, tcl/init/ksh, tcl/init/ksh.in, tcl/init/perl, tcl/init/perl.in, tcl/init/python, tcl/init/python.in, tcl/init/sh, tcl/init/sh.in, tcl/init/tcsh, tcl/init/tcsh.in, tcl/init/zsh, tcl/init/zsh.in: made init files more general 2002-11-29 lakata * tcl/README.txt, tcl/init/bash, tcl/init/csh, tcl/init/ksh, tcl/init/perl, tcl/init/python, tcl/init/sh, tcl/init/tcsh, tcl/init/zsh, tcl/init/zsh.debug, tcl/modulecmd.tcl: first check in 2002-09-18 harlan * ChangeLog, Makefile.am, lib/.cvsignore, lib/Makefile.am, lib/tests/Makefile.am: * Makefile.am (modulecmd_CFLAGS): Use X_CFLAGS and TCL_INCLUDES. * lib/tests/Makefile.am (EXTRA_PROGRAMS): Renamed from noinst_PROGRAMS. Lose the .x suffixes. * lib/Makefile.am (ACLOCAL_AMFLAGS): Look in ../config/ . 2002-09-16 rkowen * ChangeLog, Makefile.am, ModuleCmd_List.c, TODO, colcomp.c, configure.ac, lib/uvec.man, locate_module.c, main.c, modules_def.h, utility.c: 2002-09-16 R.K. Owen * colcomp.c: removed * utility.c: added colcomp.c contents * Makefile.am: removed colcomp.c * main.c: Added DEF_COLLATE_BY_NUMBER output for --version * configure.ac: changed USE_COLCOMP to DEF_COLLATE_BY_NUMBER, and added memdebug * locate_module.c: changed USE_COLCOMP and GetModuleName for deep dirs. * modules_def.h: check for HAVE_CONFIG_H, and added memdebug * ModuleCmd_List.c: Simplified using uvec objects 2002-09-13 rkowen * ChangeLog, config/.cvsignore, init/.cvsignore: 2002-09-12 R.K. Owen * config/.cvsignore: New File: Ignore autogenerated files. * init/.cvsignore: Ignore autogenerated files. * .cvsignore, ChangeLog, doc/.cvsignore, etc/.cvsignore, ext/.cvsignore, lib/.cvsignore, lib/tests/.cvsignore, lib/tests/Makefile.am, modulefiles/.cvsignore: 2002-09-12 R.K. Owen * .cvsignore: Ignore autogenerated files. * doc/.cvsignore: Ignore autogenerated files. * etc/.cvsignore: Ignore autogenerated files. * ext/.cvsignore: Ignore autogenerated files. * lib/.cvsignore: Ignore autogenerated files. * lib/tests/.cvsignore: Ignore autogenerated files. * modulefiles/.cvsignore: Ignore autogenerated files. * lib/tests/Makefile.am: Tweeked for autoreconf * ChangeLog, README, lib/Makefile.am, lib/aclocal.m4, lib/configure.ac, lib/tests/tuvec.c, lib/uvec.h, lib/uvec/uvec_copy_str.c, lib/uvec/uvec_strfree.c: 2002-09-12 R.K. Owen * README: Updated the anonymous CVS invocation. * lib/aclocal.m4: Deleted auto* generated file. * lib/configure.ac: Tweeked to autoreconf * lib/Makefile.am: Tweeked to autoreconf * lib/uvec.h: Added uvec_strfree * lib/uvec/uvec_copy_str.c: Uses uvec string fns * lib/uvec/uvec_copy_vec.c: Uses uvec string fns * lib/uvec/uvec_strfree.c: New file: to dealloc uvec2str() generated strings * lib/tests/tuvec.c: Updated for uvec changes 2002-09-12 harlan * doc/Makefile.am, lib/config.h.in, lib/configure: * doc/Makefile.am: Added file. * lib/configure: Remove auto*-generated file. * lib/config.h.in: Ditto. * ChangeLog, Makefile.in, README, aclocal.m4, config.h.in, config/compile, config/depcomp, config/install-sh, config/missing, config/mkinstalldirs, configure, doc/Makefile.in, etc/Makefile.in, ext/Makefile.in, init/Makefile.in, lib/Makefile.in, lib/tests/Makefile.in, modulefiles/Makefile.in: * README: Update the instructions for using the CVS version of modules. * modulefiles/Makefile.in: Deleted auto* generated file. * lib/tests/Makefile.in: Ditto. * lib/Makefile.in: Ditto. * init/Makefile.in: Ditto. * ext/Makefile.in: Ditto. * etc/Makefile.in: Ditto. * doc/Makefile.in: Ditto. * config/mkinstalldirs: Ditto. * config/missing: Ditto. * config/install-sh: Ditto. * config/depcomp: Ditto. * config/compile: Ditto. * configure: Ditto. * config.h.in: Ditto. * aclocal.m4: Ditto. * Makefile.in: Ditto. * Makefile.am, ModuleCmd_Avail.c, NEWS, colcomp.c, configure.ac, lib/Makefile, locate_module.c: * colcomp.c: New file. Alternative collating algorithm that sorts numeric substrings numerically (mostly). * lib/Makefile: Remove auto*-generated file. * locate_module.c (SortedDirList): Ignore SCCS/ subdirs, too. * configure.ac: Disable our "look" for RUNTEST; it drives auto* crazy. Added the --with-file-collate={string,number} test, which provides a way to enable USE_COLCOMP. * ModuleCmd_Avail.c (fi_ent_cmp): USE_COLCOMP when told to do so. * locate_module.c (filename_compare): Ditto. * Makefile.am (modulecmd_LDFLAGS): lib is in the builddir, not the srcdir. (modulecmd_SOURCES): Added colcomp.c . * ChangeLog, NEWS: Rename ChangeLog to NEWS. 2002-08-27 rkowen * lib/Makefile, lib/Makefile.am, lib/Makefile.in, lib/memdebug.c, lib/memdebug.h, lib/memdebug.man, lib/tests/Makefile.in: Added the memdebug headerfile and sources. 2002-08-22 rkowen * cmdVersion.c, locate_module.c, modules_def.h: Fixed up GetDefault to handle .modulerc and .version files, where the latter will read the env.var. defined in .version and do a module-version so that the modlist data can be updated. These mods handle deep dirs on "module load" ... now need to fix up the rest! There's also now an amazing amount of cruft to weed out. 2002-08-14 lakata * locate_module.c, modules_def.h: removed compiler warnings about const char* * configure, configure.ac: added hack for linux that cant do -lX11 with -L/usr/X11R6/lib * cmdInfo.c, cmdVersion.c: removed compiler warnings 2002-08-02 rkowen * Makefile.am, Makefile.in, ModuleCmd_Avail.c, ModuleCmd_Display.c, ModuleCmd_Init.c, ModuleCmd_Load.c, ModuleCmd_Switch.c, aclocal.m4, cmdConflict.c, cmdInfo.c, cmdIsLoaded.c, cmdPath.c, cmdVersion.c, configure, configure.ac, error.c, etc/Makefile.in, ext/Makefile.in, init/Makefile.in, locate_module.c, main.c, modulefiles/Makefile.in, modules_def.h, testsuite/modules.00-init/080-begenv.exp, utility.c: A whole slew of changes progressing to deap modulefile directories. The current is not usuable, but will eventually be. These changes are checked in for safe keeping while R.K.Owen is on vacation. * xref/ModuleCmd_Avail.c.html, xref/ModuleCmd_Clear.c.html, xref/ModuleCmd_Display.c.html, xref/ModuleCmd_Help.c.html, xref/ModuleCmd_Init.c.html, xref/ModuleCmd_List.c.html, xref/ModuleCmd_Load.c.html, xref/ModuleCmd_Purge.c.html, xref/ModuleCmd_Switch.c.html, xref/ModuleCmd_Update.c.html, xref/ModuleCmd_Use.c.html, xref/ModuleCmd_Whatis.c.html, xref/cmdAlias.c.html, xref/cmdConflict.c.html, xref/cmdInfo.c.html, xref/cmdIsLoaded.c.html, xref/cmdLog.c.html, xref/cmdMisc.c.html, xref/cmdModule.c.html, xref/cmdPath.c.html, xref/cmdSetenv.c.html, xref/cmdTrace.c.html, xref/cmdUlvl.c.html, xref/cmdUname.c.html, xref/cmdVerbose.c.html, xref/cmdVersion.c.html, xref/cmdWhatis.c.html, xref/cxref.apdx.html, xref/cxref.function, xref/cxref.html, xref/cxref.include, xref/cxref.typedef, xref/cxref.variable, xref/error.c.html, xref/getopt.c.html, xref/init.c.html, xref/locate_module.c.html, xref/main.c.html, xref/utility.c.html, xref/version.c.html: Updated the xref html, but not current. * lib/Makefile, lib/Makefile.in, lib/uvec.h, lib/uvec.man, lib/uvec/uvec_copy_str.c, lib/uvec/uvec_copy_vec.c, lib/uvec/uvec_strfns.c: Changed how uvec sets/gets the uvec_strfns. 2002-07-29 rkowen * lib/Makefile.am, lib/list.h, lib/list.man, lib/list/.cvsignore, lib/list/list_.c, lib/list/list_.h, lib/list/list_append.c, lib/list/list_ctor.c, lib/list/list_delete.c, lib/list/list_dtor.c, lib/list/list_exists.c, lib/list/list_first.c, lib/list/list_insert.c, lib/list/list_last.c, lib/list/list_number.c, lib/list/list_pop.c, lib/list/list_push.c, lib/list/list_qsort.c, lib/list/list_shift.c, lib/list/list_sizeof.c, lib/list/list_swap.c, lib/list/list_unshift.c: Added the list object for doubly linked lists. 2002-07-18 rkowen * lib/Makefile, lib/Makefile.am, lib/aclocal.m4, lib/configure, lib/configure.ac, lib/tests/.cvsignore, lib/tests/Makefile.am, lib/tests/Makefile.in: Adding in the automake/autoconf files for the modules library. * lib/strmalloc.c, lib/strmalloc.h, lib/strmalloc.man, lib/tests/tstrmalloc.c: Added the strmalloc code to the modules library, this will be useful for creating new strings with aliases expanded. * lib/.cvsignore, lib/tests/tuvec.c, lib/uvec.h, lib/uvec.man, lib/uvec/.cvsignore, lib/uvec/str2uvec.c, lib/uvec/uvec2str.c, lib/uvec/uvec2uvec.c, lib/uvec/uvec_accessor.c, lib/uvec/uvec_add.c, lib/uvec/uvec_alloc.c, lib/uvec/uvec_close.c, lib/uvec/uvec_copy.c, lib/uvec/uvec_copy_str.c, lib/uvec/uvec_copy_vec.c, lib/uvec/uvec_count_tok.c, lib/uvec/uvec_ctor.c, lib/uvec/uvec_dealloc.c, lib/uvec/uvec_dtor.c, lib/uvec/uvec_init.c, lib/uvec/uvec_insert.c, lib/uvec/uvec_push.c, lib/uvec/uvec_randomize.c, lib/uvec/uvec_reverse.c, lib/uvec/uvec_shift.c, lib/uvec/uvec_sort.c, lib/uvec/uvec_strfns.c, lib/uvec/vec2uvec.c: Added the uvec code, which provides basic unix vector capabilities. A unix vector is a NULL terminated array of char * strings. An example of this is *argv[] or *environ[]. * lib/isqrt.h, lib/isqrt.man, lib/isqrt/.cvsignore, lib/isqrt/chsqrt.c, lib/isqrt/hsqrt.c, lib/isqrt/isqrt.c, lib/isqrt/isqrt_.h, lib/isqrt/isqrt_lut.c, lib/isqrt/lsqrt.c, lib/isqrt/scsqrt.c, lib/isqrt/ucsrt.c, lib/isqrt/uhsqrt.c, lib/isqrt/uisqrt.c, lib/isqrt/ulsqrt.c, lib/tests/tisqrt.c: Adding in the isqrt code to the modules library, this is needed by iprime (which is needed by avec). * lib/iprime.h, lib/iprime.man, lib/iprime/.cvsignore, lib/iprime/chprime.c, lib/iprime/hprime.c, lib/iprime/iprime.c, lib/iprime/iprime_.h, lib/iprime/iprime_lut.c, lib/iprime/lprime.c, lib/iprime/scprime.c, lib/iprime/ucprime.c, lib/iprime/uhprime.c, lib/iprime/uiprime.c, lib/iprime/ulprime.c, lib/tests/tiprime.c: Added the iprime code to the modules library. This is needed by avec to compute the optimal hash size. * lib/avec.h, lib/avec.man, lib/avec/.cvsignore, lib/avec/avec_.c, lib/avec/avec_.h, lib/avec/avec_accessor.c, lib/avec/avec_alloc.c, lib/avec/avec_close.c, lib/avec/avec_ctor.c, lib/avec/avec_dealloc.c, lib/avec/avec_decrease.c, lib/avec/avec_delete.c, lib/avec/avec_dtor.c, lib/avec/avec_increase.c, lib/avec/avec_init.c, lib/avec/avec_insert.c, lib/avec/avec_keys.c, lib/avec/avec_lookup.c, lib/avec/avec_remove.c, lib/avec/avec_resize.c, lib/avec/avec_resize_percentage.c, lib/avec/avec_set_fns.c, lib/avec/avec_values.c, lib/avec/avec_walk.c, lib/avec/avec_walk_r.c, lib/tests/tavec.c: Added an associative vector object to the modules library. 2002-06-17 rkowen * RKOConfigure, locate_module.c: Minor changes in preparation for big ones. * ChangeLog, ModuleCmd_Avail.c, ModuleCmd_Update.c, ModuleCmd_Use.c, config.h.in, configure, configure.ac, doc/module.1.in, error.c, init.c, main.c, modules_def.h, testsuite/config/unix.exp, testsuite/modules.00-init/006-procs.exp, testsuite/modules.00-init/080-begenv.exp, testsuite/modules.70-maint/020-update.exp: * Made the .modulesbeginenv facility optional (default is not to have it) * default for cache is now "no" * Added version_test() to testsuite to make some of the tests conditional on the values generated by --version. - the configure options help is formatted with AC_HELP_STRING 2002-06-14 rkowen * .cvsignore, ChangeLog, Makefile.am, Makefile.in, config.h.in, config/compile, configure, configure.ac, doc/Makefile.in, etc/.cvsignore, etc/Makefile.am, etc/Makefile.in, ext/.cvsignore, ext/Makefile.am, ext/Makefile.in, init/Makefile.am, init/Makefile.in, init/filter, init/zsh.in, modulefiles/Makefile.am, modulefiles/Makefile.in, testsuite/etc/.cvsignore: * Reworked every configure-based file - uses automake to generate most of the Makefile.in - renamed configure.in to configure.ac per autoconf - Versioning is optional now with a configure option - reworked the init scripts for versioning or not - eliminated acconfig.h and put templates in configure.ac - make install now honors the DESTDIR variable for package builds - honors bindir for modulecmd location (but the init scripts are only correct if no versioning) * Collected the usage info and now it can be displayed with the --help or -H option (same as help) * --version now gives most of the optional configure parameters for easy debugging of problems * Fixed bootstrap to just source the appropriate init script * Makefile.am, Makefile.in, acconfig.h, config.h.in, configure, configure.ac, etc/Makefile.am, etc/Makefile.in, etc/add.modules.in, etc/global/bashrc.in, etc/global/csh.cshrc.in, etc/skel/.cshrc.in, etc/skel/.kshenv.in, ext/Makefile.am, ext/Makefile.in, ext/add.ext.in, ext/common/.cshrc.in, ext/common/.kshenv.in, init/.modulespath.in, init/bash.in, init/csh.in, init/ksh.in, init/perl.in, init/python.in, init/sh.in, init/zsh.in: Removed the acconfig.h file since it's essentially in the configure.ac now. Reworked all the init,skel,add.* files to handle versioning or no. Added Makefile.am to ./etc/ and ./ext/ for cleaner installs. 2002-06-13 rkowen * Makefile.am, Makefile.in, ModuleCmd_Help.c, acconfig.h, config.h.in, doc/module.1.in, main.c, modules_def.h, testsuite/modules.00-init/015-version.exp: The version info displays some of the configuration options. Moved the usage info into module_usage() that can be displayed with the --help or -H switch. * Makefile.am, Makefile.in, ModuleCmd_Whatis.c, acconfig.h, config.h.in, configure, configure.ac, main.c: Renamed INSTPATH to PREFIX and is no longer passed as a compiler -D argument, but is now entered directly into the config.h header. 2002-06-12 rkowen * Makefile.am, Makefile.in, ModuleCmd_Bootstrap.c, init.c, main.c, modules_def.h, utility.c: Converted the configure scripts over to automake,autoconf generation. Modified "module bootstrap" to source the init files. Put the shell properties and moved set_derelict and renamed it set_shell_properties into init.c . Created a matrix of shell properties { name, derelict, init, cmd separator }. * testsuite/etc/apropos.cache, testsuite/modules.50-cmds/095-uname.exp: Fixed test syntax - it didn't like "dangling" ('s and )'s in regexp string. Just escaped them. Removed apropos.cache - it gets regenerated with each test. * ModuleCmd_Switch.c, testsuite/modules.50-cmds/170-swap.exp: Fixed up "module switch" one argument form (use stringer alloc) and added more tests (one for each of the major shells). 2002-06-11 rkowen * acconfig.h, config.h.in, configure, configure.ac: Added MODULES_INIT_DIR to the configure files. 2002-06-10 rkowen * Makefile.am, Makefile.in, ModuleCmd_Bootstrap.c, acconfig.h, acinclude.m4, aclocal.m4, config.h.in, configure, configure.ac: Upgraded the auto-configuration to use automake/1.6 and autoconf/2.53 to auto-generate some of the files. * init/bash.in, init/csh.in, init/ksh.in, init/perl.in, init/sh.in, init/zsh.in: Re-introduced the init files with versioning. * config/depcomp, config/install-sh, config/install.sh, config/missing, config/mkinstalldirs: Upgraded install scripts to automake/1.6 autoconf/2.53 standards. 2002-06-06 rkowen * configure.ac, configure.in: configure.ac is actually the continuation of configure.in. do "cvs log configure.in" for a history. ---------------------------- revision 1.11 (of configure.in) date: 2002/04/29 21:16:48; author: rkowen; state: Exp; lines: +145 -116 * Upgraded configure.in to autoconf 2.52. * Changed the configure to search for libTcl.sh to acquire all it's necessary Tcl env.vars from it. 2002-05-06 rkowen * .cvsignore, doc/.cvsignore, etc/.cvsignore, etc/global/.cvsignore, etc/skel/.cvsignore, ext/.cvsignore, ext/common/.cvsignore, init/.cvsignore, modulefiles/.cvsignore, testsuite/.cvsignore: Added a bunch of .cvsignore files to avoid CVS in listing the known (but made) files. 2002-05-03 rkowen * testsuite/modulefiles/eschars/1.0, testsuite/modules.35-trace/010-init_ts.exp, testsuite/modules.35-trace/030-all-on.exp, testsuite/modules.35-trace/031-all-off.exp, testsuite/modules.35-trace/040-load-all.exp, testsuite/modules.35-trace/041-load-all.exp, testsuite/modules.35-trace/042-load-on.exp, testsuite/modules.35-trace/043-load-onoff.exp, testsuite/modules.35-trace/044-load-ovr.exp, testsuite/modules.35-trace/050-disp-onoff.exp, testsuite/modules.35-trace/060-dilo-onoff.exp, testsuite/modules.35-trace/070-colon.exp, testsuite/modules.50-cmds/022-setenv-eschars.exp, testsuite/modules.50-cmds/095-uname.exp, testsuite/modules.50-cmds/120-prereq-full.exp, testsuite/modules.50-cmds/121-prereq-module.exp, utility.c: Added EscapePerlString to utility.c, added '*' to list of csh special chars. Fixed up tests to reflect these changes. Added testsuite/modules.50-cmds/022-setenv-eschars.exp to test out escaping special chars. 2002-04-30 rkowen * install.sh, version.c: Moved install.sh to config/ and updated the version to 3.2.0a . 2002-04-29 rkowen * ChangeLog, Makefile.in, ModuleCmd_Avail.c, ModuleCmd_Init.c, ModuleCmd_Load.c, ModuleCmd_Purge.c, ModuleCmd_Switch.c, ModuleCmd_Update.c, ModuleCmd_Whatis.c, aclocal.m4, cmdConflict.c, cmdLog.c, cmdModule.c, cmdPath.c, cmdTrace.c, cmdVersion.c, cmdXResource.c, config/install.sh, config/tcl.m4, configure.in, error.c, init.c, locate_module.c, main.c, modules_def.h, utility.c: * Upgraded configure.in to autoconf 2.52. * Changed the configure to search for libTcl.sh to acquire all it's necessary Tcl env.vars from it. * created a utility function stringer() to handle most of the strcpy/strcat operations and to automatically allocate string memory. * Mostly changed the memory malloc/free to use stringer/null_free. * rewrote some of the code logic to have a single point of exit with unwinding of memory allocations. 2002-04-29 lakata * ModuleCmd_Bootstrap.c, config.h.in, configure, configure.in: added PREFIX to config.h and propagated to bootstrap code as MODULESHOME * ModuleCmd_Bootstrap.c, ModuleCmd_Switch.c, error.c, modules_def.h: added support for 1-arg form of "swap/switch" command 2002-04-27 lakata * ChangeLog, Makefile.in, ModuleCmd_Bootstrap.c, cmdModule.c, cmdTrace.c, config.h.in, doc/module.1.in, init/bash.in, init/csh.in, init/ksh.in, init/perl.in, init/sh.in, init/zsh.in, main.c, modules_def.h, utility.c: added the bootstrap command 2002-04-24 lakata * config.h.in, configure, configure.in: added TMP_DIR define * testsuite/modules.00-init/080-begenv.exp, testsuite/modules.10-use/030-use.exp, testsuite/modules.10-use/031-append.exp, testsuite/modules.10-use/070-unuse.exp, testsuite/modules.20-locate/040-alias.exp, testsuite/modules.20-locate/045-symvers.exp, testsuite/modules.20-locate/046-getsym.exp, testsuite/modules.20-locate/047-symerrs.exp, testsuite/modules.20-locate/048-symexec.exp, testsuite/modules.20-locate/050-locrc.exp, testsuite/modules.20-locate/060-rc.exp, testsuite/modules.20-locate/070-homerc.exp, testsuite/modules.30-userlvl/040-advanced.exp, testsuite/modules.30-userlvl/045-adv.exp, testsuite/modules.30-userlvl/050-expert.exp, testsuite/modules.30-userlvl/055-exp.exp, testsuite/modules.35-trace/010-init_ts.exp, testsuite/modules.35-trace/020-default.exp, testsuite/modules.35-trace/030-all-on.exp, testsuite/modules.35-trace/031-all-off.exp, testsuite/modules.35-trace/040-load-all.exp, testsuite/modules.35-trace/041-load-all.exp, testsuite/modules.35-trace/042-load-on.exp, testsuite/modules.35-trace/043-load-onoff.exp, testsuite/modules.35-trace/044-load-ovr.exp, testsuite/modules.35-trace/050-disp-onoff.exp, testsuite/modules.35-trace/060-dilo-onoff.exp, testsuite/modules.35-trace/070-colon.exp, testsuite/modules.35-trace/095-cleanup.exp, testsuite/modules.50-cmds/015-use.exp, testsuite/modules.50-cmds/017-use-undo.exp, testsuite/modules.50-cmds/020-setenv.exp, testsuite/modules.50-cmds/030-unsetenv.exp, testsuite/modules.50-cmds/035-unsetenv-undo.exp, testsuite/modules.50-cmds/036-unsetenv-x.exp, testsuite/modules.50-cmds/040-append.exp, testsuite/modules.50-cmds/045-append-undo.exp, testsuite/modules.50-cmds/050-prepend.exp, testsuite/modules.50-cmds/055-prepend-undo.exp, testsuite/modules.50-cmds/060-remove.exp, testsuite/modules.50-cmds/065-remove-undo.exp, testsuite/modules.50-cmds/075-alias.exp, testsuite/modules.50-cmds/077-alias-undo.exp, testsuite/modules.50-cmds/080-info-name.exp, testsuite/modules.50-cmds/081-info-user.exp, testsuite/modules.50-cmds/082-info-user-exp.exp, testsuite/modules.50-cmds/083-info-mode.exp, testsuite/modules.50-cmds/084-info-mode-exp.exp, testsuite/modules.50-cmds/085-info-flags.exp, testsuite/modules.50-cmds/086-info-shells.exp, testsuite/modules.50-cmds/087-info-shells-exp.exp, testsuite/modules.50-cmds/088-info-isloaded.exp, testsuite/modules.50-cmds/095-uname.exp, testsuite/modules.50-cmds/101-badfac.exp, testsuite/modules.50-cmds/110-verbose.exp, testsuite/modules.50-cmds/115-verbose-msg.exp, testsuite/modules.50-cmds/120-prereq-full.exp, testsuite/modules.50-cmds/121-prereq-module.exp, testsuite/modules.50-cmds/130-conflict-full.exp, testsuite/modules.50-cmds/131-conflict-module.exp, testsuite/modules.50-cmds/140-system.exp, testsuite/modules.50-cmds/150-module.exp, testsuite/modules.50-cmds/170-swap.exp, testsuite/modules.50-cmds/190-load.exp, testsuite/modules.50-cmds/200-break.exp, testsuite/modules.70-maint/020-update.exp, testsuite/modules.70-maint/050-whatis-load.exp, testsuite/modules.95-version/020-load.exp, testsuite/modules.95-version/020-unload.exp, testsuite/modules.95-version/022-load2.exp, testsuite/modules.95-version/022-unload2.exp, testsuite/modules.95-version/040-xgetenv.exp: changed tests to match new syntax for setting env vars. rather than quoting, special characters are escaped 2002-03-11 lakata * aclocal.m4, configure, configure.in: more TCL smarts, if tclsh does not exist on path * testsuite/modules.00-init/015-version.exp.in, testsuite/modules.50-cmds/100-loglevel.exp.in: removed *.in versions (configure processed) * testsuite/modules.00-init/015-version.exp, testsuite/modules.50-cmds/100-loglevel.exp: renamed from *.in versions (configure processed) * testsuite/config/unix.exp, testsuite/modulefiles/system/2.0, testsuite/modulefiles/use/1.0, testsuite/modulefiles/use/1.0.in, testsuite/modulefiles/use/2.0, testsuite/modulefiles/use/2.0.in, testsuite/modulefiles/use/2.1, testsuite/modulefiles/use/2.1.in, testsuite/modulefiles/use/2.2, testsuite/modulefiles/use/2.2.in, testsuite/modules.00-init/010-environ.exp, testsuite/modules.00-init/015-version.exp.in, testsuite/modules.00-init/050-modpath.exp, testsuite/modules.00-init/080-begenv.exp, testsuite/modules.10-use/030-use.exp, testsuite/modules.10-use/031-append.exp, testsuite/modules.10-use/070-unuse.exp, testsuite/modules.20-locate/060-rc.exp, testsuite/modules.20-locate/065-rcerrs.exp, testsuite/modules.20-locate/070-homerc.exp, testsuite/modules.50-cmds/015-use.exp, testsuite/modules.50-cmds/017-use-undo.exp, testsuite/modules.70-maint/010-init_ts.exp, testsuite/modules.70-maint/020-update.exp, testsuite/modules.70-maint/070-display.exp, testsuite/modules.95-version/010-init_ts.exp: (a) updated testsuite by centering source on TESTSUITEDIR, rather than rely on "pwd" or relative paths, which prohibit running the testsuite from a different dir (b) removed autoconf/configure processing of testsuite 2002-01-04 rkowen * ChangeLog, ModuleCmd_Load.c, PROBLEMS, RKOConfigure, doc/modulefile.4.in, init.c, testsuite/modulefiles/break/1.0, testsuite/modulefiles/break/2.0, testsuite/modulefiles/break/3.0, testsuite/modules.50-cmds/200-break.exp: * A 'break' in a modulefile will cause the modulefile to not be added to $LOADEDMODULES, but will be considered a successful execution to not affect other modulefiles being loaded concurrently (Patch due to Scott Gaskins). * Tests and docs added for the above. 2001-11-05 rkowen * ChangeLog, Makefile.in, PROBLEMS, RKOConfigure, configure, configure.in, doc/Modules-Paper.pdf, locate_module.c, probetcl, testsuite/modules.50-cmds/190-load.exp, version.c: * Fixed problem with module load when the full path is given (patch due to Scott Gaskins). * Added tests for the above problem. * Added the Modules-Paper in PDF format (thanks to Philip Kearns and Leo Butler for raising the issue). * Modified probetcl to avoid using the -c option (patch due to Philip Kearns). * Modified probetcl to use tclsh first then tcl * Added TCL_VERSION to configure and use it in the Makefile to use the -ltcl@TCL_VERSION@ library. 2001-08-18 rkowen * ChangeLog, version.c: Release 3.1.5 2001-08-17 rkowen * ChangeLog, ModuleCmd_Load.c, cmdPath.c, version.c: * Fixed up cmdPath to remove individual items from a path (patch due to Eric Stanley). 2001-08-03 rkowen * .ftp, Makefile.in, version.c: Minor fixes for distribution uploading. * .spec.in, ChangeLog, Makefile.in, version.c: * Added bz2 files to distribution mix. 2001-07-26 rkowen * ChangeLog, cmdPath.c, testsuite/modulefiles/info/isloaded, testsuite/modulefiles/loc_dv1/1.0, testsuite/modulefiles/loc_dv1/2.0, testsuite/modules.50-cmds/088-info-isloaded.exp, testsuite/modules.50-cmds/170-swap.exp, version.c: * Fixed "module swap" to put the substituted module in the same path location as the old. Also added a number of tests for this feature. (Bug was pointed out by Leo Butler ) * Added tests for the "is-loaded" modulefile command introduced back in 3.0.8-rko. 2001-07-16 rkowen * INSTALL.RH7x, etc/global/bashrc.in, etc/global/profile.in: Fixed some embarrassing typos and editting mistakes. 2001-07-11 rkowen * testsuite/modulefiles/versions/1.1, testsuite/modulefiles/versions/1.2, testsuite/modulefiles/versions/1.3: More test stragglers for 3.1.3 * testsuite/modulefiles.other/1.1/version, testsuite/modulefiles.other/1.2/version, testsuite/modulefiles.other/1.3/version, testsuite/modulefiles/unsetenv/0.9: Forgot some straggler test files for 3.1.3 * ChangeLog, README.perl, configure, configure.in, modulefiles/Makefile.in, modulefiles/module-cvs.in, modulefiles/modules.in, modulefiles/use.own.in, testsuite/modules.50-cmds/017-use-undo.exp, version.c, xref/ModuleCmd_Use.c.html, xref/cxref.function: * Added module-cvs modulefile for easy CVS/ftp access to the modules CVS repository. * Added README.perl describing Ron Isaacson's Env::Modulecmd perl module (Ron.Isaacson@morganstanley.com). * Added further tests for modulefile "module use dir_path" * Fixed bug of unloading a modulefile with a "module use dir_path" 2001-07-09 rkowen * ChangeLog, INSTALL, INSTALL.RH7x, ModuleCmd_Use.c, cmdPath.c, cmdSetenv.c, configure, configure.in, doc/modulefile.4.in, etc/Makefile.in, etc/global/bashrc.in, etc/global/csh.cshrc.in, etc/global/csh.login.in, etc/global/csh.modules.in, etc/global/profile.in, etc/global/profile.modules.in, etc/skel/.kshenv.in, etc/skel/.profile.in, modulefiles/use.own.in, modulefiles/version.in, testsuite/modulefiles/use/.version, testsuite/modulefiles/use/1.0.in, testsuite/modulefiles/use/2.0.in, testsuite/modulefiles/use/2.1.in, testsuite/modulefiles/use/2.2.in, testsuite/modules.00-init/080-begenv.exp, testsuite/modules.10-use/030-use.exp, testsuite/modules.10-use/031-append.exp, testsuite/modules.10-use/070-unuse.exp, testsuite/modules.20-locate/040-alias.exp, testsuite/modules.20-locate/045-symvers.exp, testsuite/modules.20-locate/046-getsym.exp, testsuite/modules.20-locate/047-symerrs.exp, testsuite/modules.20-locate/048-symexec.exp, testsuite/modules.20-locate/050-locrc.exp, testsuite/modules.20-locate/060-rc.exp, testsuite/modules.20-locate/070-homerc.exp, testsuite/modules.30-userlvl/030-novice.exp, testsuite/modules.30-userlvl/035-nov.exp, testsuite/modules.30-userlvl/040-advanced.exp, testsuite/modules.30-userlvl/045-adv.exp, testsuite/modules.30-userlvl/050-expert.exp, testsuite/modules.30-userlvl/055-exp.exp, testsuite/modules.30-userlvl/090-undef.exp, testsuite/modules.35-trace/020-default.exp, testsuite/modules.35-trace/030-all-on.exp, testsuite/modules.35-trace/031-all-off.exp, testsuite/modules.35-trace/040-load-all.exp, testsuite/modules.35-trace/041-load-all.exp, testsuite/modules.35-trace/042-load-on.exp, testsuite/modules.35-trace/043-load-onoff.exp, testsuite/modules.35-trace/044-load-ovr.exp, testsuite/modules.35-trace/050-disp-onoff.exp, testsuite/modules.35-trace/060-dilo-onoff.exp, testsuite/modules.35-trace/070-colon.exp, testsuite/modules.50-cmds/010-init_ts.exp, testsuite/modules.50-cmds/015-use.exp, testsuite/modules.50-cmds/020-setenv.exp, testsuite/modules.50-cmds/025-setenv-undo.exp, testsuite/modules.50-cmds/030-unsetenv.exp, testsuite/modules.50-cmds/035-unsetenv-undo.exp, testsuite/modules.50-cmds/036-unsetenv-x.exp, testsuite/modules.50-cmds/040-append.exp, testsuite/modules.50-cmds/045-append-undo.exp, testsuite/modules.50-cmds/050-prepend.exp, testsuite/modules.50-cmds/055-prepend-undo.exp, testsuite/modules.50-cmds/060-remove.exp, testsuite/modules.50-cmds/065-remove-undo.exp, testsuite/modules.50-cmds/075-alias.exp, testsuite/modules.50-cmds/080-info-name.exp, testsuite/modules.50-cmds/081-info-user.exp, testsuite/modules.50-cmds/082-info-user-exp.exp, testsuite/modules.50-cmds/083-info-mode.exp, testsuite/modules.50-cmds/084-info-mode-exp.exp, testsuite/modules.50-cmds/085-info-flags.exp, testsuite/modules.50-cmds/086-info-shells.exp, testsuite/modules.50-cmds/087-info-shells-exp.exp, testsuite/modules.50-cmds/095-uname.exp, testsuite/modules.50-cmds/101-badfac.exp, testsuite/modules.50-cmds/110-verbose.exp, testsuite/modules.50-cmds/115-verbose-msg.exp, testsuite/modules.50-cmds/120-prereq-full.exp, testsuite/modules.50-cmds/121-prereq-module.exp, testsuite/modules.50-cmds/130-conflict-full.exp, testsuite/modules.50-cmds/131-conflict-module.exp, testsuite/modules.50-cmds/140-system.exp, testsuite/modules.50-cmds/150-module.exp, testsuite/modules.70-maint/020-update.exp, testsuite/modules.70-maint/050-whatis-load.exp, testsuite/modules.90-avail/040-wild.exp, testsuite/modules.95-version/010-init_ts.exp, testsuite/modules.95-version/020-load.exp, testsuite/modules.95-version/020-unload.exp, testsuite/modules.95-version/022-load2.exp, testsuite/modules.95-version/022-unload2.exp, testsuite/modules.95-version/040-xgetenv.exp, testsuite/modules.95-version/999-cleanup.exp, utility.c, version.c: * Added document file INSTALL.RH7x which explains how to set up an modules environment for all users through the system shell files. Is specific to Linux/RedHat 7.x, but is of general applicability. * Added further tests for modulefile "module use dir_path" (found an unload bug that will be fixed before release) * Environment variable contents are now quoted to preserve any embedded environment variables. (Needed for versioning) * Added over 50 tests specific to module versioning, and testing xgetenv. * Fixed the unsetenv on unload function, the feature added in 3.0.6-rko was supposed to set the env.var. to the optional third argument. This was to allow old env.var. values to be recovered by unraveling a stack set in an other env.var. Added tests for this feature. This is used by the version modulefile. * Fixed and updated the version modulefile to allow stacked versions to be removed the stack. * Removed an annoying spurious stderr newline. 2001-06-10 rkowen * Makefile.in, testsuite/modulefiles.other/README: Fixed the way a distribution tar ball is made. It makes only one CVS connection instead of one per file. 2001-06-09 rkowen * ChangeLog, Makefile.in, ModuleCmd_Avail.c, ModuleCmd_Display.c, ModuleCmd_Help.c, ModuleCmd_Init.c, ModuleCmd_Load.c, ModuleCmd_Switch.c, ModuleCmd_Use.c, ModuleCmd_Whatis.c, cmdAlias.c, cmdConflict.c, cmdInfo.c, cmdIsLoaded.c, cmdLog.c, cmdMisc.c, cmdModule.c, cmdPath.c, cmdSetenv.c, cmdTrace.c, cmdUlvl.c, cmdVerbose.c, cmdVersion.c, cmdWhatis.c, cmdXResource.c, doc/module.1.in, error.c, getopt.c, locate_module.c, main.c, modules.lsm.in, modules_def.h, testsuite/modules.10-use/030-use.exp, testsuite/modules.10-use/031-append.exp, testsuite/modules.10-use/070-unuse.exp, utility.c, version.c, xref/ModuleCmd_Avail.c.html, xref/ModuleCmd_Display.c.html, xref/ModuleCmd_Help.c.html, xref/ModuleCmd_Init.c.html, xref/ModuleCmd_Load.c.html, xref/ModuleCmd_Switch.c.html, xref/ModuleCmd_Use.c.html, xref/ModuleCmd_Whatis.c.html, xref/cmdAlias.c.html, xref/cmdConflict.c.html, xref/cmdInfo.c.html, xref/cmdIsLoaded.c.html, xref/cmdLog.c.html, xref/cmdMisc.c.html, xref/cmdModule.c.html, xref/cmdPath.c.html, xref/cmdSetenv.c.html, xref/cmdTrace.c.html, xref/cmdUlvl.c.html, xref/cmdVerbose.c.html, xref/cmdVersion.c.html, xref/cmdWhatis.c.html, xref/cmdXResource.c.html, xref/cxref.apdx.html, xref/cxref.function, xref/cxref.variable, xref/error.c.html, xref/init.c.html, xref/locate_module.c.html, xref/main.c.html, xref/utility.c.html: * Fixed the "module use --append" feature, and fixed the tests for "module use", "module use --append", and "module unuse". * Changed the global variable names (flags,current_module) to (g_flags, g_current_module) to identify their ubiquity in the module source. 2001-01-16 rminsk * init/Makefile.in, init/python.in: Fixing typeo's * init/Makefile.in, init/python.in: Adding python init files. 2000-11-03 rk * ChangeLog, INSTALL, cmdModule.c: * Fixed the changed *interpter->result return value with Tcl8.3+ (patch due to Jens Hamisch). And some document changes. 2000-06-28 rk * ChangeLog, Makefile.in, ModuleCmd_Load.c, README, ccc.h.in, xref/ModuleCmd_Avail.c.html, xref/ModuleCmd_Clear.c.html, xref/ModuleCmd_Display.c.html, xref/ModuleCmd_Help.c.html, xref/ModuleCmd_Init.c.html, xref/ModuleCmd_List.c.html, xref/ModuleCmd_Load.c.html, xref/ModuleCmd_Purge.c.html, xref/ModuleCmd_Switch.c.html, xref/ModuleCmd_Update.c.html, xref/ModuleCmd_Use.c.html, xref/ModuleCmd_Whatis.c.html, xref/cmdAlias.c.html, xref/cmdConflict.c.html, xref/cmdInfo.c.html, xref/cmdIsLoaded.c.html, xref/cmdLog.c.html, xref/cmdMisc.c.html, xref/cmdModule.c.html, xref/cmdPath.c.html, xref/cmdSetenv.c.html, xref/cmdTrace.c.html, xref/cmdUlvl.c.html, xref/cmdUname.c.html, xref/cmdVerbose.c.html, xref/cmdVersion.c.html, xref/cmdWhatis.c.html, xref/cmdXResource.c.html, xref/error.c.html, xref/init.c.html, xref/locate_module.c.html, xref/main.c.html, xref/utility.c.html: * Removed warning message for unloading a module that's not loaded. * Added source code cross-referencing via cxref-1.5b(patched) * .cxref, Makefile.in, xref/ModuleCmd_Avail.c.html, xref/ModuleCmd_Clear.c.html, xref/ModuleCmd_Display.c.html, xref/ModuleCmd_Help.c.html, xref/ModuleCmd_Init.c.html, xref/ModuleCmd_List.c.html, xref/ModuleCmd_Load.c.html, xref/ModuleCmd_Purge.c.html, xref/ModuleCmd_Switch.c.html, xref/ModuleCmd_Update.c.html, xref/ModuleCmd_Use.c.html, xref/ModuleCmd_Whatis.c.html, xref/cmdAlias.c.html, xref/cmdConflict.c.html, xref/cmdInfo.c.html, xref/cmdIsLoaded.c.html, xref/cmdLog.c.html, xref/cmdMisc.c.html, xref/cmdModule.c.html, xref/cmdPath.c.html, xref/cmdSetenv.c.html, xref/cmdTrace.c.html, xref/cmdUlvl.c.html, xref/cmdUname.c.html, xref/cmdVerbose.c.html, xref/cmdVersion.c.html, xref/cmdWhatis.c.html, xref/cmdXResource.c.html, xref/cxref.apdx.html, xref/cxref.function, xref/cxref.html, xref/cxref.include, xref/cxref.typedef, xref/cxref.variable, xref/error.c.html, xref/getopt.c.html, xref/index.html, xref/init.c.html, xref/locate_module.c.html, xref/main.c.html, xref/utility.c.html, xref/version.c.html: Added cxref-1.5b(patched) generated HTML files showing the source code cross-referencing relations. * Makefile.in, configure, configure.in, version.c: Minor updates. * .cxref, .ftp, .spec.in, ChangeLog, INSTALL, LICENSE.GPL, MACHINES, Makefile.in, ModuleCmd_Avail.c, ModuleCmd_Clear.c, ModuleCmd_Display.c, ModuleCmd_Help.c, ModuleCmd_Init.c, ModuleCmd_List.c, ModuleCmd_Load.c, ModuleCmd_Purge.c, ModuleCmd_Switch.c, ModuleCmd_Update.c, ModuleCmd_Use.c, ModuleCmd_Whatis.c, PROBLEMS, README, RKOConfigure, TODO, acconfig.h, aclocal.m4, ccc.h.in, cmdAlias.c, cmdConflict.c, cmdInfo.c, cmdIsLoaded.c, cmdLog.c, cmdMisc.c, cmdModule.c, cmdPath.c, cmdSetenv.c, cmdTrace.c, cmdUlvl.c, cmdUname.c, cmdVerbose.c, cmdVersion.c, cmdWhatis.c, cmdXResource.c, config.h.in, configure, configure.in, doc/Makefile.in, doc/Modules-Paper.doc, doc/module.1.in, doc/modulefile.4.in, error.c, etc/Makefile.in, etc/README, etc/add.modules.in, etc/global/csh.login.in, etc/global/csh.modules.in, etc/global/profile.in, etc/global/profile.modules.in, etc/mkroot.in, etc/skel/.cshrc.in, etc/skel/.kshenv.in, etc/skel/.login.in, etc/skel/.profile.in, ext/Makefile.in, ext/README, ext/add.ext.in, ext/common/.cshrc.in, ext/common/.kshenv.in, ext/common/.login.in, ext/common/.profile.in, ext/mkroot.in, ext/skel/.cshrc.ext, ext/skel/.kshenv.ext, ext/skel/.login.ext, ext/skel/.modules, ext/skel/.profile.ext, getopt.c, getopt.h, init.c, init/.modulespath.in, init/Makefile.in, init/bash.in, init/csh.in, init/ksh.in, init/perl.in, init/sh.in, init/tcsh.in, init/zsh.in, install.sh, locate_module.c, main.c, modulefiles/Makefile.in, modulefiles/dot.in, modulefiles/module-info.in, modulefiles/modules.in, modulefiles/null.in, modulefiles/use.own.in, modulefiles/version.in, modules.lsm.in, modules_def.h, probetcl, stripmkf, testsuite/config/unix.exp, testsuite/etc/apropos.cache, testsuite/etc/bad, testsuite/etc/empty, testsuite/etc/rc, testsuite/home/.modulerc, testsuite/modulefiles/.moduleavailcache, testsuite/modulefiles/.moduleavailcache.202, testsuite/modulefiles/.moduleavailcachedir, testsuite/modulefiles/.moduleavailcachedir.202, testsuite/modulefiles/README, testsuite/modulefiles/alias/2.0, testsuite/modulefiles/append/2.0, testsuite/modulefiles/conflict/full, testsuite/modulefiles/conflict/module, testsuite/modulefiles/empty/1.0, testsuite/modulefiles/help/2.0, testsuite/modulefiles/info/mode1, testsuite/modulefiles/info/mode2, testsuite/modulefiles/info/mode3, testsuite/modulefiles/info/mode4, testsuite/modulefiles/info/mode5, testsuite/modulefiles/info/mode6, testsuite/modulefiles/info/name, testsuite/modulefiles/info/shells, testsuite/modulefiles/info/shellsexp, testsuite/modulefiles/info/user, testsuite/modulefiles/info/userexp, testsuite/modulefiles/loc_dv1/1.0, testsuite/modulefiles/loc_dv1/2.0, testsuite/modulefiles/loc_dv1/3.0, testsuite/modulefiles/loc_dv2/.version, testsuite/modulefiles/loc_dv2/1.0, testsuite/modulefiles/loc_dv2/2.0, testsuite/modulefiles/loc_dv3/.version, testsuite/modulefiles/loc_dv3/1.0, testsuite/modulefiles/loc_dv3/2.0, testsuite/modulefiles/loc_dv4/.version, testsuite/modulefiles/loc_dv4/1.0, testsuite/modulefiles/loc_dv4/2.0, testsuite/modulefiles/loc_dv6/1.0, testsuite/modulefiles/loc_dv6/2.0/1.0, testsuite/modulefiles/loc_dv7/.version, testsuite/modulefiles/loc_dv7/1.0, testsuite/modulefiles/loc_dv7/2.0/1.0, testsuite/modulefiles/loc_dv7/3.0, testsuite/modulefiles/loc_dv8/.version, testsuite/modulefiles/loc_dv8/1.0, testsuite/modulefiles/loc_dv8/2.0, testsuite/modulefiles/loc_fq/1.0, testsuite/modulefiles/loc_fq/2.0, testsuite/modulefiles/loc_rc1/.modulerc, testsuite/modulefiles/loc_rc1/1.0, testsuite/modulefiles/loc_rc1/2.0, testsuite/modulefiles/loc_rc2/.modulerc, testsuite/modulefiles/loc_rc2/1.0, testsuite/modulefiles/loc_rc2/2.0, testsuite/modulefiles/loc_rc3/.modulerc, testsuite/modulefiles/loc_rc3/1.0, testsuite/modulefiles/loc_rc3/2.0, testsuite/modulefiles/loc_rc3/3.0, testsuite/modulefiles/loc_rc4/.modulerc, testsuite/modulefiles/loc_rc4/.version, testsuite/modulefiles/loc_rc4/1.0, testsuite/modulefiles/loc_rc4/2.0, testsuite/modulefiles/loc_rc4/3.0, testsuite/modulefiles/loc_rc5/.modulerc, testsuite/modulefiles/loc_rc5/1.0, testsuite/modulefiles/loc_rc5/2.0, testsuite/modulefiles/loc_sym/1.0, testsuite/modulefiles/loc_sym/alias1, testsuite/modulefiles/loc_sym/alias2, testsuite/modulefiles/loc_sym/alias3, testsuite/modulefiles/loc_sym/alias4, testsuite/modulefiles/loc_sym/alias5, testsuite/modulefiles/loc_sym/alias6, testsuite/modulefiles/loc_sym/exec1, testsuite/modulefiles/loc_sym/exec2, testsuite/modulefiles/loc_sym/getvers1, testsuite/modulefiles/loc_sym/getvers2, testsuite/modulefiles/loc_sym/getvers3, testsuite/modulefiles/loc_sym/getvers4, testsuite/modulefiles/loc_sym/getvers5, testsuite/modulefiles/loc_sym/getvers6, testsuite/modulefiles/loc_sym/getvers7, testsuite/modulefiles/loc_sym/getvers8, testsuite/modulefiles/loc_sym/versinf1, testsuite/modulefiles/loc_sym/versinf2, testsuite/modulefiles/loc_sym/versinf3, testsuite/modulefiles/loc_sym/versinf4, testsuite/modulefiles/loc_sym/versinf5, testsuite/modulefiles/loc_sym/versinf6, testsuite/modulefiles/loc_sym/versinf7, testsuite/modulefiles/loc_sym/version1, testsuite/modulefiles/loc_sym/version10, testsuite/modulefiles/loc_sym/version11, testsuite/modulefiles/loc_sym/version12, testsuite/modulefiles/loc_sym/version13, testsuite/modulefiles/loc_sym/version14, testsuite/modulefiles/loc_sym/version2, testsuite/modulefiles/loc_sym/version3, testsuite/modulefiles/loc_sym/version4, testsuite/modulefiles/loc_sym/version5, testsuite/modulefiles/loc_sym/version6, testsuite/modulefiles/loc_sym/version7, testsuite/modulefiles/loc_sym/version8, testsuite/modulefiles/loc_sym/version9, testsuite/modulefiles/log/badfac, testsuite/modulefiles/log/err_both_1, testsuite/modulefiles/log/err_both_2, testsuite/modulefiles/log/err_file, testsuite/modulefiles/log/err_syslog, testsuite/modulefiles/module/2.0, testsuite/modulefiles/prepend/2.0, testsuite/modulefiles/prereq/full, testsuite/modulefiles/prereq/module, testsuite/modulefiles/remove/2.0, testsuite/modulefiles/system/2.0, testsuite/modulefiles/trace/all_off, testsuite/modulefiles/trace/all_on, testsuite/modulefiles/trace/colon, testsuite/modulefiles/trace/dilo_onoff, testsuite/modulefiles/trace/disp_onoff, testsuite/modulefiles/trace/disptrac, testsuite/modulefiles/trace/load_all1, testsuite/modulefiles/trace/load_all2, testsuite/modulefiles/trace/load_on, testsuite/modulefiles/trace/load_onoff, testsuite/modulefiles/trace/load_ovr, testsuite/modulefiles/uname/domain, testsuite/modulefiles/uname/machine, testsuite/modulefiles/uname/nodename, testsuite/modulefiles/uname/release, testsuite/modulefiles/uname/sysname, testsuite/modulefiles/uname/version, testsuite/modulefiles/unsetenv/1.0, testsuite/modulefiles/user/adv, testsuite/modulefiles/user/advanced, testsuite/modulefiles/user/exp, testsuite/modulefiles/user/expert, testsuite/modulefiles/user/nov, testsuite/modulefiles/user/novice, testsuite/modulefiles/user/undef, testsuite/modulefiles/verbose/msg, testsuite/modulefiles/verbose/off, testsuite/modulefiles/verbose/on, testsuite/modulefiles/verbose/undef, testsuite/modulefiles/whatis/lines, testsuite/modulefiles/whatis/multiple, testsuite/modulefiles/whatis/none, testsuite/modulefiles/whatis/single, testsuite/modulefiles/whatis/string, testsuite/modules.00-init/005-init_ts.exp, testsuite/modules.00-init/006-procs.exp, testsuite/modules.00-init/010-environ.exp, testsuite/modules.00-init/015-version.exp.in, testsuite/modules.00-init/030-shells.exp, testsuite/modules.00-init/050-modpath.exp, testsuite/modules.00-init/080-begenv.exp, testsuite/modules.00-init/090-switches.exp, testsuite/modules.10-use/010-init_ts.exp, testsuite/modules.10-use/030-use.exp, testsuite/modules.10-use/031-append.exp, testsuite/modules.10-use/070-unuse.exp, testsuite/modules.20-locate/010-init_ts.exp, testsuite/modules.20-locate/020-fqual.exp, testsuite/modules.20-locate/030-defvers.exp, testsuite/modules.20-locate/040-alias.exp, testsuite/modules.20-locate/045-symvers.exp, testsuite/modules.20-locate/046-getsym.exp, testsuite/modules.20-locate/047-symerrs.exp, testsuite/modules.20-locate/048-symexec.exp, testsuite/modules.20-locate/050-locrc.exp, testsuite/modules.20-locate/055-locrcerrs.exp, testsuite/modules.20-locate/060-rc.exp, testsuite/modules.20-locate/065-rcerrs.exp, testsuite/modules.20-locate/070-homerc.exp, testsuite/modules.20-locate/095-cleanup.exp, testsuite/modules.30-userlvl/010-init_ts.exp, testsuite/modules.30-userlvl/030-novice.exp, testsuite/modules.30-userlvl/035-nov.exp, testsuite/modules.30-userlvl/040-advanced.exp, testsuite/modules.30-userlvl/045-adv.exp, testsuite/modules.30-userlvl/050-expert.exp, testsuite/modules.30-userlvl/055-exp.exp, testsuite/modules.30-userlvl/090-undef.exp, testsuite/modules.35-trace/010-init_ts.exp, testsuite/modules.35-trace/020-default.exp, testsuite/modules.35-trace/030-all-on.exp, testsuite/modules.35-trace/031-all-off.exp, testsuite/modules.35-trace/040-load-all.exp, testsuite/modules.35-trace/041-load-all.exp, testsuite/modules.35-trace/042-load-on.exp, testsuite/modules.35-trace/043-load-onoff.exp, testsuite/modules.35-trace/044-load-ovr.exp, testsuite/modules.35-trace/050-disp-onoff.exp, testsuite/modules.35-trace/060-dilo-onoff.exp, testsuite/modules.35-trace/070-colon.exp, testsuite/modules.35-trace/095-cleanup.exp, testsuite/modules.50-cmds/010-init_ts.exp, testsuite/modules.50-cmds/020-setenv.exp, testsuite/modules.50-cmds/025-setenv-undo.exp, testsuite/modules.50-cmds/030-unsetenv.exp, testsuite/modules.50-cmds/035-unsetenv-undo.exp, testsuite/modules.50-cmds/040-append.exp, testsuite/modules.50-cmds/045-append-undo.exp, testsuite/modules.50-cmds/050-prepend.exp, testsuite/modules.50-cmds/055-prepend-undo.exp, testsuite/modules.50-cmds/060-remove.exp, testsuite/modules.50-cmds/065-remove-undo.exp, testsuite/modules.50-cmds/070-alias-proc.exp, testsuite/modules.50-cmds/075-alias.exp, testsuite/modules.50-cmds/077-alias-undo.exp, testsuite/modules.50-cmds/080-info-name.exp, testsuite/modules.50-cmds/081-info-user.exp, testsuite/modules.50-cmds/082-info-user-exp.exp, testsuite/modules.50-cmds/083-info-mode.exp, testsuite/modules.50-cmds/084-info-mode-exp.exp, testsuite/modules.50-cmds/085-info-flags.exp, testsuite/modules.50-cmds/086-info-shells.exp, testsuite/modules.50-cmds/087-info-shells-exp.exp, testsuite/modules.50-cmds/090-uname-proc.exp, testsuite/modules.50-cmds/095-uname.exp, testsuite/modules.50-cmds/099-uname-cleanup.exp, testsuite/modules.50-cmds/100-loglevel.exp.in, testsuite/modules.50-cmds/101-badfac.exp, testsuite/modules.50-cmds/110-verbose.exp, testsuite/modules.50-cmds/115-verbose-msg.exp, testsuite/modules.50-cmds/120-prereq-full.exp, testsuite/modules.50-cmds/121-prereq-module.exp, testsuite/modules.50-cmds/130-conflict-full.exp, testsuite/modules.50-cmds/131-conflict-module.exp, testsuite/modules.50-cmds/140-system.exp, testsuite/modules.50-cmds/150-module.exp, testsuite/modules.70-maint/010-init_ts.exp, testsuite/modules.70-maint/020-update.exp, testsuite/modules.70-maint/030-purge.exp, testsuite/modules.70-maint/040-list.exp, testsuite/modules.70-maint/043-listno.exp, testsuite/modules.70-maint/045-listlong.exp, testsuite/modules.70-maint/048-listlongno.exp, testsuite/modules.70-maint/050-whatis-load.exp, testsuite/modules.70-maint/055-whatis.exp, testsuite/modules.70-maint/060-apropos.exp, testsuite/modules.70-maint/070-display.exp, testsuite/modules.70-maint/080-help.exp, testsuite/modules.70-maint/095-cleanup.exp, testsuite/modules.90-avail/010-init_ts.exp, testsuite/modules.90-avail/020-single.exp, testsuite/modules.90-avail/030-multiple.exp, testsuite/modules.90-avail/040-wild.exp, testsuite/modules.90-avail/050-long.exp, testsuite/modules.90-avail/060-empty.exp, testsuite/not_installed, testsuite/systest, utility.c, version.c: modules is a shell tool for setting-up the user environment on the fly, as it were. It's a powerful mechanism for dynamically changing environment variables, aliases, X11 resources, etc. It uses an embedded Tcl intrepretor, with a few extensions. Therefore, it has a well defined language syntax. Version 3.1 is GPL, and includes many improvements over the 3.0beta. modules-3.2.10/INSTALL000066400000000000000000000502051210077407400143020ustar00rootroot00000000000000 The Modules Package Version 3.2 4 July 1999 (updated Mar 8 2002) (updated Dec 15 2005) INSTALL guide R.K. Owen, Ph.D. KooZ Software rk@owen.sj.ca.us 1. Introduction _______________ Environment modules provides a great way to easily customize your shell environment, especially on the fly. However, initial set-up of your system with environment modules can be somewhat difficult. This guide will hopefully help you through some of these problems since I've done this for a number of systems. I've created several scripts and module files to help things along. Be sure to read the README, because it gives very detailed information regarding the configure options. Look at INSTALL.RH7x for an updated example on setting up modules on a RedHat 7x system. It also contains a minimal way to set up modules for all the users by modifying only the system rc files (as listed below in section 2.3). 1.1 Theory of Modules _____________________ The Modules environment is a program that can read & list modulefiles returning commands, suitable for the shell to interpret, and most importantly to ``eval''. In Unix a child process can not modify its parent environment. How does Modules do this then? Modules parses the given module file and produces the appropriate shell commands to set/unset/append/un-append onto an environment variable. These commands are eval'd by the shell. Every shell provides some mechanism where commands can be executed and the resulting output can, in turn, be executed as shell commands. In the C-shell & Bourne shell and derivatives this is ``eval''. This is the only way for a child process to modify the parent's (login shell) environment. Hence the module command itself is a shell alias or function that performs these operations. To the user, it looks just like any other command. 2. First Time Installation __________________________ It's somewhat difficult to set-up the modules environment for the first time on a platform. After having done this a few times it can be reduced to a few essential steps. However, it's advised that only an adequately prepared system administer should attempt this. (See INSTALL.RH7x for a simpler approach.) 2.1 What's Needed Initially ___________________________ The first thing to do is just run './configure' without any arguments and see how far it gets. The main stumbling block is usually the TCL installation. Watch carefully which version of TCL is autoconfigured, as well as the other default paths. If they are what you expected, congratulations! Chances are, you'll want to rerun './configure' again with the proper path to the destination installation as well as the path to the modulefiles themselves, but first just see if the other ingredients are ok. If rerunning "./configure" doesn't fix a problem, try deleting the "config.cache" first. 2.1.1 TCL (Tool Command Language) You need Tcl8.x installed on your system. Sources and precompiled binary distributions can be downloaded from http://www.scriptics.com. Build Tcl using a directory structure anticipating a modules environment, for example, in the TCL src directory, ./configure --prefix=/usr/local/pkg/tcltk/8.x.y" If the executable 'tclsh' is on your path, all information regarding how it was installed should be automatically configured for you using the modules configure script. If the configure script doesn't do the right thing, you will need to set --with-tcl pointing it at the directory with the tclConfig.sh script, which contains several environment variables detailing where the header and library files can be found. However, if there is no tclConfig.sh, or it does not define TCL_VERSION, TCL_LIB_SPEC, or TCL_INCLUDE_SPEC, then use --with-tcl-version, --with-tcl-lib, or --with-tcl-inc respectively to give the Tcl version (X.Y format), the libtcl directory, or the C header include directory where tclDecls.h, etc. can be found. 2.1.2 A location for the "modulefile" Files Decide where you will place your local module files and the root for the module package. It should be a file system separate from your system root, else it may get wiped out with every OS upgrade. The default is /usr/local/Modules/modulefiles/. You will use the --with-module-path= option to the configure script to set this directory. The default is $prefix/Modules/modulefiles, where $prefix is set by the the --prefix configure option. (The default is /usr/local.) After the initial hardwork of getting the module command working, all of your future effort will be in maintaining the modulefiles themselves. Put the module version files in /usr/local/Modules/versions/. This directory is only visible if the "modules" modulefile is loaded, and is only intended for switching between differing module command versions. 2.1.3 A location for the "module" executables and init scripts. The root for a particular version of modules should have an indicative name, such as /usr/local/Modules/3.1.6/. Once the installation is done, put a symbolic link in the /usr/local/Modules directory named default pointing to the version (e.g. "cd /usr/local/Modules; ln -s 3.1.6 default"). The default path to the installation directory is /usr/local. It is NOT recommended to keep this default! 2.2 Building and Installing Modules ___________________________________ First - I recommend placing the sources into /usr/local/Modules/src/ either from the tar file or CVS. If you plan on installing everything in the standard places, and you have TCL and X installed in the standard places, then just run ./configure make make install and you are done if it all runs successfully. If you want to specify where the module files are located, AND/OR you want to install the binaries/man pages elsewhere (you probably do, since that is what modules is good for!), then the two relevant options you must specify for configure are --with-module-path and --prefix, for example ./configure --with-module-path=/your/path/to/module/files \ --prefix=/alternate/usr/local/or/equivalent/1.0/eg The default for --prefix is /usr/local ($prefix). The default for --with-module-path is "$prefix/Modules/modulefiles". If you have trouble with the configuration, then consider Run "./configure --help" to view some of the other options. After the sources are configured then: make As a sanity check, try running the 'modulecmd' binary with just a shell name as the only option: ./modulecmd sh You should get the usage instructions. If you get an error message of the form: init.c(425):ERROR:159: Cannot initialize TCL Then your TCL installation is probably corrupted. This usually means the internally compiled path to the "init.tcl" script does not match with reality. You can try getting around this by setting the TCLLIBPATH environment variable to point to the right directory (/usr/local/tcl* or /usr/share/tcl* in some cases), but you are probably better off reinstalling TCL correctly. If you are successful with the sanity check, then go ahead and install the binaries. make install However, if you want further assurances then run the full test suite (see 2.2.1 below) Each successive step depends on successfully completing the previous steps. However, don't expect everything to work once it's installed, because the system rc files and the user rc `dot' files need to be modified to use modules. Make sure you have a "default" symbolic link in /usr/local/Modules to point to some version, since the system rc files will refer to it. 2.2.1 Running the test suite If you are a developer or overly paranoid, you can run the test suite, of over 500 tests, to make sure that a minimal set of functionality is working. You must have 'dejagnu' installed before you run configure. To run the tests, do make check If you find some errors and you wish to get more information, run the test again as follows make check RUNTESTFLAGS=--verbose Using TCL version 8.3, all the tests should pass. TCL Version 8.0 causes a 7 failures, however these are not serious and are due to the interaction of the test harness with the module command, and will not be a problem (the problem is the way that stdout/stderr are handled). 2.3 Setting Up the Shell RC Files _________________________________ Here's a quick tutorial on Shell rc (run-command) files. When a user logs in and if they have /bin/csh(/bin/sh) as their shell, the first rc fire to be parsed by the shell is /etc/csh.login & /etc/csh.cshrc (/etc/profile) (the order is implementation dependent), and then the user's $HOME/.cshrc ($HOME/.kshenv) and finally $HOME/.login ($HOME/.profile). All the other login shells are based on /bin/csh and /bin/sh with additional features and rc files. Certain environment variables and aliases (functions) need to be set for Modules to work correctly. This is handled by the Module init files in /usr/local/Modules/default/init, which contains separate init files for each of the various supported shells, where default is a symbolic link to a module command version. 2.3.1 Global Shell RC Files ___________________________ Since Modules sets & appends to several environment variables it's a good idea to set them up with the default system values, else the compilers, loaders, man pages, etc. may not find the default system paths if not listed in the appropriate environment variables. Look in ./etc/global for example rc files (csh.login, profile) that defines most of the variables you'll likely need. (These files are not yet tailored to each different platform. The current ones are targeted at GNU/Linux systems.) None of the environment variables are needed directly for a correct Modules environment. The Modules specific commands are located in ./etc/global and are named ``csh.modules'' and ``profile.modules''. These files should be copied to /etc [or where ever you specified with the --with-etc-path= option to the configure script]. These files will be source'd from the users' .login and .profile . Edit these files if you want certain modules to be automatically loaded by every user. Currently, it loads only ``null'' which does absolutely nothing. 2.3.2 Skeleton Shell RC (``Dot'') Files _______________________________________ You have these, I presume? If you don't now is the time to set them up. The skeleton files provide a ``default'' environment when new users are added to your system. The files are usually placed in /etc/skel [or where ever you specified with the --with-skel-path= option to the configure script], and contains a minimal set of ``dot'' files and directories that every new user should start with. The skeleton files are copied to the new user's $HOME directory with the ``-m'' option to the ``useradd'' command. A set of example ``dot'' files are located in ./etc/skel . Copy everything but the .*.in and CVS files and directories to the skeleton directory. Edit and tailor for your own system. If you have a pre-existing set of skeleton files, then make sure the following minimum set exists: .cshrc, .login, .kshenv, .profile . They can be automatically updated with: env HOME=/etc/skel /usr/local/Modules/default/bin/add.modules and hit return. Inspect the new ``dot'' files and if OK, then remove all the .*.old (original) files. An alternative way of setting-up the users' dot files can be found in ./ext. This model can be used with the --with-dot-ext configure option. 2.3.3 User Shell RC (``Dot'') Files ___________________________________ The final step for a functioning Modules environment is to modify the user ``dot'' files to source the right files. One way to do this is to put a message in the /etc/motd telling each user to run the command: /usr/local/Modules/default/bin/add.modules which is a sophisticated script that parses their existing ``dot'' files pre-pending the appropriate commands to initialize the Modules environment. The user can re-run this script and it will find and remember what modules they have initially loaded, strip out the previous module initialization and restore it with an upgraded one. If the user lacks a necessary ``dot'' file, the script will copy one over from the skeleton directory. The user will have to logout and login for it to come into effect. Another way is for the system administrator to "su - username" to each user and run it interactively. The process can be semi-automated with a single line command that obviates the need for direct interaction: su - username -c "yes | /usr/local/Modules/default/bin/add.modules" Power users can create a script to directly parse the /etc/passwd file to perform this command. For the rest of us, just copy the passwd file and edit it appropriately to execute this command for each valid user. 2.4 Module Files ________________ Once the above steps have been performed, then it's important to have module files in each of the modulefile directories. The install will place the following module files (for example): ------------------- /usr/local/Modules/3.0.9-rko/modulefiles ------------------- dot module-info modules null use.own If you don't have your own module files in /usr/local/Modules/modulefiles then copy ``null'' to that directory. On some systems an empty modulefile directory will cause a core dump, on other systems no problem. Use /usr/local/Modules/default/modulefiles/modules as a template for creating your own module files. For more information do module load modules and then you have ready access to the module(1) modulefile(4) man pages, as well as the versions directory. Study the man pages carefully. The version directory may look something like this: ------------------------- /usr/local/Modules/versions --------------------------3.0.5-rko 3.0.6-rko 3.0.7-rko 3.0.8-rko 3.0.9-rko The model you should use for modulefiles is ``name/version''. For example my /usr/local/Modules/modulefiles directory has a directory named ``netscape'' which contains the following module files: 301, 405c, 451c, etc. When it's displayed with ``module avail'' it looks something like this: netscape/301 netscape/405c netscape/451c(default) netscape/45c netscape/46 The default is established with .version file in the netscape directory and it looks something like this: #%Module1.0########################################################### ## ## version file for Netscape ## set ModulesVersion "451c" If the user does ``module load netscape'', then the default netscape/451c will be used. The default can be instantly changed by editing the .version file to point to a different module file in that directory. If no .version file exists then Modules will just assume the last module in the alphabetical ordered directory listing as the default. 3. Package Location Suggestions _______________________________ To make Modules a useful tool in your environment, it's a good idea to use some discipline and may require some work in placing binaries and man pages in suitable locations. It's a way to stop using /usr/local/bin as a catch-all dump for every miscellaneous binary, especially the ones that don't get used too often. There are some scripts to help this along. For this discussion I will use the mythical ``foobar'' package. I've down-loaded the sources in a form of a gzip'd tar file - foobar-1.2.3.tar.gz . Most sources can be placed anywhere, and in most cases will configure and build without any problems. For this example I will do everything from /tmp. I unload the sources with ``tar -xzf foobar-1.2.3.tar.gz'' which creates a directory in the current working directory (/tmp) named ./foobar-1.2.3 . Cd to this directory and run the configure script ./configure --prefix=/usr/local/pkg/foobar/1.2.3 and it should configure the sources to place all necessary files to that location. Continue the build, typically with: make make check make install The binaries, libraries, man pages, and info pages are now placed in /usr/local/pkg/foobar/1.2.3 . If you need to create the ``root'' yourself, then load the ``modules'' module with ``module load modules''. Use the ``mkroot -m'' script to create a collection of ./bin, ./etc, ./lib, ./man/ directories. Install the items as needed, then use ``mkroot -c'' to clean out the empty directories. Finally, after installing the binaries, etc. then create a module file using another module file as a template and place it somewhere in the modulefile hierarchy. Also be sure to keep your original sources somewhere. If you had no problems just copy the original gzip'd tar file to, say, /usr/src. If your module file is new and somewhat involved, then it's a good idea to do "module load use.own" to create your own private modules directory off your $HOME directory. It's a good place to test module files, or to keep your own private collection of module files. The following is an example of the module configuration for rk@owen.sj.ca.us "module avail" ------------------------- /usr/local/Modules/versions -------------------------- 3.0.5-rko 3.0.6-rko 3.0.7-rko 3.0.8-rko 3.0.9-rko ------------------- /usr/local/Modules/3.0.8-rko/modulefiles ------------------- dot module-info modules null use.own ------------------------ /usr/local/Modules/modulefiles ------------------------ F/970328 gif2png/2.0.1(default) perl5/005static RKO gnuplot/3.7 pgp/pgp-5.0 X/bohr http postgres/6.5.1 X/console java/1.1.6v5(default) postgres/7.0(default) X/dark java/1.2.2RC4 python/1.5.2c X/dirac jpeg/6b samba/1.9.18p2 X/light l2h sfw X/owen lesstif slatec/4.1 X/xfig libpng/1.0.5 sniff acrobat/3.0.2 linklint/2.1 staroffice/5.1 acrobat/4.0 netcdf tcltk/8.0.5(default) apache/1.3.12(default) netscape/6.0.0pr1 tcltk/8.2.3 apache/1.3.9 new tex/te applix/4.4.2(default) nntp texinfo/3.12 applix/shelf/2.0 ntp/3-5.92 vastf90/3.4N5 aux ntp/3-5.93e vmware/2.0 cxref/1.4b openssl/0.9.5 workman cxref/1.5b oracle/8i xgks dejagnu/1.3 pbm/1mar94p1 xpdf/0.90 gcc/2.95.2 perl5/004 gettext/0.10.35 perl5/005(default) -------------------------- /u/owen/rk/privatemodules --------------------------- dump htm4.old m4html yyy/xxx/test/2.0 htm4 librko umask htm4.new librko.xxx yyy/xxx/test/1.0 The module list I use for compiling modules (plus some additional things) from "module list" Currently Loaded Modulefiles: 1) applix/4.4.2 3) gcc/2.95.2 5) tcltk/8.2.3 2) null 4) dejagnu/1.3 6) use.own 4. Upgrading Module Commands ____________________________ The theory is that Modules should use a similar package/version locality as the package environments it helps define. Switching between versions of the module command should be as easy as switching between different packages via the module command. Suppose there is a change from 3.0.5-rko to version 3.0.6-rko. The goal is to semi-automate the changes to the user ``dot'' files, such that the the user can be oblivious to the change. The first step is to install the new module command & files to /usr/local/Modules/3.0.6-rko/. Test it out by loading with "module load modules 3.0.6-rko". You may get an error like: 3.0.6-rko(25):ERROR:152: Module 'modules' is currently not loaded This is OK and will likely go away with future versions. Make sure you have the new version with "module --version". If it seems stable enough for yourself, then advertise it to your adventureous users. Once you are satisfied that it appears to work adequately well, then go into /usr/local/Modules remove the old "default" symbolic link to the new versions. For example: cd /usr/local/Modules rm default; ln -s 3.0.6-rko default This new version is now the default, and will be referenced by all the users that log in and those that haven't loaded a specific module command version. modules-3.2.10/INSTALL.RH7x000066400000000000000000000254111210077407400150720ustar00rootroot00000000000000 The Modules Package 04 July 2001 INSTALLATION on RedHat 7.x guide R.K. Owen, Ph.D. KooZ Software rk@owen.sj.ca.us 1. Introduction _______________ Be sure to read the INSTALL guide for details on building the modules package and for a basic overview of Unix shells. This guide will describe how to set up modules for all users on the system by changing only the global system /etc/ shell files. The procedure is specific to Linux, but may be of general application to other Operating Systems. 2. Preparation and Shell Behavior _________________________________ I find it beneficial to put any shell customizations into a subdirectory to isolate what comes standard and what I've added. Also it's generally easier when migrating to a new platform or OS version. First thing, make /etc/custom for placing the customization files to be described below. The following subsections describe the three major shells and files sourced on login and per-process. Login is a once-per-session operation which is done when you initially log into your account. A per-process operation is performed whenever a subprocess or child process is invoked by either invoking a shell directly or via some program that spawns a shell (for example: editors or email programs where you can `escape' to a shell with `!'). 2.1 C-shell ___________ For the C-shell (csh), and derivatives (tcsh) edit the indicated files by adding the included lines. Note that Linux generally uses tcsh, and that csh is generally a link to tcsh. The shell files given here are specific to tcsh. RedHat/Linux does not typically provide default user dot files, $HOME/.login and $HOME/.cshrc, which would get sourced if they were provided. /etc/csh.login - called by every csh user once per session on login, a good place for setting environment variables, which are inherited by child processes. These lines can be added near the end, if you desire to overwrite any system ``defaults''. _________________________________________________________________________ if ( -x /etc/custom/csh.login) then source /etc/custom/csh.login endif _________________________________________________________________________ /etc/csh.cshrc - called by every csh process. This can be a child process invoked within an editor or email program, for example. It's generally a good place for defining aliases, which only live within the process, and are not inherited _________________________________________________________________________ if ( -x /etc/custom/csh.cshrc) then source /etc/custom/csh.cshrc endif _________________________________________________________________________ Notice that in both cases the custom files will not be ``sourced'' unless the execute permission bits are set. This allows the file inclusions to be turned on or off by setting or unsetting the permission bits with chmod +x /etc/custom/csh.* or chmod -x /etc/custom/csh.* In addition to the above system files, the users' dot files files are sourced. $HOME/.login - called once per session on login. It's intended for the user's environment variable customizations. $HOME/.cshrc - called per-process. It's intended for the user's alias customizations. 2.2 Bourne Shell ________________ The Bourne shell (sh) traditionally only sources /etc/profile on login in addition to the user's $HOME/.profile. However, Linux generally uses GNU bash which does have other files ($HOME/.bashrc) that are sourced when a child process is started up. Linux/RedHat generally sets the default user shell to be bash. It's a good idea to keep it that way, if you are inclined to the Bourne shell. If bash is invoked as sh (via a link), then bash will restrict itself to the limited sh behavior with regards to start-up scripts. Therefore, you will notice in some of the scripts that `sh' is aliased to `bash' so you will be invoking bash fully. /etc/profile - called by every sh user once per session on login, a good place for setting environment variables, which are inherited by child processes. These lines can be added near the end, if you desire to overwrite any system ``defaults''. _________________________________________________________________________ if [ -x /etc/custom/profile ]; then . /etc/custom/profile fi _________________________________________________________________________ /etc/bashrc - called by every bash process, only because it's been finessed by the default user .bashrc file. This will be explained below. _________________________________________________________________________ if [ -x /etc/custom/bashrc ]; then . /etc/custom/bashrc fi _________________________________________________________________________ Notice that in both cases the custom files will not be ``sourced'' unless the execute permission bits are set. This allows the file inclusions to be turned on or off by setting or unsetting the permission bits with chmod +x /etc/custom/profile /etc/custom/bashrc or chmod -x /etc/custom/profile /etc/custom/bashrc In addition to the above system files, the users' dot files files are sourced. $HOME/.profile - called once per session on login. It's intended for the user's environment variable customizations. $HOME/.bashrc - called per-process (bash only). It's intended for the user's alias customizations. This is the default unless the $ENV or $BASH_ENV environment variables are defined. 2.3 Korn Shell ________________ The Korn shell (ksh) sources /etc/profile on login and the user's $HOME/.profile and whatever is pointed to by the $ENV environment variable in the user's home directory. Linux/RedHat generally does not install ksh automatically, but is available as a rpm on the installation CDs. The version offered is the ``Public domain Korn shell'' pdksh. /etc/profile - called by every ksh user once per session on login, a good place for setting environment variables, which are inherited by child processes. See the Bourne shell for customization details. In addition to the above system files, the users' dot files files are sourced. $HOME/.profile - called once per session on login. It's intended for the user's environment variable customizations. $ENV - called per-process (bash only), typically defined as $HOME/.kshenv, but could be set to $HOME/.bashrc. It's intended for the user's alias customizations. If $ENV is not defined, then nothing is sourced! 3. Skeleton Files __________________ RedHat is fairly light on the skeleton dot files. Of those mentioned above, only .bashrc is provided. However, if modules is installed and implemented in the system files, then this should be sufficient. The purpose of the default .bashrc provided is to source the system /etc/bashrc to overcome this deficiency inherent to sh/bash/ksh. 4. Custom System Files _______________________ If you have followed the above recommendations, then you are now prepared to add your own customizations to the system, and to have modules installed on your system for all your users. This document will refer to the modules source directory as $MODULES_SRC, which would be set to /usr/local/Modules/src/modules-3.x.y if that is where you have unpacked the module sources. The system files provided in the modules sources references a `default' directory. If you follow the template provided by the RKOConfigure script and are doing a configure with ./configure --prefix=/usr/local/Modules/@VERSION@ ... then the different module versions are placed in /usr/local/Modules. In this directory, the stable module version directory should be set as a symbolic link named `default'. New versions of the modules package can be added, tried and tested before making it the operable version for the general users. (This is described in further detail in sect 2.1 of the INSTALL document.) 4.1 System Environment Variables ________________________________ There are many environment variables that are used by the various tools found on a Unix system. For example: `man' looks at $MANPATH to search for man directories. The system shell files should define these environment variables so that the modulefiles can append onto them. It's not a requirement, but it does make things explicitly clear. MANPATH UNIX man documentation search path PATH executable search path XAPPLRESDIR X11 resource location search path The following environment variables are typically found on Unix systems with dynamically loaded libraries and GNU compilers and tools CPLUS_INCLUDE_PATH g++ include directory search path C_INCLUDE_PATH gcc include directory search path INFOPATH GNU info documentation search path LD_LIBRARY_PATH run-time dynamically loaded libraries search path LD_RUN_PATH ELF object settable run-time dynamically loaded library directory search path LIBRARY_PATH generic ld library directory search path These environment variables are specific to GNOME and application development. GNOME_LIBCONFIG_PATH GNOME library definition script search path GNOME_PATH GNOME application and library package search path 4.2 C-shell System Files ________________________ The C-shell /etc/custom files that were referenced in section 2.1 are located in $MODULES_SRC/etc/global. The files of interest are: csh.cshrc Per-process run-command script. Defines `module' alias, and alias `sh' to `bash'. csh.login Per-session run-command script. Sets the environment variables mentioned in sect 4.2. Sources the csh.modules script and sets $ENV to $HOME/.bashrc (see sects 2.2 & 2.3). csh.modules Sources the appropriate C-shell (or derivative) modules init script in the `default' modules directory (see sect 4.0). 4.3 Bourne Shell Derivative System Files ________________________________________ The bash & ksh /etc/custom files that were alluded to in sections 2.2 & 2.3 are located in $MODULES_SRC/etc/global. As mentioned in sect 2.2 we do not use a strict Bourne shell, because of its limitations; therefore, only the derivative shells will and should be used. The files of interest are: bashrc Per-process run-command script. Defines a module shell function, and defines a shell function for `sh' to reference `bash' instead. profile Per-session run-command script. Sets the environment variables mentioned in sect 4.2. Sources the profile.modules script and sets $ENV to $HOME/.bashrc (see sects 2.2 & 2.3). profile.modules Sources the appropriate Bourne shell (or derivative) modules init script in the `default' modules directory (see sect 4.0). 5. Disclaimer _____________ The files provided by the modules package are only templates. You will probably need to modify these files for your own system and requirements. modules-3.2.10/LICENSE.GPL000066400000000000000000000355641210077407400147120ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS modules-3.2.10/Makefile.am000066400000000000000000000165351210077407400153150ustar00rootroot00000000000000########################################################################### ## ## File: ./Makefile.am ## Versions: $Id: 4b2c7f8d94dbf93e345b20a32c39a10996a06e43 $ ## Created: 2002/06/14 ## ########################################################################### ## ## run automake to generate a Makefile.in ## Makefile.am \ ## configure.ac > Makefile.in ## aclocal.m4 / ## ACLOCAL_AMFLAGS= -I config man_MANS = doc/module.1 doc/modulefile.4 SUBDIRS = . init modulefiles @EXTDIR@ doc DIST_SUBDIRS = . init modulefiles etc ext doc SOURCES_H = modules_def.h getopt.h config.h EXTRA_DIST = modules_def.h getopt.h testsuite INSTALL.RH7x \ init/filter init/bash.in init/sh.in init/zsh.in \ init/csh.in init/ksh.in init/perl.pm.in init/python.py.in \ init/ruby.rb.in init/cmake.in init/bash_completion.in \ LICENSE.GPL ChangeLog bin_PROGRAMS = modulecmd # bin_SCRIPTS = etc/mkroot etc/add.modules ext/add.ext modulecmd_CFLAGS=@TCLX_INCLUDE_SPEC@ @TCL_INCLUDE_SPEC@ @X_CFLAGS@ modulecmd_LDADD= @TCLX_LIB_SPEC@ @TCL_LIB_SPEC@ @X_LIBS@ @X_EXTRA_LIBS@ @LIBS@ modulecmd_SOURCES = \ ModuleCmd_Avail.c \ ModuleCmd_Clear.c ModuleCmd_Display.c ModuleCmd_Help.c \ ModuleCmd_Init.c ModuleCmd_List.c ModuleCmd_Load.c ModuleCmd_Purge.c \ ModuleCmd_Switch.c ModuleCmd_Update.c ModuleCmd_Use.c \ ModuleCmd_Whatis.c ModuleCmd_Refresh.c \ cmdAlias.c cmdConflict.c cmdIsLoaded.c cmdInfo.c cmdMisc.c cmdModule.c\ cmdPath.c cmdSetenv.c cmdUname.c cmdXResource.c cmdUlvl.c cmdLog.c \ cmdChdir.c cmdTrace.c cmdVersion.c cmdVerbose.c cmdWhatis.c \ init.c locate_module.c utility.c main.c error.c getopt.c version.c test: check-local check-local: modulecmd MODULEVERSION=@VERSION@; export MODULEVERSION; \ TESTSUITEDIR=$(srcdir)/testsuite; export TESTSUITEDIR; \ $(RUNTEST) --srcdir $$TESTSUITEDIR \ $(AM_RUNTESTFLAGS) $(RUNTESTFLAGS) --tool=modules ctags: CTAGS CTAGS: $(modulecmd_SOURCES) ctags $(modulecmd_SOURCES) $(SOURCES_H) cxref: $(MAKE) clean # may need to edit the cxref-cc script setting # EGREP=/bin/egrep $(MAKE) CC=cxref-cc CXREFCC=$(CC) # cxref-cc $(modulecmd_SOURCES) $(SOURCES_H) @echo "===============================" @echo "You may need to run this twice!" @echo "===============================" SED=sed CVS=cvs GZIP=gzip BZIP2=bzip2 patch: $(srcdir)/configure @echo "Creating patch file -- do this after CVS tagging" ${CVS} rdiff -c \ -r `${SED} -n -e 's/^.*OLD TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \ -r `${SED} -n -e 's/^.*NEW TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \ modules | ${GZIP} -c \ > modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff.gz ${CVS} rdiff -c \ -r `${SED} -n -e 's/^.*OLD TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \ -r `${SED} -n -e 's/^.*NEW TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \ modules | ${BZIP2} -c \ > modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff.bz2 tag: @echo "CVS tagging - TAG = "\ `${SED} -n -e 's/^.*NEW TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` ${CVS} rtag -b -F \ `${SED} -n -e 's/^.*NEW TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \ modules ChangeLog: CL CL: rmChangeLog @echo "Updating ChangeLog" -@./gitlog2changelog.py rmChangeLog: -@rm -f ChangeLog lsm: # sends off the modules.lsm file to update the Linux Software Map # this should be done by the maintainer (R.K.Owen) only! mail -s add modules@kooz.sj.ca.us,lsm@execpc.com < modules.lsm DISTNAME=$(distdir) ftp-local: dist # this should be done by the maintainer (R.K.Owen) only! @echo "placing $(DISTNAME).tar.{gz|bz2}" -@if [ -e $(DISTNAME).tar.gz ]; then \ cp $(DISTNAME).tar.gz /u/ftp/pub/rkowen/modules; \ else echo "Can't find $(DISTNAME).tar.gz"; fi -@if [ -e $(DISTNAME).tar.bz2 ]; then \ cp $(DISTNAME).tar.bz2 /u/ftp/pub/rkowen/modules; \ else echo "Can't find $(DISTNAME).tar.bz2"; fi -@XXX=modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff.gz ; \ echo "placing $$XXX"; \ if [ -e $$XXX ]; then \ cp $$XXX /u/ftp/pub/rkowen/modules; \ else echo "Can't find $$XXX"; fi -@XXX=modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff.bz2 ; \ echo "placing $$XXX"; \ if [ -e $$XXX ]; then \ cp $$XXX /u/ftp/pub/rkowen/modules; \ else echo "Can't find $$XXX"; fi -@echo "placing modules.lsm" -@if [ -e modules.lsm ]; then \ cp modules.lsm /u/ftp/pub/rkowen/modules; \ else echo "Can't find modules.lsm"; fi dist-hook: CL -rm -rf `find $(distdir) -name CVS` ftp: ftp-ibiblio ftp-sourceforge ftp-ibiblio: dist # do local files first ... mostly to verify their existence # this should be done by the maintainer (R.K.Owen) only! @echo "placing ftp.ibiblio.org files"; -@XXX=modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff."*" ; \ echo "placing modules.lsm $$XXX $(DISTNAME).tar.*"; \ ./.ftp ftp.ibiblio.org /incoming/linux \ modules.lsm $$XXX $(DISTNAME).tar.*; ftp-sourceforge: dist @echo "placing modules.sourceforge.net files"; -@XXX=modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff."*" ; \ echo "placing modules.lsm $$XXX $(DISTNAME).tar."*""; \ scp modules.lsm $$XXX $(DISTNAME).tar.* rkowen@shell.sourceforge.net:ftp ./.ftp upload.sourceforge.net /incoming \ modules.lsm $$XXX $(DISTNAME).tar.*; help: @echo "" @echo "make - compiles sources to executable" @echo "make all - same as above" @echo "make check - runs test suite - needs dejagnu runtest" @echo "make install - copy program & man pages to destination" @echo "make clean - cleans out most useless files" @echo "make disthelp - extra help for developers" @echo "" disthelp: @echo "make ctags - creates the vi ctags file" @echo "make cxref - makes the xref HTML files - needs cxref" @echo "make dist - creates a distribution tarballs" @echo "make distclean - cleans & removes most made files" @echo "make maintainer-clean - cleans even more" @echo "================ requires git access =======================" # @echo "make tag - does a git rtag" @echo "make CL - remakes the ChangeLog from the git commits" # @echo "make patch - creates a patch file after tagging" @echo "================ maintainers only ==========================" @echo "make lsm - send off to the Linux Software Map" @echo "make ftp-local - upload tarball (good test)" @echo "make ftp-ibiblio - upload to ibiblio" @echo "make ftp-sourceforge - upload to sourceforge" @echo "make ftp - upload to both ibiblio & sourceforge" @echo "" modules-3.2.10/Makefile.in000066400000000000000000003411131210077407400153170ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ ########################################################################### ########################################################################### VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = modulecmd$(EXEEXT) subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/.spec.in \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(srcdir)/modules.lsm.in \ $(top_srcdir)/configure $(top_srcdir)/etc/global/bashrc.in \ $(top_srcdir)/etc/global/csh.cshrc.in \ $(top_srcdir)/etc/global/csh.login.in \ $(top_srcdir)/etc/global/csh.modules.in \ $(top_srcdir)/etc/global/profile.in \ $(top_srcdir)/etc/global/profile.modules.in \ $(top_srcdir)/etc/skel/.cshrc.in \ $(top_srcdir)/etc/skel/.kshenv.in \ $(top_srcdir)/etc/skel/.login.in \ $(top_srcdir)/etc/skel/.profile.in \ $(top_srcdir)/ext/common/.cshrc.in \ $(top_srcdir)/ext/common/.kshenv.in \ $(top_srcdir)/ext/common/.login.in \ $(top_srcdir)/ext/common/.profile.in ChangeLog INSTALL NEWS \ TODO config/compile config/depcomp config/install-sh \ config/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/emtcl.m4 \ $(top_srcdir)/config/tcl.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = modules.lsm .spec etc/skel/.cshrc etc/skel/.login \ etc/skel/.kshenv etc/skel/.profile etc/global/csh.cshrc \ etc/global/csh.login etc/global/csh.modules etc/global/bashrc \ etc/global/profile etc/global/profile.modules \ ext/common/.cshrc ext/common/.login ext/common/.kshenv \ ext/common/.profile CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(man4dir)" PROGRAMS = $(bin_PROGRAMS) am_modulecmd_OBJECTS = modulecmd-ModuleCmd_Avail.$(OBJEXT) \ modulecmd-ModuleCmd_Clear.$(OBJEXT) \ modulecmd-ModuleCmd_Display.$(OBJEXT) \ modulecmd-ModuleCmd_Help.$(OBJEXT) \ modulecmd-ModuleCmd_Init.$(OBJEXT) \ modulecmd-ModuleCmd_List.$(OBJEXT) \ modulecmd-ModuleCmd_Load.$(OBJEXT) \ modulecmd-ModuleCmd_Purge.$(OBJEXT) \ modulecmd-ModuleCmd_Switch.$(OBJEXT) \ modulecmd-ModuleCmd_Update.$(OBJEXT) \ modulecmd-ModuleCmd_Use.$(OBJEXT) \ modulecmd-ModuleCmd_Whatis.$(OBJEXT) \ modulecmd-ModuleCmd_Refresh.$(OBJEXT) \ modulecmd-cmdAlias.$(OBJEXT) modulecmd-cmdConflict.$(OBJEXT) \ modulecmd-cmdIsLoaded.$(OBJEXT) modulecmd-cmdInfo.$(OBJEXT) \ modulecmd-cmdMisc.$(OBJEXT) modulecmd-cmdModule.$(OBJEXT) \ modulecmd-cmdPath.$(OBJEXT) modulecmd-cmdSetenv.$(OBJEXT) \ modulecmd-cmdUname.$(OBJEXT) modulecmd-cmdXResource.$(OBJEXT) \ modulecmd-cmdUlvl.$(OBJEXT) modulecmd-cmdLog.$(OBJEXT) \ modulecmd-cmdChdir.$(OBJEXT) modulecmd-cmdTrace.$(OBJEXT) \ modulecmd-cmdVersion.$(OBJEXT) modulecmd-cmdVerbose.$(OBJEXT) \ modulecmd-cmdWhatis.$(OBJEXT) modulecmd-init.$(OBJEXT) \ modulecmd-locate_module.$(OBJEXT) modulecmd-utility.$(OBJEXT) \ modulecmd-main.$(OBJEXT) modulecmd-error.$(OBJEXT) \ modulecmd-getopt.$(OBJEXT) modulecmd-version.$(OBJEXT) modulecmd_OBJECTS = $(am_modulecmd_OBJECTS) modulecmd_DEPENDENCIES = modulecmd_LINK = $(CCLD) $(modulecmd_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(modulecmd_SOURCES) DIST_SOURCES = $(modulecmd_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 man4dir = $(mandir)/man4 NROFF = nroff MANS = $(man_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DEJATOOL = $(PACKAGE) RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir EXPECT = expect DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOLOADPATH = @AUTOLOADPATH@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASEPREFIX = @BASEPREFIX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFAULTPATH = @DEFAULTPATH@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOT_EXT = @DOT_EXT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETCPATH = @ETCPATH@ EXEEXT = @EXEEXT@ EXTDIR = @EXTDIR@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MODULEPATH = @MODULEPATH@ NOTVERSIONING = @NOTVERSIONING@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RUNTEST = @RUNTEST@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SKELPATH = @SKELPATH@ STATIC = @STATIC@ STRIP = @STRIP@ TCLX_INCLUDE_SPEC = @TCLX_INCLUDE_SPEC@ TCLX_LIB_SPEC = @TCLX_LIB_SPEC@ TCLX_VERSION = @TCLX_VERSION@ TCL_INCLUDE_SPEC = @TCL_INCLUDE_SPEC@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_VERSION = @TCL_VERSION@ UNAME = @UNAME@ VERSION = @VERSION@ VERSIONING = @VERSIONING@ VERSIONPATH = @VERSIONPATH@ WANTS_VERSIONING = @WANTS_VERSIONING@ WITH_LOGGING = @WITH_LOGGING@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ _CPPSTDIN = @_CPPSTDIN@ _PHOST = @_PHOST@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I config man_MANS = doc/module.1 doc/modulefile.4 SUBDIRS = . init modulefiles @EXTDIR@ doc DIST_SUBDIRS = . init modulefiles etc ext doc SOURCES_H = modules_def.h getopt.h config.h EXTRA_DIST = modules_def.h getopt.h testsuite INSTALL.RH7x \ init/filter init/bash.in init/sh.in init/zsh.in \ init/csh.in init/ksh.in init/perl.pm.in init/python.py.in \ init/ruby.rb.in init/cmake.in init/bash_completion.in \ LICENSE.GPL ChangeLog # bin_SCRIPTS = etc/mkroot etc/add.modules ext/add.ext modulecmd_CFLAGS = @TCLX_INCLUDE_SPEC@ @TCL_INCLUDE_SPEC@ @X_CFLAGS@ modulecmd_LDADD = @TCLX_LIB_SPEC@ @TCL_LIB_SPEC@ @X_LIBS@ @X_EXTRA_LIBS@ @LIBS@ modulecmd_SOURCES = \ ModuleCmd_Avail.c \ ModuleCmd_Clear.c ModuleCmd_Display.c ModuleCmd_Help.c \ ModuleCmd_Init.c ModuleCmd_List.c ModuleCmd_Load.c ModuleCmd_Purge.c \ ModuleCmd_Switch.c ModuleCmd_Update.c ModuleCmd_Use.c \ ModuleCmd_Whatis.c ModuleCmd_Refresh.c \ cmdAlias.c cmdConflict.c cmdIsLoaded.c cmdInfo.c cmdMisc.c cmdModule.c\ cmdPath.c cmdSetenv.c cmdUname.c cmdXResource.c cmdUlvl.c cmdLog.c \ cmdChdir.c cmdTrace.c cmdVersion.c cmdVerbose.c cmdWhatis.c \ init.c locate_module.c utility.c main.c error.c getopt.c version.c SED = sed CVS = cvs GZIP = gzip BZIP2 = bzip2 DISTNAME = $(distdir) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 modules.lsm: $(top_builddir)/config.status $(srcdir)/modules.lsm.in cd $(top_builddir) && $(SHELL) ./config.status $@ .spec: $(top_builddir)/config.status $(srcdir)/.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ etc/skel/.cshrc: $(top_builddir)/config.status $(top_srcdir)/etc/skel/.cshrc.in cd $(top_builddir) && $(SHELL) ./config.status $@ etc/skel/.login: $(top_builddir)/config.status $(top_srcdir)/etc/skel/.login.in cd $(top_builddir) && $(SHELL) ./config.status $@ etc/skel/.kshenv: $(top_builddir)/config.status $(top_srcdir)/etc/skel/.kshenv.in cd $(top_builddir) && $(SHELL) ./config.status $@ etc/skel/.profile: $(top_builddir)/config.status $(top_srcdir)/etc/skel/.profile.in cd $(top_builddir) && $(SHELL) ./config.status $@ etc/global/csh.cshrc: $(top_builddir)/config.status $(top_srcdir)/etc/global/csh.cshrc.in cd $(top_builddir) && $(SHELL) ./config.status $@ etc/global/csh.login: $(top_builddir)/config.status $(top_srcdir)/etc/global/csh.login.in cd $(top_builddir) && $(SHELL) ./config.status $@ etc/global/csh.modules: $(top_builddir)/config.status $(top_srcdir)/etc/global/csh.modules.in cd $(top_builddir) && $(SHELL) ./config.status $@ etc/global/bashrc: $(top_builddir)/config.status $(top_srcdir)/etc/global/bashrc.in cd $(top_builddir) && $(SHELL) ./config.status $@ etc/global/profile: $(top_builddir)/config.status $(top_srcdir)/etc/global/profile.in cd $(top_builddir) && $(SHELL) ./config.status $@ etc/global/profile.modules: $(top_builddir)/config.status $(top_srcdir)/etc/global/profile.modules.in cd $(top_builddir) && $(SHELL) ./config.status $@ ext/common/.cshrc: $(top_builddir)/config.status $(top_srcdir)/ext/common/.cshrc.in cd $(top_builddir) && $(SHELL) ./config.status $@ ext/common/.login: $(top_builddir)/config.status $(top_srcdir)/ext/common/.login.in cd $(top_builddir) && $(SHELL) ./config.status $@ ext/common/.kshenv: $(top_builddir)/config.status $(top_srcdir)/ext/common/.kshenv.in cd $(top_builddir) && $(SHELL) ./config.status $@ ext/common/.profile: $(top_builddir)/config.status $(top_srcdir)/ext/common/.profile.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) modulecmd$(EXEEXT): $(modulecmd_OBJECTS) $(modulecmd_DEPENDENCIES) $(EXTRA_modulecmd_DEPENDENCIES) @rm -f modulecmd$(EXEEXT) $(modulecmd_LINK) $(modulecmd_OBJECTS) $(modulecmd_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-ModuleCmd_Avail.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-ModuleCmd_Clear.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-ModuleCmd_Display.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-ModuleCmd_Help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-ModuleCmd_Init.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-ModuleCmd_List.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-ModuleCmd_Load.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-ModuleCmd_Purge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-ModuleCmd_Refresh.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-ModuleCmd_Switch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-ModuleCmd_Update.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-ModuleCmd_Use.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-ModuleCmd_Whatis.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdAlias.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdChdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdConflict.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdInfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdIsLoaded.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdLog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdMisc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdModule.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdPath.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdSetenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdTrace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdUlvl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdUname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdVerbose.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdVersion.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdWhatis.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-cmdXResource.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-init.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-locate_module.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-utility.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modulecmd-version.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` modulecmd-ModuleCmd_Avail.o: ModuleCmd_Avail.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Avail.o -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Avail.Tpo -c -o modulecmd-ModuleCmd_Avail.o `test -f 'ModuleCmd_Avail.c' || echo '$(srcdir)/'`ModuleCmd_Avail.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Avail.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Avail.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Avail.c' object='modulecmd-ModuleCmd_Avail.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Avail.o `test -f 'ModuleCmd_Avail.c' || echo '$(srcdir)/'`ModuleCmd_Avail.c modulecmd-ModuleCmd_Avail.obj: ModuleCmd_Avail.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Avail.obj -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Avail.Tpo -c -o modulecmd-ModuleCmd_Avail.obj `if test -f 'ModuleCmd_Avail.c'; then $(CYGPATH_W) 'ModuleCmd_Avail.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Avail.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Avail.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Avail.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Avail.c' object='modulecmd-ModuleCmd_Avail.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Avail.obj `if test -f 'ModuleCmd_Avail.c'; then $(CYGPATH_W) 'ModuleCmd_Avail.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Avail.c'; fi` modulecmd-ModuleCmd_Clear.o: ModuleCmd_Clear.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Clear.o -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Clear.Tpo -c -o modulecmd-ModuleCmd_Clear.o `test -f 'ModuleCmd_Clear.c' || echo '$(srcdir)/'`ModuleCmd_Clear.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Clear.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Clear.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Clear.c' object='modulecmd-ModuleCmd_Clear.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Clear.o `test -f 'ModuleCmd_Clear.c' || echo '$(srcdir)/'`ModuleCmd_Clear.c modulecmd-ModuleCmd_Clear.obj: ModuleCmd_Clear.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Clear.obj -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Clear.Tpo -c -o modulecmd-ModuleCmd_Clear.obj `if test -f 'ModuleCmd_Clear.c'; then $(CYGPATH_W) 'ModuleCmd_Clear.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Clear.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Clear.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Clear.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Clear.c' object='modulecmd-ModuleCmd_Clear.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Clear.obj `if test -f 'ModuleCmd_Clear.c'; then $(CYGPATH_W) 'ModuleCmd_Clear.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Clear.c'; fi` modulecmd-ModuleCmd_Display.o: ModuleCmd_Display.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Display.o -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Display.Tpo -c -o modulecmd-ModuleCmd_Display.o `test -f 'ModuleCmd_Display.c' || echo '$(srcdir)/'`ModuleCmd_Display.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Display.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Display.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Display.c' object='modulecmd-ModuleCmd_Display.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Display.o `test -f 'ModuleCmd_Display.c' || echo '$(srcdir)/'`ModuleCmd_Display.c modulecmd-ModuleCmd_Display.obj: ModuleCmd_Display.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Display.obj -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Display.Tpo -c -o modulecmd-ModuleCmd_Display.obj `if test -f 'ModuleCmd_Display.c'; then $(CYGPATH_W) 'ModuleCmd_Display.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Display.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Display.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Display.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Display.c' object='modulecmd-ModuleCmd_Display.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Display.obj `if test -f 'ModuleCmd_Display.c'; then $(CYGPATH_W) 'ModuleCmd_Display.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Display.c'; fi` modulecmd-ModuleCmd_Help.o: ModuleCmd_Help.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Help.o -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Help.Tpo -c -o modulecmd-ModuleCmd_Help.o `test -f 'ModuleCmd_Help.c' || echo '$(srcdir)/'`ModuleCmd_Help.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Help.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Help.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Help.c' object='modulecmd-ModuleCmd_Help.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Help.o `test -f 'ModuleCmd_Help.c' || echo '$(srcdir)/'`ModuleCmd_Help.c modulecmd-ModuleCmd_Help.obj: ModuleCmd_Help.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Help.obj -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Help.Tpo -c -o modulecmd-ModuleCmd_Help.obj `if test -f 'ModuleCmd_Help.c'; then $(CYGPATH_W) 'ModuleCmd_Help.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Help.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Help.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Help.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Help.c' object='modulecmd-ModuleCmd_Help.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Help.obj `if test -f 'ModuleCmd_Help.c'; then $(CYGPATH_W) 'ModuleCmd_Help.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Help.c'; fi` modulecmd-ModuleCmd_Init.o: ModuleCmd_Init.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Init.o -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Init.Tpo -c -o modulecmd-ModuleCmd_Init.o `test -f 'ModuleCmd_Init.c' || echo '$(srcdir)/'`ModuleCmd_Init.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Init.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Init.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Init.c' object='modulecmd-ModuleCmd_Init.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Init.o `test -f 'ModuleCmd_Init.c' || echo '$(srcdir)/'`ModuleCmd_Init.c modulecmd-ModuleCmd_Init.obj: ModuleCmd_Init.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Init.obj -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Init.Tpo -c -o modulecmd-ModuleCmd_Init.obj `if test -f 'ModuleCmd_Init.c'; then $(CYGPATH_W) 'ModuleCmd_Init.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Init.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Init.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Init.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Init.c' object='modulecmd-ModuleCmd_Init.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Init.obj `if test -f 'ModuleCmd_Init.c'; then $(CYGPATH_W) 'ModuleCmd_Init.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Init.c'; fi` modulecmd-ModuleCmd_List.o: ModuleCmd_List.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_List.o -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_List.Tpo -c -o modulecmd-ModuleCmd_List.o `test -f 'ModuleCmd_List.c' || echo '$(srcdir)/'`ModuleCmd_List.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_List.Tpo $(DEPDIR)/modulecmd-ModuleCmd_List.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_List.c' object='modulecmd-ModuleCmd_List.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_List.o `test -f 'ModuleCmd_List.c' || echo '$(srcdir)/'`ModuleCmd_List.c modulecmd-ModuleCmd_List.obj: ModuleCmd_List.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_List.obj -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_List.Tpo -c -o modulecmd-ModuleCmd_List.obj `if test -f 'ModuleCmd_List.c'; then $(CYGPATH_W) 'ModuleCmd_List.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_List.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_List.Tpo $(DEPDIR)/modulecmd-ModuleCmd_List.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_List.c' object='modulecmd-ModuleCmd_List.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_List.obj `if test -f 'ModuleCmd_List.c'; then $(CYGPATH_W) 'ModuleCmd_List.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_List.c'; fi` modulecmd-ModuleCmd_Load.o: ModuleCmd_Load.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Load.o -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Load.Tpo -c -o modulecmd-ModuleCmd_Load.o `test -f 'ModuleCmd_Load.c' || echo '$(srcdir)/'`ModuleCmd_Load.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Load.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Load.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Load.c' object='modulecmd-ModuleCmd_Load.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Load.o `test -f 'ModuleCmd_Load.c' || echo '$(srcdir)/'`ModuleCmd_Load.c modulecmd-ModuleCmd_Load.obj: ModuleCmd_Load.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Load.obj -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Load.Tpo -c -o modulecmd-ModuleCmd_Load.obj `if test -f 'ModuleCmd_Load.c'; then $(CYGPATH_W) 'ModuleCmd_Load.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Load.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Load.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Load.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Load.c' object='modulecmd-ModuleCmd_Load.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Load.obj `if test -f 'ModuleCmd_Load.c'; then $(CYGPATH_W) 'ModuleCmd_Load.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Load.c'; fi` modulecmd-ModuleCmd_Purge.o: ModuleCmd_Purge.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Purge.o -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Purge.Tpo -c -o modulecmd-ModuleCmd_Purge.o `test -f 'ModuleCmd_Purge.c' || echo '$(srcdir)/'`ModuleCmd_Purge.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Purge.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Purge.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Purge.c' object='modulecmd-ModuleCmd_Purge.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Purge.o `test -f 'ModuleCmd_Purge.c' || echo '$(srcdir)/'`ModuleCmd_Purge.c modulecmd-ModuleCmd_Purge.obj: ModuleCmd_Purge.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Purge.obj -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Purge.Tpo -c -o modulecmd-ModuleCmd_Purge.obj `if test -f 'ModuleCmd_Purge.c'; then $(CYGPATH_W) 'ModuleCmd_Purge.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Purge.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Purge.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Purge.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Purge.c' object='modulecmd-ModuleCmd_Purge.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Purge.obj `if test -f 'ModuleCmd_Purge.c'; then $(CYGPATH_W) 'ModuleCmd_Purge.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Purge.c'; fi` modulecmd-ModuleCmd_Switch.o: ModuleCmd_Switch.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Switch.o -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Switch.Tpo -c -o modulecmd-ModuleCmd_Switch.o `test -f 'ModuleCmd_Switch.c' || echo '$(srcdir)/'`ModuleCmd_Switch.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Switch.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Switch.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Switch.c' object='modulecmd-ModuleCmd_Switch.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Switch.o `test -f 'ModuleCmd_Switch.c' || echo '$(srcdir)/'`ModuleCmd_Switch.c modulecmd-ModuleCmd_Switch.obj: ModuleCmd_Switch.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Switch.obj -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Switch.Tpo -c -o modulecmd-ModuleCmd_Switch.obj `if test -f 'ModuleCmd_Switch.c'; then $(CYGPATH_W) 'ModuleCmd_Switch.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Switch.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Switch.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Switch.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Switch.c' object='modulecmd-ModuleCmd_Switch.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Switch.obj `if test -f 'ModuleCmd_Switch.c'; then $(CYGPATH_W) 'ModuleCmd_Switch.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Switch.c'; fi` modulecmd-ModuleCmd_Update.o: ModuleCmd_Update.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Update.o -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Update.Tpo -c -o modulecmd-ModuleCmd_Update.o `test -f 'ModuleCmd_Update.c' || echo '$(srcdir)/'`ModuleCmd_Update.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Update.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Update.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Update.c' object='modulecmd-ModuleCmd_Update.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Update.o `test -f 'ModuleCmd_Update.c' || echo '$(srcdir)/'`ModuleCmd_Update.c modulecmd-ModuleCmd_Update.obj: ModuleCmd_Update.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Update.obj -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Update.Tpo -c -o modulecmd-ModuleCmd_Update.obj `if test -f 'ModuleCmd_Update.c'; then $(CYGPATH_W) 'ModuleCmd_Update.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Update.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Update.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Update.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Update.c' object='modulecmd-ModuleCmd_Update.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Update.obj `if test -f 'ModuleCmd_Update.c'; then $(CYGPATH_W) 'ModuleCmd_Update.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Update.c'; fi` modulecmd-ModuleCmd_Use.o: ModuleCmd_Use.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Use.o -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Use.Tpo -c -o modulecmd-ModuleCmd_Use.o `test -f 'ModuleCmd_Use.c' || echo '$(srcdir)/'`ModuleCmd_Use.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Use.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Use.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Use.c' object='modulecmd-ModuleCmd_Use.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Use.o `test -f 'ModuleCmd_Use.c' || echo '$(srcdir)/'`ModuleCmd_Use.c modulecmd-ModuleCmd_Use.obj: ModuleCmd_Use.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Use.obj -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Use.Tpo -c -o modulecmd-ModuleCmd_Use.obj `if test -f 'ModuleCmd_Use.c'; then $(CYGPATH_W) 'ModuleCmd_Use.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Use.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Use.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Use.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Use.c' object='modulecmd-ModuleCmd_Use.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Use.obj `if test -f 'ModuleCmd_Use.c'; then $(CYGPATH_W) 'ModuleCmd_Use.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Use.c'; fi` modulecmd-ModuleCmd_Whatis.o: ModuleCmd_Whatis.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Whatis.o -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Whatis.Tpo -c -o modulecmd-ModuleCmd_Whatis.o `test -f 'ModuleCmd_Whatis.c' || echo '$(srcdir)/'`ModuleCmd_Whatis.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Whatis.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Whatis.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Whatis.c' object='modulecmd-ModuleCmd_Whatis.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Whatis.o `test -f 'ModuleCmd_Whatis.c' || echo '$(srcdir)/'`ModuleCmd_Whatis.c modulecmd-ModuleCmd_Whatis.obj: ModuleCmd_Whatis.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Whatis.obj -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Whatis.Tpo -c -o modulecmd-ModuleCmd_Whatis.obj `if test -f 'ModuleCmd_Whatis.c'; then $(CYGPATH_W) 'ModuleCmd_Whatis.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Whatis.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Whatis.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Whatis.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Whatis.c' object='modulecmd-ModuleCmd_Whatis.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Whatis.obj `if test -f 'ModuleCmd_Whatis.c'; then $(CYGPATH_W) 'ModuleCmd_Whatis.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Whatis.c'; fi` modulecmd-ModuleCmd_Refresh.o: ModuleCmd_Refresh.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Refresh.o -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Refresh.Tpo -c -o modulecmd-ModuleCmd_Refresh.o `test -f 'ModuleCmd_Refresh.c' || echo '$(srcdir)/'`ModuleCmd_Refresh.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Refresh.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Refresh.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Refresh.c' object='modulecmd-ModuleCmd_Refresh.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Refresh.o `test -f 'ModuleCmd_Refresh.c' || echo '$(srcdir)/'`ModuleCmd_Refresh.c modulecmd-ModuleCmd_Refresh.obj: ModuleCmd_Refresh.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-ModuleCmd_Refresh.obj -MD -MP -MF $(DEPDIR)/modulecmd-ModuleCmd_Refresh.Tpo -c -o modulecmd-ModuleCmd_Refresh.obj `if test -f 'ModuleCmd_Refresh.c'; then $(CYGPATH_W) 'ModuleCmd_Refresh.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Refresh.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-ModuleCmd_Refresh.Tpo $(DEPDIR)/modulecmd-ModuleCmd_Refresh.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ModuleCmd_Refresh.c' object='modulecmd-ModuleCmd_Refresh.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-ModuleCmd_Refresh.obj `if test -f 'ModuleCmd_Refresh.c'; then $(CYGPATH_W) 'ModuleCmd_Refresh.c'; else $(CYGPATH_W) '$(srcdir)/ModuleCmd_Refresh.c'; fi` modulecmd-cmdAlias.o: cmdAlias.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdAlias.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdAlias.Tpo -c -o modulecmd-cmdAlias.o `test -f 'cmdAlias.c' || echo '$(srcdir)/'`cmdAlias.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdAlias.Tpo $(DEPDIR)/modulecmd-cmdAlias.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdAlias.c' object='modulecmd-cmdAlias.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdAlias.o `test -f 'cmdAlias.c' || echo '$(srcdir)/'`cmdAlias.c modulecmd-cmdAlias.obj: cmdAlias.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdAlias.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdAlias.Tpo -c -o modulecmd-cmdAlias.obj `if test -f 'cmdAlias.c'; then $(CYGPATH_W) 'cmdAlias.c'; else $(CYGPATH_W) '$(srcdir)/cmdAlias.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdAlias.Tpo $(DEPDIR)/modulecmd-cmdAlias.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdAlias.c' object='modulecmd-cmdAlias.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdAlias.obj `if test -f 'cmdAlias.c'; then $(CYGPATH_W) 'cmdAlias.c'; else $(CYGPATH_W) '$(srcdir)/cmdAlias.c'; fi` modulecmd-cmdConflict.o: cmdConflict.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdConflict.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdConflict.Tpo -c -o modulecmd-cmdConflict.o `test -f 'cmdConflict.c' || echo '$(srcdir)/'`cmdConflict.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdConflict.Tpo $(DEPDIR)/modulecmd-cmdConflict.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdConflict.c' object='modulecmd-cmdConflict.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdConflict.o `test -f 'cmdConflict.c' || echo '$(srcdir)/'`cmdConflict.c modulecmd-cmdConflict.obj: cmdConflict.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdConflict.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdConflict.Tpo -c -o modulecmd-cmdConflict.obj `if test -f 'cmdConflict.c'; then $(CYGPATH_W) 'cmdConflict.c'; else $(CYGPATH_W) '$(srcdir)/cmdConflict.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdConflict.Tpo $(DEPDIR)/modulecmd-cmdConflict.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdConflict.c' object='modulecmd-cmdConflict.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdConflict.obj `if test -f 'cmdConflict.c'; then $(CYGPATH_W) 'cmdConflict.c'; else $(CYGPATH_W) '$(srcdir)/cmdConflict.c'; fi` modulecmd-cmdIsLoaded.o: cmdIsLoaded.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdIsLoaded.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdIsLoaded.Tpo -c -o modulecmd-cmdIsLoaded.o `test -f 'cmdIsLoaded.c' || echo '$(srcdir)/'`cmdIsLoaded.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdIsLoaded.Tpo $(DEPDIR)/modulecmd-cmdIsLoaded.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdIsLoaded.c' object='modulecmd-cmdIsLoaded.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdIsLoaded.o `test -f 'cmdIsLoaded.c' || echo '$(srcdir)/'`cmdIsLoaded.c modulecmd-cmdIsLoaded.obj: cmdIsLoaded.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdIsLoaded.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdIsLoaded.Tpo -c -o modulecmd-cmdIsLoaded.obj `if test -f 'cmdIsLoaded.c'; then $(CYGPATH_W) 'cmdIsLoaded.c'; else $(CYGPATH_W) '$(srcdir)/cmdIsLoaded.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdIsLoaded.Tpo $(DEPDIR)/modulecmd-cmdIsLoaded.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdIsLoaded.c' object='modulecmd-cmdIsLoaded.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdIsLoaded.obj `if test -f 'cmdIsLoaded.c'; then $(CYGPATH_W) 'cmdIsLoaded.c'; else $(CYGPATH_W) '$(srcdir)/cmdIsLoaded.c'; fi` modulecmd-cmdInfo.o: cmdInfo.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdInfo.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdInfo.Tpo -c -o modulecmd-cmdInfo.o `test -f 'cmdInfo.c' || echo '$(srcdir)/'`cmdInfo.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdInfo.Tpo $(DEPDIR)/modulecmd-cmdInfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdInfo.c' object='modulecmd-cmdInfo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdInfo.o `test -f 'cmdInfo.c' || echo '$(srcdir)/'`cmdInfo.c modulecmd-cmdInfo.obj: cmdInfo.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdInfo.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdInfo.Tpo -c -o modulecmd-cmdInfo.obj `if test -f 'cmdInfo.c'; then $(CYGPATH_W) 'cmdInfo.c'; else $(CYGPATH_W) '$(srcdir)/cmdInfo.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdInfo.Tpo $(DEPDIR)/modulecmd-cmdInfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdInfo.c' object='modulecmd-cmdInfo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdInfo.obj `if test -f 'cmdInfo.c'; then $(CYGPATH_W) 'cmdInfo.c'; else $(CYGPATH_W) '$(srcdir)/cmdInfo.c'; fi` modulecmd-cmdMisc.o: cmdMisc.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdMisc.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdMisc.Tpo -c -o modulecmd-cmdMisc.o `test -f 'cmdMisc.c' || echo '$(srcdir)/'`cmdMisc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdMisc.Tpo $(DEPDIR)/modulecmd-cmdMisc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdMisc.c' object='modulecmd-cmdMisc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdMisc.o `test -f 'cmdMisc.c' || echo '$(srcdir)/'`cmdMisc.c modulecmd-cmdMisc.obj: cmdMisc.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdMisc.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdMisc.Tpo -c -o modulecmd-cmdMisc.obj `if test -f 'cmdMisc.c'; then $(CYGPATH_W) 'cmdMisc.c'; else $(CYGPATH_W) '$(srcdir)/cmdMisc.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdMisc.Tpo $(DEPDIR)/modulecmd-cmdMisc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdMisc.c' object='modulecmd-cmdMisc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdMisc.obj `if test -f 'cmdMisc.c'; then $(CYGPATH_W) 'cmdMisc.c'; else $(CYGPATH_W) '$(srcdir)/cmdMisc.c'; fi` modulecmd-cmdModule.o: cmdModule.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdModule.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdModule.Tpo -c -o modulecmd-cmdModule.o `test -f 'cmdModule.c' || echo '$(srcdir)/'`cmdModule.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdModule.Tpo $(DEPDIR)/modulecmd-cmdModule.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdModule.c' object='modulecmd-cmdModule.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdModule.o `test -f 'cmdModule.c' || echo '$(srcdir)/'`cmdModule.c modulecmd-cmdModule.obj: cmdModule.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdModule.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdModule.Tpo -c -o modulecmd-cmdModule.obj `if test -f 'cmdModule.c'; then $(CYGPATH_W) 'cmdModule.c'; else $(CYGPATH_W) '$(srcdir)/cmdModule.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdModule.Tpo $(DEPDIR)/modulecmd-cmdModule.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdModule.c' object='modulecmd-cmdModule.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdModule.obj `if test -f 'cmdModule.c'; then $(CYGPATH_W) 'cmdModule.c'; else $(CYGPATH_W) '$(srcdir)/cmdModule.c'; fi` modulecmd-cmdPath.o: cmdPath.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdPath.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdPath.Tpo -c -o modulecmd-cmdPath.o `test -f 'cmdPath.c' || echo '$(srcdir)/'`cmdPath.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdPath.Tpo $(DEPDIR)/modulecmd-cmdPath.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdPath.c' object='modulecmd-cmdPath.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdPath.o `test -f 'cmdPath.c' || echo '$(srcdir)/'`cmdPath.c modulecmd-cmdPath.obj: cmdPath.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdPath.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdPath.Tpo -c -o modulecmd-cmdPath.obj `if test -f 'cmdPath.c'; then $(CYGPATH_W) 'cmdPath.c'; else $(CYGPATH_W) '$(srcdir)/cmdPath.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdPath.Tpo $(DEPDIR)/modulecmd-cmdPath.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdPath.c' object='modulecmd-cmdPath.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdPath.obj `if test -f 'cmdPath.c'; then $(CYGPATH_W) 'cmdPath.c'; else $(CYGPATH_W) '$(srcdir)/cmdPath.c'; fi` modulecmd-cmdSetenv.o: cmdSetenv.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdSetenv.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdSetenv.Tpo -c -o modulecmd-cmdSetenv.o `test -f 'cmdSetenv.c' || echo '$(srcdir)/'`cmdSetenv.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdSetenv.Tpo $(DEPDIR)/modulecmd-cmdSetenv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdSetenv.c' object='modulecmd-cmdSetenv.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdSetenv.o `test -f 'cmdSetenv.c' || echo '$(srcdir)/'`cmdSetenv.c modulecmd-cmdSetenv.obj: cmdSetenv.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdSetenv.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdSetenv.Tpo -c -o modulecmd-cmdSetenv.obj `if test -f 'cmdSetenv.c'; then $(CYGPATH_W) 'cmdSetenv.c'; else $(CYGPATH_W) '$(srcdir)/cmdSetenv.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdSetenv.Tpo $(DEPDIR)/modulecmd-cmdSetenv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdSetenv.c' object='modulecmd-cmdSetenv.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdSetenv.obj `if test -f 'cmdSetenv.c'; then $(CYGPATH_W) 'cmdSetenv.c'; else $(CYGPATH_W) '$(srcdir)/cmdSetenv.c'; fi` modulecmd-cmdUname.o: cmdUname.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdUname.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdUname.Tpo -c -o modulecmd-cmdUname.o `test -f 'cmdUname.c' || echo '$(srcdir)/'`cmdUname.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdUname.Tpo $(DEPDIR)/modulecmd-cmdUname.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdUname.c' object='modulecmd-cmdUname.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdUname.o `test -f 'cmdUname.c' || echo '$(srcdir)/'`cmdUname.c modulecmd-cmdUname.obj: cmdUname.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdUname.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdUname.Tpo -c -o modulecmd-cmdUname.obj `if test -f 'cmdUname.c'; then $(CYGPATH_W) 'cmdUname.c'; else $(CYGPATH_W) '$(srcdir)/cmdUname.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdUname.Tpo $(DEPDIR)/modulecmd-cmdUname.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdUname.c' object='modulecmd-cmdUname.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdUname.obj `if test -f 'cmdUname.c'; then $(CYGPATH_W) 'cmdUname.c'; else $(CYGPATH_W) '$(srcdir)/cmdUname.c'; fi` modulecmd-cmdXResource.o: cmdXResource.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdXResource.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdXResource.Tpo -c -o modulecmd-cmdXResource.o `test -f 'cmdXResource.c' || echo '$(srcdir)/'`cmdXResource.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdXResource.Tpo $(DEPDIR)/modulecmd-cmdXResource.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdXResource.c' object='modulecmd-cmdXResource.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdXResource.o `test -f 'cmdXResource.c' || echo '$(srcdir)/'`cmdXResource.c modulecmd-cmdXResource.obj: cmdXResource.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdXResource.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdXResource.Tpo -c -o modulecmd-cmdXResource.obj `if test -f 'cmdXResource.c'; then $(CYGPATH_W) 'cmdXResource.c'; else $(CYGPATH_W) '$(srcdir)/cmdXResource.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdXResource.Tpo $(DEPDIR)/modulecmd-cmdXResource.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdXResource.c' object='modulecmd-cmdXResource.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdXResource.obj `if test -f 'cmdXResource.c'; then $(CYGPATH_W) 'cmdXResource.c'; else $(CYGPATH_W) '$(srcdir)/cmdXResource.c'; fi` modulecmd-cmdUlvl.o: cmdUlvl.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdUlvl.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdUlvl.Tpo -c -o modulecmd-cmdUlvl.o `test -f 'cmdUlvl.c' || echo '$(srcdir)/'`cmdUlvl.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdUlvl.Tpo $(DEPDIR)/modulecmd-cmdUlvl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdUlvl.c' object='modulecmd-cmdUlvl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdUlvl.o `test -f 'cmdUlvl.c' || echo '$(srcdir)/'`cmdUlvl.c modulecmd-cmdUlvl.obj: cmdUlvl.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdUlvl.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdUlvl.Tpo -c -o modulecmd-cmdUlvl.obj `if test -f 'cmdUlvl.c'; then $(CYGPATH_W) 'cmdUlvl.c'; else $(CYGPATH_W) '$(srcdir)/cmdUlvl.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdUlvl.Tpo $(DEPDIR)/modulecmd-cmdUlvl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdUlvl.c' object='modulecmd-cmdUlvl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdUlvl.obj `if test -f 'cmdUlvl.c'; then $(CYGPATH_W) 'cmdUlvl.c'; else $(CYGPATH_W) '$(srcdir)/cmdUlvl.c'; fi` modulecmd-cmdLog.o: cmdLog.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdLog.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdLog.Tpo -c -o modulecmd-cmdLog.o `test -f 'cmdLog.c' || echo '$(srcdir)/'`cmdLog.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdLog.Tpo $(DEPDIR)/modulecmd-cmdLog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdLog.c' object='modulecmd-cmdLog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdLog.o `test -f 'cmdLog.c' || echo '$(srcdir)/'`cmdLog.c modulecmd-cmdLog.obj: cmdLog.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdLog.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdLog.Tpo -c -o modulecmd-cmdLog.obj `if test -f 'cmdLog.c'; then $(CYGPATH_W) 'cmdLog.c'; else $(CYGPATH_W) '$(srcdir)/cmdLog.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdLog.Tpo $(DEPDIR)/modulecmd-cmdLog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdLog.c' object='modulecmd-cmdLog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdLog.obj `if test -f 'cmdLog.c'; then $(CYGPATH_W) 'cmdLog.c'; else $(CYGPATH_W) '$(srcdir)/cmdLog.c'; fi` modulecmd-cmdChdir.o: cmdChdir.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdChdir.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdChdir.Tpo -c -o modulecmd-cmdChdir.o `test -f 'cmdChdir.c' || echo '$(srcdir)/'`cmdChdir.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdChdir.Tpo $(DEPDIR)/modulecmd-cmdChdir.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdChdir.c' object='modulecmd-cmdChdir.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdChdir.o `test -f 'cmdChdir.c' || echo '$(srcdir)/'`cmdChdir.c modulecmd-cmdChdir.obj: cmdChdir.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdChdir.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdChdir.Tpo -c -o modulecmd-cmdChdir.obj `if test -f 'cmdChdir.c'; then $(CYGPATH_W) 'cmdChdir.c'; else $(CYGPATH_W) '$(srcdir)/cmdChdir.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdChdir.Tpo $(DEPDIR)/modulecmd-cmdChdir.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdChdir.c' object='modulecmd-cmdChdir.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdChdir.obj `if test -f 'cmdChdir.c'; then $(CYGPATH_W) 'cmdChdir.c'; else $(CYGPATH_W) '$(srcdir)/cmdChdir.c'; fi` modulecmd-cmdTrace.o: cmdTrace.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdTrace.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdTrace.Tpo -c -o modulecmd-cmdTrace.o `test -f 'cmdTrace.c' || echo '$(srcdir)/'`cmdTrace.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdTrace.Tpo $(DEPDIR)/modulecmd-cmdTrace.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdTrace.c' object='modulecmd-cmdTrace.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdTrace.o `test -f 'cmdTrace.c' || echo '$(srcdir)/'`cmdTrace.c modulecmd-cmdTrace.obj: cmdTrace.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdTrace.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdTrace.Tpo -c -o modulecmd-cmdTrace.obj `if test -f 'cmdTrace.c'; then $(CYGPATH_W) 'cmdTrace.c'; else $(CYGPATH_W) '$(srcdir)/cmdTrace.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdTrace.Tpo $(DEPDIR)/modulecmd-cmdTrace.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdTrace.c' object='modulecmd-cmdTrace.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdTrace.obj `if test -f 'cmdTrace.c'; then $(CYGPATH_W) 'cmdTrace.c'; else $(CYGPATH_W) '$(srcdir)/cmdTrace.c'; fi` modulecmd-cmdVersion.o: cmdVersion.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdVersion.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdVersion.Tpo -c -o modulecmd-cmdVersion.o `test -f 'cmdVersion.c' || echo '$(srcdir)/'`cmdVersion.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdVersion.Tpo $(DEPDIR)/modulecmd-cmdVersion.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdVersion.c' object='modulecmd-cmdVersion.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdVersion.o `test -f 'cmdVersion.c' || echo '$(srcdir)/'`cmdVersion.c modulecmd-cmdVersion.obj: cmdVersion.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdVersion.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdVersion.Tpo -c -o modulecmd-cmdVersion.obj `if test -f 'cmdVersion.c'; then $(CYGPATH_W) 'cmdVersion.c'; else $(CYGPATH_W) '$(srcdir)/cmdVersion.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdVersion.Tpo $(DEPDIR)/modulecmd-cmdVersion.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdVersion.c' object='modulecmd-cmdVersion.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdVersion.obj `if test -f 'cmdVersion.c'; then $(CYGPATH_W) 'cmdVersion.c'; else $(CYGPATH_W) '$(srcdir)/cmdVersion.c'; fi` modulecmd-cmdVerbose.o: cmdVerbose.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdVerbose.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdVerbose.Tpo -c -o modulecmd-cmdVerbose.o `test -f 'cmdVerbose.c' || echo '$(srcdir)/'`cmdVerbose.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdVerbose.Tpo $(DEPDIR)/modulecmd-cmdVerbose.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdVerbose.c' object='modulecmd-cmdVerbose.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdVerbose.o `test -f 'cmdVerbose.c' || echo '$(srcdir)/'`cmdVerbose.c modulecmd-cmdVerbose.obj: cmdVerbose.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdVerbose.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdVerbose.Tpo -c -o modulecmd-cmdVerbose.obj `if test -f 'cmdVerbose.c'; then $(CYGPATH_W) 'cmdVerbose.c'; else $(CYGPATH_W) '$(srcdir)/cmdVerbose.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdVerbose.Tpo $(DEPDIR)/modulecmd-cmdVerbose.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdVerbose.c' object='modulecmd-cmdVerbose.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdVerbose.obj `if test -f 'cmdVerbose.c'; then $(CYGPATH_W) 'cmdVerbose.c'; else $(CYGPATH_W) '$(srcdir)/cmdVerbose.c'; fi` modulecmd-cmdWhatis.o: cmdWhatis.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdWhatis.o -MD -MP -MF $(DEPDIR)/modulecmd-cmdWhatis.Tpo -c -o modulecmd-cmdWhatis.o `test -f 'cmdWhatis.c' || echo '$(srcdir)/'`cmdWhatis.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdWhatis.Tpo $(DEPDIR)/modulecmd-cmdWhatis.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdWhatis.c' object='modulecmd-cmdWhatis.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdWhatis.o `test -f 'cmdWhatis.c' || echo '$(srcdir)/'`cmdWhatis.c modulecmd-cmdWhatis.obj: cmdWhatis.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-cmdWhatis.obj -MD -MP -MF $(DEPDIR)/modulecmd-cmdWhatis.Tpo -c -o modulecmd-cmdWhatis.obj `if test -f 'cmdWhatis.c'; then $(CYGPATH_W) 'cmdWhatis.c'; else $(CYGPATH_W) '$(srcdir)/cmdWhatis.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-cmdWhatis.Tpo $(DEPDIR)/modulecmd-cmdWhatis.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdWhatis.c' object='modulecmd-cmdWhatis.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-cmdWhatis.obj `if test -f 'cmdWhatis.c'; then $(CYGPATH_W) 'cmdWhatis.c'; else $(CYGPATH_W) '$(srcdir)/cmdWhatis.c'; fi` modulecmd-init.o: init.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-init.o -MD -MP -MF $(DEPDIR)/modulecmd-init.Tpo -c -o modulecmd-init.o `test -f 'init.c' || echo '$(srcdir)/'`init.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-init.Tpo $(DEPDIR)/modulecmd-init.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='init.c' object='modulecmd-init.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-init.o `test -f 'init.c' || echo '$(srcdir)/'`init.c modulecmd-init.obj: init.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-init.obj -MD -MP -MF $(DEPDIR)/modulecmd-init.Tpo -c -o modulecmd-init.obj `if test -f 'init.c'; then $(CYGPATH_W) 'init.c'; else $(CYGPATH_W) '$(srcdir)/init.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-init.Tpo $(DEPDIR)/modulecmd-init.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='init.c' object='modulecmd-init.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-init.obj `if test -f 'init.c'; then $(CYGPATH_W) 'init.c'; else $(CYGPATH_W) '$(srcdir)/init.c'; fi` modulecmd-locate_module.o: locate_module.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-locate_module.o -MD -MP -MF $(DEPDIR)/modulecmd-locate_module.Tpo -c -o modulecmd-locate_module.o `test -f 'locate_module.c' || echo '$(srcdir)/'`locate_module.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-locate_module.Tpo $(DEPDIR)/modulecmd-locate_module.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='locate_module.c' object='modulecmd-locate_module.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-locate_module.o `test -f 'locate_module.c' || echo '$(srcdir)/'`locate_module.c modulecmd-locate_module.obj: locate_module.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-locate_module.obj -MD -MP -MF $(DEPDIR)/modulecmd-locate_module.Tpo -c -o modulecmd-locate_module.obj `if test -f 'locate_module.c'; then $(CYGPATH_W) 'locate_module.c'; else $(CYGPATH_W) '$(srcdir)/locate_module.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-locate_module.Tpo $(DEPDIR)/modulecmd-locate_module.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='locate_module.c' object='modulecmd-locate_module.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-locate_module.obj `if test -f 'locate_module.c'; then $(CYGPATH_W) 'locate_module.c'; else $(CYGPATH_W) '$(srcdir)/locate_module.c'; fi` modulecmd-utility.o: utility.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-utility.o -MD -MP -MF $(DEPDIR)/modulecmd-utility.Tpo -c -o modulecmd-utility.o `test -f 'utility.c' || echo '$(srcdir)/'`utility.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-utility.Tpo $(DEPDIR)/modulecmd-utility.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utility.c' object='modulecmd-utility.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-utility.o `test -f 'utility.c' || echo '$(srcdir)/'`utility.c modulecmd-utility.obj: utility.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-utility.obj -MD -MP -MF $(DEPDIR)/modulecmd-utility.Tpo -c -o modulecmd-utility.obj `if test -f 'utility.c'; then $(CYGPATH_W) 'utility.c'; else $(CYGPATH_W) '$(srcdir)/utility.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-utility.Tpo $(DEPDIR)/modulecmd-utility.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utility.c' object='modulecmd-utility.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-utility.obj `if test -f 'utility.c'; then $(CYGPATH_W) 'utility.c'; else $(CYGPATH_W) '$(srcdir)/utility.c'; fi` modulecmd-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-main.o -MD -MP -MF $(DEPDIR)/modulecmd-main.Tpo -c -o modulecmd-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-main.Tpo $(DEPDIR)/modulecmd-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='modulecmd-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c modulecmd-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-main.obj -MD -MP -MF $(DEPDIR)/modulecmd-main.Tpo -c -o modulecmd-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-main.Tpo $(DEPDIR)/modulecmd-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='modulecmd-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` modulecmd-error.o: error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-error.o -MD -MP -MF $(DEPDIR)/modulecmd-error.Tpo -c -o modulecmd-error.o `test -f 'error.c' || echo '$(srcdir)/'`error.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-error.Tpo $(DEPDIR)/modulecmd-error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error.c' object='modulecmd-error.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-error.o `test -f 'error.c' || echo '$(srcdir)/'`error.c modulecmd-error.obj: error.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-error.obj -MD -MP -MF $(DEPDIR)/modulecmd-error.Tpo -c -o modulecmd-error.obj `if test -f 'error.c'; then $(CYGPATH_W) 'error.c'; else $(CYGPATH_W) '$(srcdir)/error.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-error.Tpo $(DEPDIR)/modulecmd-error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error.c' object='modulecmd-error.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-error.obj `if test -f 'error.c'; then $(CYGPATH_W) 'error.c'; else $(CYGPATH_W) '$(srcdir)/error.c'; fi` modulecmd-getopt.o: getopt.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-getopt.o -MD -MP -MF $(DEPDIR)/modulecmd-getopt.Tpo -c -o modulecmd-getopt.o `test -f 'getopt.c' || echo '$(srcdir)/'`getopt.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-getopt.Tpo $(DEPDIR)/modulecmd-getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getopt.c' object='modulecmd-getopt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-getopt.o `test -f 'getopt.c' || echo '$(srcdir)/'`getopt.c modulecmd-getopt.obj: getopt.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-getopt.obj -MD -MP -MF $(DEPDIR)/modulecmd-getopt.Tpo -c -o modulecmd-getopt.obj `if test -f 'getopt.c'; then $(CYGPATH_W) 'getopt.c'; else $(CYGPATH_W) '$(srcdir)/getopt.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-getopt.Tpo $(DEPDIR)/modulecmd-getopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getopt.c' object='modulecmd-getopt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-getopt.obj `if test -f 'getopt.c'; then $(CYGPATH_W) 'getopt.c'; else $(CYGPATH_W) '$(srcdir)/getopt.c'; fi` modulecmd-version.o: version.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-version.o -MD -MP -MF $(DEPDIR)/modulecmd-version.Tpo -c -o modulecmd-version.o `test -f 'version.c' || echo '$(srcdir)/'`version.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-version.Tpo $(DEPDIR)/modulecmd-version.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='version.c' object='modulecmd-version.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-version.o `test -f 'version.c' || echo '$(srcdir)/'`version.c modulecmd-version.obj: version.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -MT modulecmd-version.obj -MD -MP -MF $(DEPDIR)/modulecmd-version.Tpo -c -o modulecmd-version.obj `if test -f 'version.c'; then $(CYGPATH_W) 'version.c'; else $(CYGPATH_W) '$(srcdir)/version.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/modulecmd-version.Tpo $(DEPDIR)/modulecmd-version.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='version.c' object='modulecmd-version.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(modulecmd_CFLAGS) $(CFLAGS) -c -o modulecmd-version.obj `if test -f 'version.c'; then $(CYGPATH_W) 'version.c'; else $(CYGPATH_W) '$(srcdir)/version.c'; fi` install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-man4: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man4dir)" || $(MKDIR_P) "$(DESTDIR)$(man4dir)" @list=''; test -n "$(man4dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.4[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man4dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man4dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man4dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man4dir)" || exit $$?; }; \ done; } uninstall-man4: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man4dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.4[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man4dir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-DEJAGNU: site.exp srcdir='$(srcdir)'; export srcdir; \ EXPECT=$(EXPECT); export EXPECT; \ runtest=$(RUNTEST); \ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \ if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ then :; else exit_status=1; fi; \ done; \ else echo "WARNING: could not find \`runtest'" 1>&2; :;\ fi; \ exit $$exit_status site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG) @echo 'Making a new site.exp file...' @echo '## these variables are automatically generated by make ##' >site.tmp @echo '# Do not edit here. If you wish to override these values' >>site.tmp @echo '# edit the last section' >>site.tmp @echo 'set srcdir "$(srcdir)"' >>site.tmp @echo "set objdir `pwd`" >>site.tmp @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \ echo "## Begin content included from file $$f. Do not modify. ##" \ && cat `test -f "$$f" || echo '$(srcdir)/'`$$f \ && echo "## End content included from file $$f. ##" \ || exit 1; \ done >> site.tmp @echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp @if test -f site.exp; then \ sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \ fi @-rm -f site.bak @test ! -f site.exp || mv site.exp site.bak @mv site.tmp site.exp distclean-DEJAGNU: -rm -f site.exp site.bak -l='$(DEJATOOL)'; for tool in $$l; do \ rm -f $$tool.sum $$tool.log; \ done distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU check-local check: check-recursive all-am: Makefile $(PROGRAMS) $(MANS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man4dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-DEJAGNU distclean-compile \ distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-man install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-man4 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 uninstall-man4 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-DEJAGNU check-am \ check-local clean clean-binPROGRAMS clean-generic ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \ dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-DEJAGNU distclean-compile \ distclean-generic distclean-hdr distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-man4 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-man uninstall-man1 \ uninstall-man4 test: check-local check-local: modulecmd MODULEVERSION=@VERSION@; export MODULEVERSION; \ TESTSUITEDIR=$(srcdir)/testsuite; export TESTSUITEDIR; \ $(RUNTEST) --srcdir $$TESTSUITEDIR \ $(AM_RUNTESTFLAGS) $(RUNTESTFLAGS) --tool=modules ctags: CTAGS CTAGS: $(modulecmd_SOURCES) ctags $(modulecmd_SOURCES) $(SOURCES_H) cxref: $(MAKE) clean # may need to edit the cxref-cc script setting # EGREP=/bin/egrep $(MAKE) CC=cxref-cc CXREFCC=$(CC) # cxref-cc $(modulecmd_SOURCES) $(SOURCES_H) @echo "===============================" @echo "You may need to run this twice!" @echo "===============================" patch: $(srcdir)/configure @echo "Creating patch file -- do this after CVS tagging" ${CVS} rdiff -c \ -r `${SED} -n -e 's/^.*OLD TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \ -r `${SED} -n -e 's/^.*NEW TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \ modules | ${GZIP} -c \ > modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff.gz ${CVS} rdiff -c \ -r `${SED} -n -e 's/^.*OLD TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \ -r `${SED} -n -e 's/^.*NEW TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \ modules | ${BZIP2} -c \ > modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff.bz2 tag: @echo "CVS tagging - TAG = "\ `${SED} -n -e 's/^.*NEW TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` ${CVS} rtag -b -F \ `${SED} -n -e 's/^.*NEW TAG.*"\(.*\)".*$$/\1/p' ${srcdir}/version.c` \ modules ChangeLog: CL CL: rmChangeLog @echo "Updating ChangeLog" -@./gitlog2changelog.py rmChangeLog: -@rm -f ChangeLog lsm: # sends off the modules.lsm file to update the Linux Software Map # this should be done by the maintainer (R.K.Owen) only! mail -s add modules@kooz.sj.ca.us,lsm@execpc.com < modules.lsm ftp-local: dist # this should be done by the maintainer (R.K.Owen) only! @echo "placing $(DISTNAME).tar.{gz|bz2}" -@if [ -e $(DISTNAME).tar.gz ]; then \ cp $(DISTNAME).tar.gz /u/ftp/pub/rkowen/modules; \ else echo "Can't find $(DISTNAME).tar.gz"; fi -@if [ -e $(DISTNAME).tar.bz2 ]; then \ cp $(DISTNAME).tar.bz2 /u/ftp/pub/rkowen/modules; \ else echo "Can't find $(DISTNAME).tar.bz2"; fi -@XXX=modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff.gz ; \ echo "placing $$XXX"; \ if [ -e $$XXX ]; then \ cp $$XXX /u/ftp/pub/rkowen/modules; \ else echo "Can't find $$XXX"; fi -@XXX=modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff.bz2 ; \ echo "placing $$XXX"; \ if [ -e $$XXX ]; then \ cp $$XXX /u/ftp/pub/rkowen/modules; \ else echo "Can't find $$XXX"; fi -@echo "placing modules.lsm" -@if [ -e modules.lsm ]; then \ cp modules.lsm /u/ftp/pub/rkowen/modules; \ else echo "Can't find modules.lsm"; fi dist-hook: CL -rm -rf `find $(distdir) -name CVS` ftp: ftp-ibiblio ftp-sourceforge ftp-ibiblio: dist # do local files first ... mostly to verify their existence # this should be done by the maintainer (R.K.Owen) only! @echo "placing ftp.ibiblio.org files"; -@XXX=modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff."*" ; \ echo "placing modules.lsm $$XXX $(DISTNAME).tar.*"; \ ./.ftp ftp.ibiblio.org /incoming/linux \ modules.lsm $$XXX $(DISTNAME).tar.*; ftp-sourceforge: dist @echo "placing modules.sourceforge.net files"; -@XXX=modules-`${SED} -n -e 's/^.*OLD TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`-`${SED} -n -e 's/^.*NEW TAG.*"modules-\([0-9]*\)-\([0-9]*\)-\([0-9]*\)".*$$/\1.\2.\3/p' ${srcdir}/version.c`.diff."*" ; \ echo "placing modules.lsm $$XXX $(DISTNAME).tar."*""; \ scp modules.lsm $$XXX $(DISTNAME).tar.* rkowen@shell.sourceforge.net:ftp ./.ftp upload.sourceforge.net /incoming \ modules.lsm $$XXX $(DISTNAME).tar.*; help: @echo "" @echo "make - compiles sources to executable" @echo "make all - same as above" @echo "make check - runs test suite - needs dejagnu runtest" @echo "make install - copy program & man pages to destination" @echo "make clean - cleans out most useless files" @echo "make disthelp - extra help for developers" @echo "" disthelp: @echo "make ctags - creates the vi ctags file" @echo "make cxref - makes the xref HTML files - needs cxref" @echo "make dist - creates a distribution tarballs" @echo "make distclean - cleans & removes most made files" @echo "make maintainer-clean - cleans even more" @echo "================ requires git access =======================" # @echo "make tag - does a git rtag" @echo "make CL - remakes the ChangeLog from the git commits" # @echo "make patch - creates a patch file after tagging" @echo "================ maintainers only ==========================" @echo "make lsm - send off to the Linux Software Map" @echo "make ftp-local - upload tarball (good test)" @echo "make ftp-ibiblio - upload to ibiblio" @echo "make ftp-sourceforge - upload to sourceforge" @echo "make ftp - upload to both ibiblio & sourceforge" @echo "" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: modules-3.2.10/ModuleCmd_Avail.c000066400000000000000000001561411210077407400164100ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: Modulate_Avail.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: This module command prints out the modulefiles that ** ** are available in the directories listed in the ** ** MODULEPATH environment variable. ** ** ** ** Exports: ModuleCmd_Avail ** ** print_aligned_files ** ** check_dir ** ** get_dir ** ** dirlst_to_list ** ** delete_dirlst ** ** delete_cache_list ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 251840d8d1143e2ca603d419068bc07b85ae78bc $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include #include "modules_def.h" #if defined HAVE_STRCOLL && defined HAVE_LOCALE_H && defined HAVE_SETLOCALE # include #endif /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** ** Structure for a linked list that stores directories to be listed. **/ typedef struct _subdir_node { fi_ent* sd_dir; struct _subdir_node* sd_next; } sd_node; /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** ** I tried having a test for isgraph() in the configuration file, ** but it fails on AIX. This is the best I could come up with... **/ #if !defined(isgraph) && defined(_P) && defined(_N) #define isgraph(c) ((_ctype_+1)[c]&(_P|_U|_L|_N)) #endif #define DIREST 50 #define CACHE_VERSION "v3.0.0" #if !defined(CACHE_UMASK) #define CACHE_UMASK 0 #endif /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ #ifdef CACHE_AVAIL static char *namebuf = NULL; #endif static char buffer[MOD_BUFSIZE]; static char buf[ LINELENGTH]; static char module_name[] = "ModuleCmd_Avail.c"; /** File name of this module **/ #if WITH_DEBUGGING_MODULECMD static char _proc_ModuleCmd_Avail[] = "ModuleCmd_Avail"; #endif #if WITH_DEBUGGING_UTIL_1 static char _proc_print_dir[] = "print_dir"; static char _proc_print_aligned_files[] = "print_aligned_files"; #endif #if WITH_DEBUGGING_UTIL_2 static char _proc_check_dir[] = "check_dir"; static char _proc_get_dir[] = "get_dir"; static char _proc_dirlst_to_list[] = "dirlst_to_list"; static char _proc_delete_dirlst[] = "delete_dirlst"; static char _proc_store_files[] = "store_files"; static char _proc_store_dirlst[] = "store_dirlst"; static char _proc_store_file[] = "store_file"; #ifdef CACHE_AVAIL static char _proc_create_cache_list[] = "create_cache_list"; #endif static char _proc_delete_cache_list[] = "delete_cache_list"; static char _proc_print_spaced_file[] = "print_spaced_file"; static char _proc_mkdirnm[] = "mkdirnm"; #endif #if WITH_DEBUGGING static char buffer1[ 80], buffer2[ 80]; #endif static char short_format[] = "%s"; static char short_format_part[] = "%s/%s"; static char short_format_full[] = "%s/%s(%s)"; static char long_format[] = "%-39.39s %-10.10s %17s\n"; char long_header[] = "\ - Package -----------------------------+- Versions -+- Last mod. ------\n"; /** ** Terse file list buffer **/ #define FILE_LIST_SEGM_SIZE 100 static char _file_list_buffer[ 200]; static char **_file_list_ptr = (char **) NULL; static int _file_list_cnt = 0; static int _file_list_wr_ndx = 0; static int _file_list_rd_ndx = 0; /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ static int print_dir( Tcl_Interp*, char*, char*); #ifdef CACHE_AVAIL static void store_dirlst( FILE*, FILE*, fi_ent*, int, char*); static void store_files( fi_ent*, int, int, char*); static void store_file( FILE*, char*, fi_ent*); #endif static void print_spaced_file( char*, int, int, int); static char *mkdirnm( char*, char*); static int fi_ent_cmp( const void*, const void*); #ifdef CACHE_AVAIL static int check_cache( char *dir); #endif static void _init_file_list(void); static void _add_file_list( char *name); static char *_get_file_list(void); static char *_pick_file_list( int ndx); static void print_terse_files( int terminal_width, int len, char *header, int numbered); #ifdef CACHE_AVAIL static char **create_cache_list( FILE*, int*, char* ); #endif /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ModuleCmd_Avail ** ** ** ** Description: Execution of the 'module avail' command ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp Current Tcl Interpr. ** ** char *argv[] Arguments to the ** ** command ** ** ** ** Result: int TCL_OK Successful operation ** ** TCL_ERROR Any failure ** ** ** ** Attached Globals: g_specified_module The module name from the ** ** command line. ** ** ** ** ************************************************************************ ** ++++*/ int ModuleCmd_Avail( Tcl_Interp *interp, int argc, char *argv[]) { char *dirname; char *modpath; int Result = -TCL_ERROR; #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_START, LOC, _proc_ModuleCmd_Avail, NULL); #endif /** ** If there's no MODULEPATH defined, we cannot output anything ** We perform 1 level of env.var. expansion **/ if( !(modpath = (char *) xgetenv( "MODULEPATH"))) if( OK != ErrorLogger( ERR_MODULE_PATH, LOC, NULL)) goto unwind0; #ifdef CACHE_AVAIL if( (char *) NULL == (namebuf = stringer(NULL, MOD_BUFSIZE, NULL))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) goto unwind1; #endif #if defined HAVE_STRCOLL && defined HAVE_SETLOCALE /** ** define the collation order using the locale **/ (void) setlocale(LC_COLLATE,""); #endif /** ** If we're given a full-path, then we'll just check that directory. ** Otherwise, we'll check every directory in MODULESPATH. **/ if( argc > 0 && **argv == '/') { while( argc--) { /** ** Set the name of the module specified on the command line **/ g_specified_module = *argv; if( !check_dir( *argv)) if( OK != ErrorLogger( ERR_PARAM, LOC, NULL)) { Result = TCL_ERROR; /** --- EXIT PROCEDURE (FAILURE) --> **/ } else print_dir( interp, *argv, NULL); argv++; } } else { /** ** We're not given a full path. Tokenize the module path string and ** print the contents of each directory specified (if it exists ;-) **/ if( sw_format & SW_LONG) fprintf( stderr, long_header); /** ** If a module category is specified check whether it is part ** of the directory we're scanning at the moment. **/ if( argc > 0) { /* show sub directory */ while( argc--) { /** ** Set the name of the module specified on the command line **/ g_specified_module = *argv; dirname = modpath; while( dirname && *dirname) { /** ** We cannot use strtok here, because it interfers with ** subsequent calls while printing the list **/ char *s; if( s = strchr( dirname, ':')) *s++ = '\0'; /** ** Print the cathegory **/ if( check_dir( dirname)) print_dir( interp, dirname, *argv); dirname = s; } argv++; } /** ** Otherwise, if there's no category given, descend the current ** directory and print its contents. **/ } else { dirname = modpath; while( dirname && *dirname) { /** ** We cannot use strtok here, because it interfers with ** subsequent calls while printing the list **/ char *s; if( s = strchr( dirname, ':')) *s++ = '\0'; /** ** Second part of tokenization **/ if( check_dir( dirname)) print_dir( interp, dirname, NULL); dirname = s; } } /** for **/ } /** if( no full path name given) **/ /** ** Free up what has been allocated and exit from this procedure **/ /* if got here via this path ... it must have been OK */ if(Result < 0) Result = TCL_OK; unwind2: #ifdef CACHE_AVAIL null_free((void *) &namebuf); #endif unwind1: null_free((void *) &modpath); unwind0: #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_END, LOC, _proc_ModuleCmd_Avail, NULL); #endif /* if Result is negative here ... must have been an unwind */ if (Result < 0) Result = -Result; return( Result); /** --- EXIT PROCEDURE (FAILURE/SUCCESS) --> **/ } /** End of 'ModuleCmd_Avail' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: check_dir ** ** ** ** Description: Open and close the passed directory in order to check** ** if it does exist and is readable ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: char *dirname Name of the directory to be ** ** checked ** ** ** ** Result: int 0 Not a directory or unreadable ** ** 1 OK ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ int check_dir( char *dirname) { DIR* dirp; #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_check_dir, NULL); #endif if( !(dirp = opendir( dirname))) return( 0); if( -1 == closedir( dirp)) if( OK != ErrorLogger( ERR_CLOSEDIR, LOC, dirname, NULL)) return( 0); return( 1); } /** End of 'check_dir' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: print_dir ** ** ** ** Description: Print all files beyond the passed directory ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: char *dir Directory to be scanned ** ** char *module A selcted module name or NULL** ** ** ** Result: int TCL_OK Successful operation ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ static int print_dir( Tcl_Interp *interp, char *dir, char *module) { fi_ent *dirlst_head = NULL; /** Directory list base pointer **/ int count = 0; /** Number of elements in the top **/ /** level directory list **/ int tcount = 0; /** Total number of files to print **/ int start = 0; int dirlen; char **cache_list = NULL; char *selection, *s; #ifdef CACHE_AVAIL int usecache; FILE *fi; #endif #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_print_dir, "dir='", dir, NULL); #endif /** ** Print the directory name **/ if( (sw_format & (SW_PARSE | SW_TERSE | SW_LONG)) && !(sw_format & (SW_HUMAN | SW_LIST)) ) { /* char *base = strrchr( dir, '/'); fprintf( stderr, "%s:\n", base ? ++base : dir); */ fprintf( stderr, "%s:\n", dir); } if( dir) dirlen = strlen( dir) + 1; else dirlen = 0; /** ** If the is a module selection given, build the whole selected path **/ if( module) { if( dir) { if((char *) NULL == (selection = stringer(NULL, 0, dir,"/",module, NULL))) { ErrorLogger( ERR_STRING, LOC, NULL); return( TCL_ERROR); /** --- EXIT (FAILURE) --------> **/ } } else selection = module; } else selection = (char *) NULL; #ifdef CACHE_AVAIL /** ** Ensure any files I create can be read and written by everyone **/ umask( CACHE_UMASK); /** ** OK, if cache is to be used, go on reading the entire cache. ** In case of success print the files. Otherwise read the files ** from the file system and rebuild the cache. **/ if( usecache = check_cache( dir)) { if( !sw_create) { if( (char *) NULL == stringer(namebuf, MOD_BUFSIZE, dir, "/.moduleavailcache", NULL)) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind1; if( NULL == (fi = fopen( namebuf, "r"))) { if( OK != ErrorLogger( ERR_OPEN, LOC, namebuf, "reading", NULL)) goto unwind1; } else { cache_list = create_cache_list( fi, &tcount, selection); /** ** Close the cache file **/ if( EOF == fclose( fi)) if( OK != ErrorLogger( ERR_CLOSE, LOC, namebuf, NULL)) goto unwind1; } } /** if( !create) **/ } #endif if( !cache_list) { #ifdef CACHE_AVAIL usecache = 0; #endif /** ** Normal reading of the files **/ if( NULL == (dirlst_head = get_dir( dir, NULL, &count, &tcount))) if( OK != ErrorLogger( ERR_READDIR, LOC, dir, NULL)) goto unwind1; if( NULL == (cache_list = (char**) module_malloc(tcount * sizeof(char**)))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) goto unwind1; (void) memset(cache_list, 0, tcount * sizeof( char **)); start=0; dirlst_to_list( cache_list, dirlst_head, count, &start, dir, selection); } #ifdef CACHE_AVAIL /** ** Now open the files used for caching ** In case of any error flush out the read files and exit **/ if( !usecache && sw_create) store_files( dirlst_head, count, tcount, dir); #endif /** ** In case of any selection, we have to force all .modulrc's and .versions ** on the path **/ if( dir) { s = dir; while( s) { if( s = strchr( s, '/')) *s = '\0'; else break; SourceRC( interp, dir, modulerc_file); SourceVers( interp, dir, module); if( s) *s++ = '/'; } /** ** Finally source the rc files in the directory itself **/ SourceRC( interp, dir, modulerc_file); SourceVers( interp, dir, module); } if( dir && selection) null_free((void *) &selection); /** ** Print and remove the cache list **/ delete_dirlst( dirlst_head, count); print_aligned_files( interp, dir, dir, cache_list, tcount, (sw_format & SW_LIST ? 1 : -1)); delete_cache_list( cache_list, start); if( sw_format & SW_LONG) fprintf( stderr, "\n"); return( TCL_OK); /** ------- EXIT (SUCCESS) --------> **/ unwind1: if( dir && selection) null_free((void *) &selection); unwind0: return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ } /** End of 'print_dir' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: check_cache ** ** ** ** Description: Check whether an avail cache exists and is not out ** ** of date ** ** ** ** First Edition: 1996/01/03 ** ** ** ** Parameters: char *dir Directory to be checked ** ** ** ** Result: int 0 Do not use the cache ** ** 1 Use the cache ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ #ifdef CACHE_AVAIL static int check_cache( char *dir) { time_t dir_time=0, cache_time=0, info_time=0; struct stat dir_stats, cache_stats; FILE *cdir; /** ** Check if a cache file exists. And if it does, check if it is ** younger than the related directory. **/ if( (char *) NULL == stringer(namebuf, MOD_BUFSIZE, dir, "/.moduleavailcachedir", NULL)) return( 0); if( NULL != (cdir = fopen( namebuf, "r"))) { if( stat( dir, &dir_stats) != -1) { if( stat( namebuf, &cache_stats) != -1) { dir_time = dir_stats.st_mtime; cache_time = cache_stats.st_mtime; } if( dir_time > cache_time) { return( 0); } } /** ** Also check if the modification date of the cached files isn't ** younger than the one derivered from the cache **/ while( !feof(cdir)) { if( fscanf( cdir, "%s %d\n", buf, (int *)&info_time) != 2) continue; if( stat( buf, &dir_stats) != -1) { if( dir_stats.st_mtime <= info_time) continue; } return( 0); } /** ** Close the cache file **/ if( EOF == fclose( cdir)) if( OK != ErrorLogger( ERR_CLOSE, LOC, namebuf, NULL)) return( 0); /** ------- EXIT (FAILURE) --------> **/ return( 1); } return( 0); } /** End of 'check_cache' **/ #endif static int test_version_dir( struct dirent *dp) { } /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: get_dir ** ** ** ** Description: Read in the passed directory and save every interes- ** ** ting item in the directory list ** ** skipping known version control directories: ** ** CVS RCS .svn ** ** unless they contain .version files ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: char *dir Directory to be read ** ** char *prefix Directory prefix (path) ** ** int *listcount Buffer to store the number of** ** elements in the current ** ** directory list ** ** int *total_count Buffer for the total number ** ** of files read ** ** ** ** Result: fi_ent* NULL Failure ** ** else Directory list base pointer ** ** *listcount Number of elements in the ** ** top level directory list ** ** *total_count Total number of files read ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ fi_ent *get_dir( char *dir, char *prefix, int *listcount, int *total_count) { struct dirent *dp; /** Directory read pointer **/ DIR *dirptr; /** Directory handle **/ fi_ent *dirlst_head, /** Directory list pointers. Head, **/ *dirlst_cur, /** current **/ *dirlst_last; /** and last **/ char *dirname; /** Expanded directory path name **/ char *tmp; int count = 0; #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_get_dir, NULL); #endif /** ** Open the desired directiory **/ if( !(dirptr = opendir( dir))) { #if 0 /* if you can't open a directory ... is that really an error? */ if( OK != ErrorLogger( ERR_OPENDIR, LOC, dir, NULL)) #endif return( NULL); /** ----------- EXIT (FAILURE) ------------> **/ } /** ** Allocate memory for reading in the directory **/ if(!(dirlst_cur = dirlst_head = (fi_ent*) module_malloc( DIREST * sizeof( fi_ent)))) { if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) { if( -1 == closedir( dirptr)) ErrorLogger( ERR_CLOSEDIR, LOC, dir, NULL); goto unwind0; } } dirlst_last = dirlst_head + DIREST; /** ** Read in the contents of the directory. Ignore dotfiles ** and version directories. **/ for( count = 0, dp = readdir( dirptr); dp != NULL; dp = readdir( dirptr)) { if( *dp->d_name == '.') continue; /** ** Conditionally double up the space allocated for reading the direc- ** tory **/ if(dirlst_cur == dirlst_last) { if(!(dirlst_head = (fi_ent*) module_realloc( (char*) dirlst_head, (count<<1) * sizeof( fi_ent)))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) goto unwind0; dirlst_cur = dirlst_head + count; dirlst_last = dirlst_head + (count<<1); } /** ** Build the complete path name and get information about the file **/ if( !( dirname = mkdirnm( dir, dp->d_name))) if( OK != ErrorLogger( ERR_DIRNAME, LOC, NULL)) { if( -1 == closedir( dirptr)) ErrorLogger( ERR_CLOSEDIR, LOC, dir, NULL); goto unwind1; } if( stat( dirname, &(dirlst_cur->fi_stats)) < 0) if( OK != ErrorLogger( ERR_DIRNOTFOUND, LOC, dirname, NULL)) { if( -1 == closedir( dirptr)) ErrorLogger( ERR_CLOSEDIR, LOC, dir, NULL); goto unwind1; } /** ** If it is a directory, recursively delve into it .. **/ if(dirlst_cur->fi_stats.st_mode & S_IFDIR) { char* np; char* ndir; int tmpcount = 0; /** ** Build the new base points for the recursion **/ if( !( tmp = mkdirnm( prefix, dp->d_name))) { if( OK != ErrorLogger( ERR_DIRNAME, LOC, NULL)) { if( -1 == closedir( dirptr)) ErrorLogger( ERR_CLOSEDIR, LOC, dir, NULL); goto unwind1; } } else { if( NULL == (np = strdup( tmp))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) goto unwind1; } if( !( tmp = mkdirnm( dir, dp->d_name))) { if( OK != ErrorLogger( ERR_DIRNAME, LOC, NULL)) { if( -1 == closedir( dirptr)) ErrorLogger( ERR_CLOSEDIR, LOC, dir, NULL); goto unwind1; } } else { if( NULL == (ndir = strdup( tmp))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) goto unwind1; } /** ** What if it's a known version control directory ** check if it has a .version file **/ if (!strcmp("CVS",dp->d_name) || !strcmp("RCS",dp->d_name) || !strcmp(".svn",dp->d_name)) { FILE *fi; if( (char *) NULL == stringer(buffer, MOD_BUFSIZE, tmp, "/.version", NULL)) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind1; if( NULL == (fi = fopen( buffer, "r"))) { /* does not have a .version file */ continue; } else { /* has a .version file ... assume to be module dir */ fclose(fi); } } /** ** The recursion itself ... **/ dirlst_cur->fi_subdir = get_dir( ndir,np,&dirlst_cur->fi_listcount, &tmpcount); /** ** Add the number of real modulefiles (i.e. not subdirs and ** not non-modulefiles) to our total number of modulefiles ** contained in the structure. **/ *total_count += tmpcount; /** ** This means that it's an empty directory so the prefix is ** never used **/ if( !dirlst_cur->fi_listcount) null_free((void *) &np); null_free((void *) &ndir); /** ** if it is not a directory check the magic cookie of the file. Only ** files with the modules magic cookie will be accepted. Also tem- ** porary files are to be ignored. **/ } else if( dp->d_name[NLENGTH(dp)-1] == '~' || !check_magic( dirname, MODULES_MAGIC_COOKIE, MODULES_MAGIC_COOKIE_LENGTH)) { continue; } else { dirlst_cur->fi_subdir = NULL; } /** ** Put the name of the file on the directory list **/ dirlst_cur->fi_prefix = prefix; if( NULL == (dirlst_cur->fi_name = strdup( dp->d_name))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) goto unwind1; /** ** Count even the number of elements in the current list as the ** total number of elements read in so far. ** Increment the list index to be prepared for the next entry. **/ count++; (*total_count)++; dirlst_cur++; } /** for **/ /** ** Now sort alphabetically what has been read **/ if( count > 1) qsort( dirlst_head, count, sizeof(fi_ent), fi_ent_cmp); /** ** Close the directory, set up return values **/ if( -1 == closedir( dirptr)) if( OK != ErrorLogger( ERR_CLOSEDIR, LOC, dir, NULL)) goto unwind1; *listcount = count; return( dirlst_head); /** ----------- EXIT (SUCCESS) ------------> **/ unwind1: null_free((void *) &dirlst_cur); unwind0: return( NULL); /** ----------- EXIT (FAILURE) ------------> **/ } /** End of 'get_dir' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: dirlst_to_list ** ** ** ** Description: Transform the passed nested directory list into a ** ** flat list of strings ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: char **list List to be created ** ** fi_ent *dirlst_head Head of the directory list ** ** to be transformed ** ** int count Number of elements in the ** ** directory list ** ** int *beginning Index of the element in List ** ** to start appending the file- ** ** names at. ** ** char *path prepend pathname to list ** ** char *module A search pattern ** ** ** ** Result: - ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ void dirlst_to_list( char **list, fi_ent *dirlst_head, int count, int *beginning, char *path, char *module) { fi_ent *dirlst_cur; int i; char *ptr; int mlen; /** ** If there's any selection given, figure out its length **/ if( module) mlen = strlen( module); /** ** Put all files in the directory list at the end of the passed list ** of character arrays **/ #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_dirlst_to_list, NULL); #endif for( i=0, dirlst_cur=dirlst_head; ifi_prefix) { if( path) { if( (char *) NULL == stringer(buf, MOD_BUFSIZE, path,"/", dirlst_cur->fi_prefix,"/", dirlst_cur->fi_name, NULL)) return; } else { if( (char *) NULL == stringer(buf, MOD_BUFSIZE, dirlst_cur->fi_prefix,"/", dirlst_cur->fi_name, NULL)) return; } ptr = buf; } else { if( path) { if( (char *) NULL == stringer(buf, MOD_BUFSIZE, path,"/", dirlst_cur->fi_name, NULL)) return; ptr = buf; } else ptr = dirlst_cur->fi_name; } /** ** Check whether this is part of the selected modules ... **/ if( !module || !strncmp( module, buf, mlen)) { /** ** Put this guy on the list **/ if( NULL == (list[(*beginning)++] = strdup( ptr))) { if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) { while( i--) null_free((void *) list + (--(*beginning))); return; /** ------- EXIT (FAILURE) --------> **/ } } } /** ** recursively descend to subdirectories **/ if( dirlst_cur->fi_subdir) dirlst_to_list( list, dirlst_cur->fi_subdir, dirlst_cur->fi_listcount, beginning, path, module); } /** for **/ } /** end of 'dirlst_to_list' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: delete_dirlst ** ** ** ** Description: Delete an entire directory list including all sub- ** ** directory lists ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: fi_ent *dirlst_head Head of the list to be re- ** ** moved ** ** ** ** Result: - ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ void delete_dirlst( fi_ent *dirlst_head, int count) { fi_ent *dirlst_cur; int i; #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_delete_dirlst, NULL); #endif if( !dirlst_head) return; /** ** Free all filenames stored in the list **/ for( i=0, dirlst_cur=dirlst_head; ifi_name)); /** ** Recursivle decend to subdirectories **/ if( dirlst_cur->fi_subdir) delete_dirlst( dirlst_cur->fi_subdir, dirlst_cur->fi_listcount); } /** for **/ /** ** Remove the entire list **/ if( dirlst_head->fi_prefix) null_free((void *) &(dirlst_head->fi_prefix)); null_free((void *) &dirlst_head); } /** End of 'delete_dirlst' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: store_files ** ** ** ** Description: Write a cache file using the given directory list ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: fi_ent *dirlist_head List of files to be printed ** ** int count Number of entries in the pas-** ** sed 'dirlist' ** ** int tcount Number of entries to write to** ** the cache file. This id the ** ** total number of files stores ** ** in the nested directory lists** ** char *dir The current directory ** ** ** ** Result: - ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ #ifdef CACHE_AVAIL static void store_files( fi_ent *dirlst_head, int count, int tcount, char *dir) { FILE *fi, *cdir; #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_store_files, NULL); #endif /** ** Open both, the cache info and the cache dir file **/ /** CACHEINFO **/ if( (char *) NULL == stringer(namebuf, MOD_BUFSIZE, dir, "/.moduleavailcache", NULL)) return; if( NULL == (fi = fopen( namebuf, "w+"))) return; /** CACHEOUTPUT **/ if( (char *) NULL == stringer(namebuf, MOD_BUFSIZE, dir, "/.moduleavailcachedir", NULL)) return; if( NULL == (cdir = fopen( namebuf, "w+"))) { if( EOF == fclose( fi)) ErrorLogger( ERR_CLOSE, LOC, NULL); return; } /** ** Write the cache id ** Write the cache itsself **/ fprintf( fi, "%s\n", CACHE_VERSION); fprintf( fi, "%d\n", tcount); store_dirlst( cdir, fi, dirlst_head, count, dir); /** ** Close the cache files again **/ if( EOF == fclose( fi)) ErrorLogger( ERR_CLOSE, LOC, NULL); if( EOF == fclose( cdir)) ErrorLogger( ERR_CLOSE, LOC, namebuf, NULL); } /** End of 'store_files' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: store_dirlst ** ** ** ** Description: Write the contents of a cache file ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: FILE *cacheoutput Output stream to be used ** ** FILE *cacheinfo Cache log file to be written ** ** fi_ent *dirlist_head List of files to be printed ** ** int count Number of entries in the pas-** ** sed 'dirlist' ** ** Result: - ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ static void store_dirlst( FILE *cacheinfo, FILE *cacheoutput, fi_ent *dirlst_head, int count, char *dir) { fi_ent* dirlst_cur; int i; #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_store_dirlst, NULL); #endif for( i=0, dirlst_cur=dirlst_head; ifi_stats.st_mode & S_IFDIR) { if( dirlst_cur->fi_prefix) { fprintf( cacheinfo, "%s/%s/%s %d\n", dir, dirlst_cur->fi_prefix, dirlst_cur->fi_name, (int)dirlst_cur->fi_stats.st_mtime); } else { fprintf( cacheinfo, "%s/%s %d\n", dir, dirlst_cur->fi_name, (int)dirlst_cur->fi_stats.st_mtime); } } /** ** Flush out the filename **/ store_file( cacheoutput, dir, dirlst_cur); /** ** Recursively descent into directories **/ if( dirlst_cur->fi_subdir) store_dirlst( cacheinfo, cacheoutput, dirlst_cur->fi_subdir, dirlst_cur->fi_listcount, dir); } /** for **/ /** ** Free up everything that has been allocated for the directory ** list **/ if( dirlst_head->fi_prefix) null_free((void *) &(dirlst_head->fi_prefix)); null_free((void *) &dirlst_head); } /** End of 'store_dirlst' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: store_file ** ** ** ** Description: Store the name of the file passed as 'file entry' to ** ** the specified output stream if it isn't a temp file ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: FILE *cacheoutput Output stream to be used ** ** char *dir The current directory ** ** fi_ent *file According file ** ** ** ** Result: - ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ static void store_file( FILE *cacheoutput, char *dir, fi_ent *file) { int filelen; /** Length of the filename **/ #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_store_file, NULL); #endif /** ** Turn any weird characters into ? marks and calculate the length ** of the filename **/ chk4spch( file->fi_name); filelen = strlen( file->fi_name); /** ** Don't print termporary files which are supposed to end on '~' **/ if( file->fi_name[ filelen-1] != '~') { fprintf( cacheoutput, "%s/", dir); if( file->fi_prefix) fprintf( cacheoutput, "%s/", file->fi_prefix); fprintf( cacheoutput, "%s\n", file->fi_name); } /** ** Finally free up the memory that has been used to store the filename **/ null_free((void *) &(file->fi_name)); } /** End of 'store_file' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: create_cache_list ** ** ** ** Description: Read the passed cache-file and create a list of file-** ** names out of it ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: FILE *cacheinput Opened cache file ** ** int *count Buffer to save the number of ** ** filename to ** ** char *module A module pattern ... ** ** ** ** Result: char** NULL Abort on failure ** ** else Pointer to the just created ** ** list ** ** *count Number of elements in the ** ** list ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ static char **create_cache_list( FILE *cacheinput, int *count, char *module) { char **list; /** Resulting list **/ int i; /** Loop counter **/ int mlen; #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_create_cache_list, NULL); #endif /** ** Check the version of the passed cache file at first **/ if( 1 != fscanf( cacheinput, "%s", buf)) if( OK != ErrorLogger( ERR_READ, LOC, "cache", NULL)) return( NULL); /** ----------- EXIT (I/O error) ----------> **/ if( strcmp( buf, CACHE_VERSION)) if( OK != ErrorLogger( ERR_CACHE_INVAL, LOC, buf, NULL)) return( NULL); /** -- EXIT (invalid cache file version) --> **/ /** ** Read the number of entries in the cache file and allocate enough ** memory for the resulting list. **/ if( 1 != fscanf( cacheinput, "%d", count)) if( OK != ErrorLogger( ERR_READ, LOC, "cache", NULL)) return( NULL); /** ----------- EXIT (I/O error) ----------> **/ if( NULL == (list = (char**) module_malloc( *count * sizeof(char**)))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) return( NULL); /** ------------ EXIT (FAILURE) -----------> **/ /** ** zero the cache **/ (void) memset((void *) list, 0, *count * sizeof(char**)); /** ** Some selection given? **/ if( module) mlen = strlen( module); /** ** Now read the cache ... **/ #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_DEBUG, LOC, "Read the cache", NULL); #endif for( i=0; i<*count; i++) { if( 1 != fscanf( cacheinput, "%s", buf)) { if( OK != ErrorLogger( ERR_READ, LOC, "cache", NULL)) { while( --i) null_free((void *) list + i); null_free((void *) &list); return( NULL); /** ----------- EXIT (I/O error) ----------> **/ } } /** ** Check whether this is part of the selected modules ... **/ if( module && strncmp( module, buf, mlen)) { --i; --*count; continue; } /** ** Save this guy **/ if( NULL == (list[ i] = strdup( buf))) { if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) { while( --i) null_free((void *) list + i); return( NULL); /** ------------ EXIT (FAILURE) -----------> **/ } } } /** ** Success. Return the list created before **/ return( list); } /** End of 'create_cache_list' **/ #endif /** CACHE_AVAIL **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: delete_cache_list ** ** ** ** Description: Remove an entire list of allocated strings and free ** ** up the used memory ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: char **list List of filenames to be print** ** int tcount Size ofd the list in elements** ** ** ** Result: - ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ void delete_cache_list( char **list, int tcount) { int i; #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_delete_cache_list, NULL); #endif for( i=0; i maxPrefixLength && ! strncmp(*list, prefix, prefixLength) && (*list)[prefixLength] == '/') { maxPrefixLength = prefixLength; } if (colon != NULL) { colon += 1; } prefix = colon; } /** ** Skip over '/' **/ if (maxPrefixLength > 0) { maxPrefixLength += 1; } } module = strdup(*list + maxPrefixLength); } else { t = strlen(path); if (*(*list + t) == '/') t++; module = strdup(*list + t); } if((char *) NULL == module) { if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) break; else continue; } /** ** Expand the symbols and get the version of the module **/ if((char *) NULL == (symbols = ExpandVersions( module))) symbols = ""; if((sw_format & SW_LONG) || (char *) NULL == (release = strchr( module, '/'))) release = ""; /* no release info */ else *release++ = '\0'; /** ** Long or short format **/ if(sw_format & (SW_TERSE|SW_PARSE|SW_HUMAN)) {/** short format **/ int tmp_len; if( sw_format & SW_PARSE ) { sprintf( _file_list_buffer, short_format_full, module, release, symbols); } else { /* assume a human readable format */ if (*symbols) { sprintf( _file_list_buffer, short_format_full, module, release, symbols); } else { if (*release) { sprintf( _file_list_buffer, short_format_part, module, release); } else { sprintf( _file_list_buffer, short_format, module); } } } _add_file_list( _file_list_buffer); tmp_len = strlen( _file_list_buffer); if( tmp_len > maxlen) maxlen = tmp_len; } else if ( sw_format & SW_LONG) { /** long format **/ /** ** Get the time of last modification **/ if((struct tm *) NULL != (tm = gmtime( &stats.st_mtime))) { sprintf( buffer, "%04d/%02d/%02d %2d:%02d:%02d", 1900+tm->tm_year, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); timestr = buffer; } else timestr = ""; /** ** Now print and free what we've allocated **/ fprintf( stderr, long_format, module, symbols, timestr); } null_free((void *) &module); } /** if( !stat) **/ list++; } /** while **/ /** ** In case of terse output we have to flush our buffer **/ if( !(sw_format & SW_LONG) ) { if( _file_list_wr_ndx > 0) print_terse_files( terminal_width, maxlen, header, numbered); } if (! modpath) { null_free((void *)&modpath); } #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_END, LOC, _proc_print_aligned_files, NULL); #endif } /** End of 'print_aligned_files' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: print_terse_files ** ** ** ** Description: Print out the filenames in the _file_list array in ** ** case of terse output ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: int terminal_width Terminal size ** ** int len max. filename length ** ** char *header header to print ** ** int number value to start number** ** use -1 for none ** ** ** ** Result: - ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ static void print_terse_files( int terminal_width, int len, char *header, int numbered) { char *module; char *moduleright; /** ** Print human readable lists **/ len += (numbered != -1 ? 6 : 1); if( sw_format & SW_HUMAN ) { int columns = (terminal_width - 1) / len; int col_ndx, row_ndx; int rows; int mod_ndx; /** ** Print the header line **/ if( header) { int lin_len = terminal_width - strlen( header) - 2; int i; fprintf( stderr, "\n"); if( lin_len >= 2) for( i = 0; i < lin_len / 2; i++) fprintf( stderr, "-"); fprintf( stderr, " %s ", header); if( lin_len >= 2) for( i = 0; i < (lin_len+1) / 2; i++) fprintf( stderr, "-"); fprintf( stderr, "\n"); } /** ** Print the columns **/ if( !columns) columns = 1; rows = (_file_list_wr_ndx + columns - 1) / columns; for( row_ndx = 0; row_ndx < rows; row_ndx++) { for( col_ndx = 0; col_ndx < columns; col_ndx++) { mod_ndx = row_ndx + col_ndx * rows; if( module = _pick_file_list( mod_ndx)) { moduleright = _pick_file_list( row_ndx + (col_ndx+1)* rows); print_spaced_file( module, len, ( (col_ndx == columns - 1) || (moduleright == (char *) NULL) ? 0 : 1 ), ( (numbered == -1) ? numbered : ++mod_ndx) ); } } fprintf( stderr, "\n"); } } /** ** Print parseable lists **/ else { while( module = _get_file_list()) { fprintf( stderr, "%s\n", module); } } } /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: _add_file_list ** ** _init_file_list ** ** _get_file_list ** ** _pick_file_list ** ** ** ** Description: File list functions for terse module display mode ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: char *name Name to be stored ** ** ** ** Result: - ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ static void _init_file_list() { if( _file_list_ptr && !_file_list_cnt) { null_free((void *) &_file_list_ptr); _file_list_cnt = 0; } _file_list_wr_ndx = 0; _file_list_rd_ndx = 0; } static void _add_file_list( char *name) { /** ** Parameter check **/ if( !name || !*name) return; /** ** Reallocate if the current array is to small **/ if( _file_list_cnt <= _file_list_wr_ndx) { _file_list_cnt += FILE_LIST_SEGM_SIZE; if( !_file_list_ptr) _file_list_ptr = (char **) module_malloc(_file_list_cnt * sizeof(char *)); else _file_list_ptr = (char **) module_realloc( _file_list_ptr, _file_list_cnt * sizeof(char *)); } /** ** Save the passed name, if the allocation succeeded **/ if( !_file_list_ptr) { ErrorLogger( ERR_ALLOC, LOC, NULL); _file_list_cnt = 0; _file_list_wr_ndx = 0; _file_list_rd_ndx = 0; } else { _file_list_ptr[ _file_list_wr_ndx++] = strdup( name); } } static char *_get_file_list() { return((_file_list_rd_ndx < _file_list_wr_ndx) ? _file_list_ptr[ _file_list_rd_ndx++] : (char *) NULL); } static char *_pick_file_list( int ndx) { return((ndx < _file_list_wr_ndx) ? _file_list_ptr[ ndx] : (char *) NULL); } /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: print_spaced_file ** ** ** ** Description: Print out the passed filename and fill the output ** ** area up to the passed number of characters ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: char *name Name to be printed ** ** int maxwidth With of the output field to ** ** be filled up ** ** int space Boolean value controlling if ** ** the output area should be ** ** filled up with spaces or not ** ** int number value to start number list ** ** use -1 for none ** ** ** ** Result: - ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ static void print_spaced_file( char *name, int maxwidth, int space, int number) { int filelen; /** Length of the filename to print **/ #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_print_spaced_file, NULL); #endif chk4spch( name); /** turn any weird characters into ? marks **/ /** ** Print the name and calculate its length **/ filelen = strlen( name); if( -1 != number) { fprintf( stderr, "%3d) ", number); filelen += 5; } fprintf(stderr, "%s", name); /** ** Conditionally fill the output area with spaces **/ if( space) { putc(' ', stderr); while( ++filelen < maxwidth) putc(' ', stderr); } } /** end of 'print_spaced_file' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: mkdirnm ** ** ** ** Description: Build a full pathname out of the passed directory ** ** and file ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: char *dir The directory to be used ** ** char *file The filename w/o path ** ** ** ** Result: char* NULL Compound filename to long ** ** else Pointer to the full path ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ static char *mkdirnm( char *dir, char *file) { static char dirbuf[ MOD_BUFSIZE]; /** Buffer for path creation **/ #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_mkdirnm, ", dir='", dir, ", file='", file, "'", NULL); #endif /** ** If only a file is given, or the file is in the current directory ** return just the file. **/ if( dir == NULL || *dir == '\0' || !strcmp(dir,".")) return( strcpy( dirbuf, file)); /** ** Check whether the full path fits into the buffer **/ if( (int) ( strlen( dir) + 1 + strlen( file) + 1 ) > MOD_BUFSIZE) { if( OK != ErrorLogger( ERR_NAMETOLONG, LOC, dir, file, NULL)) return( NULL); } /** ** Copy directory and file into the buffer taking care that there will ** be no double slash ... **/ strcpy( dirbuf, dir); if( dir[ strlen( dir) - 1] != '/' && file[0] != '/') strcat( dirbuf, "/"); return( strcat( dirbuf, file)); } /** End of 'mkdirnm' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: fi_ent_cmp ** ** ** ** Description: compares two file entry structures ** ** Different cmdline arguments (i.e. -u, -c, -t, -z) ** ** will change what value is compared. As a default, ** ** the name is used. ** ** ** ** Notes: This procedure is used as comparison function for ** ** qsort() ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: const void *fi1 First file entry ** ** const void *fi2 Second one to compare ** ** ** ** Result: int 1 fi2 > fi1 ** ** -1 fi2 < fi1 ** ** 0 fi2 == fi1 ** ** ** ** Attached Globals: ** ** ** ** ************************************************************************ ** ++++*/ static int fi_ent_cmp( const void *fi1, const void *fi2) { #ifdef DEF_COLLATE_BY_NUMBER return colcomp( ((fi_ent*)fi1)->fi_name, ((fi_ent*)fi2)->fi_name); #else # ifdef HAVE_STRCOLL return strcoll( ((fi_ent*)fi1)->fi_name, ((fi_ent*)fi2)->fi_name); # else return strcmp( ((fi_ent*)fi1)->fi_name, ((fi_ent*)fi2)->fi_name); # endif #endif } modules-3.2.10/ModuleCmd_Clear.c000066400000000000000000000114611210077407400163750ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: ModuleCmd_Clear.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: Clears out Modules' concept of the currently loaded ** ** modules. ** ** ** ** Exports: ModuleCmd_Clear ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 9b86fc201dbbd679d77b6212a982307a362e1687 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ #if WITH_DEBUGGING_MODULECMD static char module_name[] = "ModuleCmd_Clear.c"; /** File name of this module **/ static char _proc_ModuleCmd_Clear[] = "ModuleCmd_Clear"; #endif /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ModuleCmd_Clear ** ** ** ** Description: Execution of the module-command 'clear' ** ** Resets the modules runtime information but doesn't ** ** apply further changes to the environment at all ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp Attached Tcl Interp. ** ** int argc Number of arguments ** ** char *argv[] Argument list ** ** ** ** Result: int TCL_ERROR Failure ** ** TCL_OK Successful operation ** ** ** ** Attached Globals: ** ** ** ** ************************************************************************ ** ++++*/ int ModuleCmd_Clear( Tcl_Interp *interp, int argc, char *argv[]) { char buf[10]; char* clearargv[4]; #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_START, LOC, _proc_ModuleCmd_Clear, NULL); #endif /** ** Ask the user if he's really sure about what he's doing ... **/ if( argc == 1 && !strcmp( argv[0], "yes")) { buf[0] = 'y'; } else { fprintf( stderr, "\nAre you sure you want to clear all loaded modules!? [n] "); fgets( buf, 10, stdin); } /** ** Reset the shell variables 'LOADEDMODULES' and '_LMFILES_' **/ if( buf[0] == 'y') { clearargv[0] = "setenv"; clearargv[1] = "LOADEDMODULES"; clearargv[2] = ""; clearargv[3] = NULL; cmdSetEnv( (ClientData) 0, interp, 3, (CONST84 char **) clearargv); clearargv[0] = "setenv"; clearargv[1] = "_LMFILES_"; clearargv[2] = ""; clearargv[3] = NULL; cmdSetEnv( (ClientData) 0, interp, 3, (CONST84 char **) clearargv); } else { fprintf( stderr, "\nLOADEDMODULES was NOT cleared.\n"); } /** ** Return on success **/ #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_END, LOC, _proc_ModuleCmd_Clear, NULL); #endif return( TCL_OK); } modules-3.2.10/ModuleCmd_Display.c000066400000000000000000000140651210077407400167570ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: ModuleCmd_Display.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: Displays what changes a modulefile will make to the ** ** environment including any conflics or prerequisits. ** ** ** ** Exports: ModuleCmd_Display ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 8bb7d4e6ce4a88b2e500fd9df80fb301bc606cf5 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ char local_line[] = "-------------------------------------------------------------------\n"; static char module_name[] = "ModuleCmd_Display.c"; /** File name of this module **/ #if WITH_DEBUGGING_MODULECMD static char _proc_ModuleCmd_Display[] = "ModuleCmd_Display"; #endif /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ModuleCmd_Display ** ** ** ** Description: Execution of the module-command 'display' ** ** Display every change a module 'load' would apply to ** ** the environment ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp Attached Tcl Interp. ** ** char *argv[] Argument list ** ** ** ** Result: int TCL_ERROR Failure ** ** TCL_OK Successful operation ** ** ** ** Attached Globals: g_specified_module The module name from the ** ** command line. ** ** g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** g_current_module The module which is handled ** ** by the current command ** ** ** ** ************************************************************************ ** ++++*/ int ModuleCmd_Display( Tcl_Interp *interp, int argc, char *argv[]) { Tcl_Interp *disp_interp; Tcl_DString cmdbuf; int i, result; char modulefile[ MOD_BUFSIZE]; char modulename[ MOD_BUFSIZE]; #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_START, LOC, _proc_ModuleCmd_Display, NULL); #endif /** ** Initialize the command buffer and set up the modules flag to 'display ** only' **/ Tcl_DStringInit( &cmdbuf); g_flags |= M_DISPLAY; /** ** Handle each passed module file. Create a Tcl interpreter for each ** module file to be handled and initialize it with custom module commands **/ for(i=0; i **/ } /** ** locate the filename related to the passed module **/ if( Locate_ModuleFile(disp_interp, argv[i], modulename, modulefile) == TCL_ERROR) { EM_DeleteInterp( disp_interp); if( OK != ErrorLogger( ERR_LOCATE, LOC, argv[i], NULL)) break; else continue; } /** ** Print out everything that would happen if the module file were ** executed ... **/ g_current_module = modulename; fprintf( stderr, local_line); fprintf( stderr, "%s:\n\n", modulefile); result = CallModuleProcedure( disp_interp, &cmdbuf, modulefile, "ModulesDisplay", 0); fprintf( stderr, local_line); /** ** Remove the Tcl interpreter that has been used for printing ... **/ EM_DeleteInterp( disp_interp); } /** for **/ /** ** Leave the 'display only mode', free up what has been used and return **/ g_flags &= ~M_DISPLAY; fprintf( stderr, "\n"); Tcl_DStringFree( &cmdbuf); #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_END, LOC, _proc_ModuleCmd_Display, NULL); #endif return( TCL_OK); } /** End of 'ModuleCmd_Display' **/ modules-3.2.10/ModuleCmd_Help.c000066400000000000000000000163561210077407400162470ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: ModuleCmd_Help.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: Provides some general help by listing the different ** ** commands. It will also allow for a modulefile to ** ** provide some module-specific help by calling a Tcl ** ** procedure. ** ** ** ** Exports: ModuleCmd_Help ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 2e5b66b498d8887d467ea70c3ca4ea3c2dc44f06 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "ModuleCmd_Help.c"; /** File name of this module **/ #if WITH_DEBUGGING_MODULECMD static char _proc_ModuleCmd_Help[] = "ModuleCmd_Help"; #endif #if WITH_DEBUGGING_MODULECMD || WITH_DEBUGGING_UTIL_1 static char _proc_PerModuleHelp[] = "PerModuleHelp"; #endif /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ static int PerModuleHelp( Tcl_Interp*, int, char*[]); /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ModuleCmd_Help ** ** ** ** Description: Execution of the module-command 'help' ** ** Called w/o parameters it will print a list of avail- ** ** able commands. If it is called with a parameter it ** ** will print module specific help. ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp Attached Tcl Interp. ** ** int argc Number of arguments ** ** char *argv[] Argument list ** ** ** ** Result: int TCL_ERROR Failure ** ** TCL_OK Successful operation ** ** ** ** Attached Globals: ** ** ** ** ************************************************************************ ** ++++*/ int ModuleCmd_Help( Tcl_Interp *interp, int argc, char *argv[]) { /** ** General or module specific help wanted. General help is done within ** here. In case of module specific help we'll call a subroutine to do ** it ... **/ #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_START, LOC, _proc_ModuleCmd_Help, NULL); #endif if( argc > 0) PerModuleHelp( interp, argc, argv); else module_usage(stderr); /** ** Return on success **/ #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_START, LOC, _proc_ModuleCmd_Help, NULL); #endif return( TCL_OK); } /** End of 'ModuleCmd_Help' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: PerModuleHelp ** ** ** ** Description: Print module specific help ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp Attached Tcl Interp. ** ** int argc Number of arguments ** ** char *argv[] Argument list ** ** ** ** Result: int TCL_ERROR Failure ** ** TCL_OK Successful operation ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** g_current_module The module which is handled ** ** by the current command ** ** ** ** ************************************************************************ ** ++++*/ static int PerModuleHelp( Tcl_Interp *interp, int argc, char *argv[]) { Tcl_Interp *help_interp; Tcl_DString cmdbuf; int i, result; char modulefile[ MOD_BUFSIZE]; char modulename[ MOD_BUFSIZE]; #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_PerModuleHelp, NULL); #endif /** ** Initialize the command buffer **/ Tcl_DStringInit( &cmdbuf); g_flags |= M_HELP; /** ** Handle each passed module file. Create a Tcl interpreter for each ** module file to be handled **/ for(i=0; i unlink(home_pathname)) if (OK != ErrorLogger(ERR_UNLINK, LOC, home_pathname, NULL)) goto unwind3; } } else { /* found_modload_flag */ /** ** Don't need these any more **/ if (EOF == fclose(fileptr)) if (OK != ErrorLogger(ERR_CLOSE, LOC, home_pathname, NULL)) goto unwind3; if (g_flags & M_DISPLAY) goto unwhile0; /** while( shell_startups) ... **/ if (EOF == fclose(newfileptr)) if (OK != ErrorLogger(ERR_CLOSE, LOC, home_pathname, NULL)) goto unwind3; /** ** Truncate -NEW from home_pathname and Create a -OLD name ** Move ~/.startup to ~/.startup-OLD **/ home_pathname[path_end] = '\0'; if ((char *) NULL == stringer(home_pathname2, homelen, home_pathname, "-OLD", NULL)) if (OK != ErrorLogger(ERR_STRING, LOC, NULL)) goto unwind3; if (0 > rename(home_pathname, home_pathname2)) if (OK != ErrorLogger(ERR_RENAME, LOC, home_pathname, home_pathname2, NULL)) goto unwind3; /** ** Create a -NEW name ** Move ~/.startup-NEW to ~/.startup **/ if ((char *) NULL == stringer(home_pathname2, homelen, home_pathname, "-NEW", NULL)) if (OK != ErrorLogger(ERR_STRING, LOC, NULL)) goto unwind3; if (0 > rename(home_pathname2, home_pathname)) { if (OK != ErrorLogger(ERR_RENAME, LOC, home_pathname2, home_pathname, NULL)) { /** ** Put the -OLD one back if I can't rename it **/ if ((char *) NULL == stringer(home_pathname2, homelen, home_pathname, "-OLD", NULL)) if (OK != ErrorLogger(ERR_STRING, LOC, NULL)) goto unwind3; if (0 > rename(home_pathname2, home_pathname)) ErrorLogger(ERR_RENAME, LOC, home_pathname2, home_pathname, NULL); goto unwind3; } } /** ** So far we're successful so ** Create a -OLD name ** Unlink ~/.startup-OLD **/ if ((char *) NULL == stringer(home_pathname2, homelen, home_pathname, "-OLD", NULL)) if (OK != ErrorLogger(ERR_STRING, LOC, NULL)) goto unwind3; if ((g_flags & (M_CLEAR | M_LOAD | M_REMOVE | M_SWITCH))) if (0 > unlink(home_pathname2)) { ErrorLogger(ERR_UNLINK, LOC, home_pathname2, NULL); goto unwind3; } } unwhile0: shell_num++; } /** while( shell_startups) **/ /** ** Free up internal I/O buffers **/ null_free((void *) &buffer); if (!found_module_command) if (OK != ErrorLogger(ERR_INIT_STUP, LOC, shell_name, NULL)) goto unwind2; #if WITH_DEBUGGING_MODULECMD ErrorLogger(NO_ERR_END, LOC, _proc_ModuleCmd_Init, NULL); #endif /** ** Free up memory **/ null_free((void *) &home_pathname2); null_free((void *) &home_pathname); success0: return (TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ unwind3: null_free((void *) &buffer); unwind2: null_free((void *) &home_pathname2); unwind1: null_free((void *) &home_pathname); unwind0: return (TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** end of 'ModuleCmd_Init' **/ modules-3.2.10/ModuleCmd_List.c000066400000000000000000000133121210077407400162570ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: ModuleCmd_List.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: Lists the currently loaded modulefiles. ** ** ** ** Exports: ModuleCmd_List ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: f5f07d5ab873d3201bb61c060dc2d91c7257a953 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "ModuleCmd_List.c"; /** File name of this module **/ static char _proc_ModuleCmd_List[] = "ModuleCmd_List"; /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ModuleCmd_List ** ** ** ** Description: Execution of the module-command 'list' ** ** Lists all modules stored in the environment variable ** ** 'LOADEDMODULES' ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp Attached Tcl Interp. ** ** int argc Number of args ** ** char *argv[] Argument list ** ** ** ** Result: int TCL_ERROR Failure ** ** TCL_OK Successful operation ** ** ** ** Attached Globals: ** ** ** ** ************************************************************************ ** ++++*/ int ModuleCmd_List( Tcl_Interp *interp, int argc, char *argv[]) { /** ** Get the list of loaded modules at first **/ char *loaded, *lmfiles; int i, count1, count2; char *list[ MOD_BUFSIZE]; char *files[ MOD_BUFSIZE]; char *tmplist[ MOD_BUFSIZE], *s; int len; #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_START, LOC, _proc_ModuleCmd_List, NULL); #endif lmfiles = getLMFILES( interp); loaded = getenv( "LOADEDMODULES"); if( !loaded || !*loaded) { if( sw_format & (SW_TERSE | SW_LONG | SW_HUMAN) ) fprintf(stderr, "No Modulefiles Currently Loaded.\n"); } else { /** ** Now tokenize it, form a list and print it out. **/ if( sw_format & SW_LONG ) { fprintf( stderr, long_header); } if( sw_format & (SW_TERSE | SW_LONG | SW_HUMAN) ) fprintf( stderr, "Currently Loaded Modulefiles:\n"); /** ** LOADEDMODULES and _LMFILES_ should provide a list of loaded ** modules and assigned files in the SAME ORDER ** but double check, because if they aren't you will get a crash. **/ count1 = 1; for( list[ 0] = xstrtok( loaded, ":"); list[ count1] = xstrtok( NULL, ":"); count1++ ); count2 = 1; for( files[ 0] = xstrtok( lmfiles, ":"); files[ count2] = xstrtok( NULL, ":"); count2++ ); if (count1 != count2) { ErrorLogger( ERR_ENVVAR, LOC, NULL); } /** ** We have to build a single list of files for each loaded entry ** in order to be able to figure out the length of the directory ** part **/ for( i=0; i **/ filename[0] = '\0'; /** ** UNLOAD to be done ** At first check if it is loaded ... **/ if( !load) { char *tmpname; if( !IsLoaded( tmp_interp, argv[i], &tmpname, filename)) { #if 0 /** do we really care if it's not loaded ... **/ if( OK != ErrorLogger( ERR_NOTLOADED, LOC, argv[i], NULL)) #endif return_val = TCL_ERROR; } else { /** ** So it is loaded ... ** Do we know the filename? **/ if ((char *) NULL == stringer(modulename, MOD_BUFSIZE, tmpname, NULL)) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind0; if( !filename[0]) if( TCL_ERROR == (return_val = Locate_ModuleFile( tmp_interp, argv[i], tmpname, filename))) ErrorLogger( ERR_LOCATE, LOC, argv[i], NULL); /** ** If IsLoaded() created tmpname, then we must free it. **/ if( tmpname && (tmpname != argv[i])) null_free((void *) &tmpname); } /** if loaded **/ /** ** LOAD to be done ** Only check the filename **/ } else { if( TCL_ERROR == (return_val = Locate_ModuleFile( tmp_interp, argv[i], modulename, filename))) ErrorLogger( ERR_LOCATE, LOC, argv[i], NULL); } /** ** If return_val has been set to something other than TCL_OK, ** then read_status should not be set -- by the ANSI definition. ** ** The functions Read_Modulefile and Update_LoadedList will take ** respect to the 'flags' which are set to M_LOAD or M_REMOVE ** according to the intention of calling this procedure. **/ g_current_module = modulename; if( TCL_OK == return_val) { return_val = Read_Modulefile(tmp_interp, filename); em_return_val = ReturnValue(tmp_interp, return_val); switch (em_return_val) { case EM_OK: /** ** If module terminates TCL_OK, add it to the loaded list ... **/ case EM_CONTINUE: /** ** If module terminates TCL_CONTINUE, add it to the ** loaded list ... but further processing of that module ** has ceased **/ Tcl_ResetResult(tmp_interp); Update_LoadedList( tmp_interp, modulename, filename); /** ** Save the current environment setup before the next module ** file is (un)loaded in case something is broken ... ** ... for Unwind_Modulefile_Changes later on **/ Tcl_ResetResult(tmp_interp); if( oldTables) { Delete_Hash_Tables( oldTables); null_free((void *) &oldTables); } oldTables = Copy_Hash_Tables(); a_successful_load = 1; break; /* switch */ case EM_BREAK: /** ** If module terminates TCL_BREAK, don't add it to the list, ** but assume that everything was OK with the module anyway. ** (The original code wasn't correct) **/ case EM_EXIT: /** ** If module terminates TCL_EXIT, find the return value ** and exit modulecmd with that ... also none of the ** following modules should be loaded. **/ case EM_ERROR: default: /** ** Reset what has been changed. **/ Unwind_Modulefile_Changes( tmp_interp, oldTables); oldTables = NULL; return_val = TCL_ERROR; break; /* switch */ } } EM_DeleteInterp(tmp_interp); /* do not process any further modulefiles if EM_EXIT */ if (em_return_val == EM_EXIT) break; /* for */ } /** for **/ /** ** There may only be a spare save environment left, if the final module ** has been load successfully. Remove it in this case **/ if( em_return_val == EM_OK && oldTables) { Delete_Hash_Tables( oldTables); null_free((void *) &oldTables); } /** ** Clean up the flags and return **/ if( load) g_flags &= ~M_LOAD; else g_flags &= ~M_REMOVE; #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_END, LOC, _proc_ModuleCmd_Load, NULL); #endif return( a_successful_load); unwind0: return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** End of 'ModuleCmd_Load' **/ modules-3.2.10/ModuleCmd_Purge.c000066400000000000000000000124741210077407400164360ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: ModuleCmd_Purge.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: Removes all loaded modulefiles from the environment. ** ** ** ** Exports: ModuleCmd_Purge ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 7c14ae7dd9ea5b6b1497782b3a24764b84b9883a $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "ModuleCmd_Purge.c"; /** File name of this module **/ /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ModuleCmd_Purge ** ** ** ** Description: Execution of the module-command 'purge' ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp Attached Tcl Interp. ** ** int argc Number of arguments ** ** char *argv[] Argument list ** ** ** ** Result: int TCL_ERROR Failure ** ** TCL_OK Successful operation ** ** ** ** Attached Globals: ** ** ** ** ************************************************************************ ** ++++*/ int ModuleCmd_Purge( Tcl_Interp *interp, int argc, char *argv[]) { char *lmodules = NULL, *cur_module = NULL, *loaded_modules, *unload_argv[ MOD_BUFSIZE]; int unload_argc = 0, status; char *unload_argv_rev[ MOD_BUFSIZE]; int reverse; #if WITH_DEBUGGING_MODULECMD fprintf( stderr, "ModuleCmd_Purge(%d):DEBUG: Starting\n", __LINE__); #endif /** ** Get the list of currently loaded modules from the environment variable ** LOADEDMODULES **/ loaded_modules = EMGetEnv( interp, "LOADEDMODULES"); if(!loaded_modules || ! *loaded_modules) { /* nothing to do */ null_free((void *)&loaded_modules); return( TCL_OK); /** ---- EXIT (Nothing to list) ---- **/ } if((char *) NULL == (lmodules = stringer(NULL,0, loaded_modules, NULL))) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------- **/ /** ** Build a NULL terminated list of loaded modules **/ for( cur_module = strtok( lmodules, ":"); cur_module && unload_argc < MOD_BUFSIZE-1; cur_module = strtok( NULL, ":")) unload_argv[ unload_argc++] = cur_module; unload_argv[ unload_argc] = NULL; for( reverse=0; reverse **/ unwind1: null_free((void *) &loaded); unwind0: return( TCL_ERROR ); /** -------- EXIT (FAILURE) -------> **/ } /** End of 'ModuleCmd_Refresh' **/ modules-3.2.10/ModuleCmd_Switch.c000066400000000000000000000223001210077407400166020ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: ModuleCmd_Switch.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: Switches two modulefiles such that the paths are ** ** switched in-place. ** ** ** ** Exports: ModuleCmd_Switch ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 191c04c201b1f052056f73c18b38616e9e8b7114 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "ModuleCmd_Switch.c"; /** File name of this module **/ /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ModuleCmd_Switch ** ** ** ** Description: Execution of the module-command 'switch' ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp Attached Tcl Interp. ** ** int argc Number of arguments ** ** char *argv[] Argument list ** ** ** ** Result: int TCL_ERROR Failure ** ** TCL_OK Successful operation ** ** ** ** Attached Globals: g_flags Controlling the callback ** ** functions. ** ** g_specified_module The module name from the ** ** command line. ** ** g_current_module The module which is handled ** ** by the current command ** ** ** ** ************************************************************************ ** ++++*/ int ModuleCmd_Switch( Tcl_Interp *interp, int argc, char *argv[]) { char *oldmodule, *newmodule, *realname, *oldfile, *newfile, *oldname, *newname, *oldmodule_buffer = (char *) NULL; int ret_val = TCL_OK; #if WITH_DEBUGGING_MODULECMD fprintf( stderr, "ModuleCmd_Switch(%d):DEBUG: Starting\n", __LINE__); #endif /** ** allocate buffer memory **/ if ((char *) NULL == (oldfile = stringer(NULL, MOD_BUFSIZE, NULL))) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind0; if ((char *) NULL == (newfile = stringer(NULL, MOD_BUFSIZE, NULL))) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind1; if ((char *) NULL == (oldname = stringer(NULL, MOD_BUFSIZE, NULL))) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind2; if ((char *) NULL == (newname = stringer(NULL, MOD_BUFSIZE, NULL))) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind3; /** ** Parameter check. the required syntax is: ** module switch [ ] ** If is not specified, then the pathname of is assumed. **/ if( argc == 1) { newmodule = argv[0]; if((char *) NULL == (oldmodule_buffer = stringer(NULL,0,newmodule,NULL))) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind4; /* starting from the end of the module name, find the first * forward slash and replace with null */ if ((oldmodule = strrchr(oldmodule_buffer, '/'))) { *oldmodule = 0; } oldmodule = oldmodule_buffer; } else if( argc == 2) { oldmodule = argv[0]; newmodule = argv[1]; } else { if( OK != ErrorLogger( ERR_USAGE, LOC, "switch oldmodule newmodule", NULL)) return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ } /** ** Set the name of the module specified on the command line **/ g_specified_module = oldmodule; /** ** First try to find a match for the modulefile out of the LOADEDMODULES. **/ if( !IsLoaded( interp, oldmodule, &realname, oldfile)) if( OK != ErrorLogger( ERR_NOTLOADED, LOC, oldmodule, NULL)) goto unwind4; /** ** If we have another name to try, try finding it on disk. **/ if( realname) ret_val = Locate_ModuleFile( interp, realname, oldname, oldfile); /** ** If we've made it this far without finding a file, then look using the ** exact name the user gave me -- i.e. the old method. **/ if( ret_val == TCL_ERROR) { if( TCL_ERROR == (ret_val = Locate_ModuleFile( interp, oldmodule, oldname, oldfile))) if( OK != ErrorLogger( ERR_LOCATE, LOC, oldmodule, NULL)) goto unwind4; /** ** OK, this one is known. Is it loaded, too? **/ if( !IsLoaded( interp, oldname, NULL, oldfile)) if( OK != ErrorLogger( ERR_NOTLOADED, LOC, oldmodule, NULL)) goto unwind4; } /** ** Set the name of the module specified on the command line **/ g_specified_module = newmodule; /** ** Now try to find the new file to swap with. **/ if( TCL_ERROR == (ret_val = Locate_ModuleFile( interp, newmodule, newname, newfile))) if( OK != ErrorLogger( ERR_LOCATE, LOC, newmodule, NULL)) goto unwind4; ErrorLogger( NO_ERR_VERBOSE, LOC, "Switching '$1' to '$2'", oldmodule, newmodule, NULL); /** ** We'll remove the current modulefile with the SWITCH1 state set. ** This means that instead of really removing the paths, markers will ** be put in its place for later use. **/ g_flags |= (M_REMOVE | M_SWSTATE1); g_specified_module = oldmodule; g_current_module = oldname; if( Read_Modulefile( interp, oldfile) == 0) Update_LoadedList( interp, oldname, oldfile); else { ErrorLogger( NO_ERR_VERBOSE, LOC, "failed", NULL); goto unwind4; } g_flags &= ~(M_REMOVE | M_SWSTATE1); /** ** Move on to state SWITCH2. This loads the modulefile at the append ** and prepend markers. **/ g_flags |= M_SWSTATE2; g_specified_module = newmodule; g_current_module = newname; if( Read_Modulefile( interp, newfile) == 0) Update_LoadedList( interp, newname, newfile); else { ErrorLogger( NO_ERR_VERBOSE, LOC, "failed", NULL); goto unwind4; } g_flags &= ~M_SWSTATE2; /** ** This actually unsets environment variables and gets rid of the ** markers. **/ g_flags |= (M_REMOVE | M_SWSTATE3); g_specified_module = oldmodule; g_current_module = oldname; if( Read_Modulefile( interp, oldfile) == 0) Update_LoadedList( interp, newname, newfile); else { ErrorLogger( NO_ERR_VERBOSE, LOC, "failed", NULL); goto unwind4; } /** ** Return on success **/ ErrorLogger( NO_ERR_VERBOSE, LOC, "done", NULL); #if WITH_DEBUGGING_MODULECMD fprintf( stderr, "ModuleCmd_Switch(%d):DEBUG: End\n", __LINE__); #endif /** ** free space ** assume don't need what's pointed to by g_current_module ** and g_specified_module **/ null_free((void *) &newname); null_free((void *) &oldname); null_free((void *) &newfile); null_free((void *) &oldfile); return( TCL_OK); /** ------- EXIT (SUCCESS) --------> **/ unwind4: if (oldmodule == oldmodule_buffer) null_free((void *) &oldmodule); null_free((void *) &newname); unwind3: null_free((void *) &oldname); unwind2: null_free((void *) &newfile); unwind1: null_free((void *) &oldfile); unwind0: return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ } /** End of 'ModuleCmd_Switch' **/ modules-3.2.10/ModuleCmd_Update.c000066400000000000000000000216021210077407400165670ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: ModuleCmd_Update.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: Uses the beginning environment stored the first time ** ** each login session to reload all of the currently ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 1286756fe8af52b423fea50510cbfd76ead170e6 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ #define UPD_BUFSIZE 2048 /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "ModuleCmd_Update.c"; /** File name of this module **/ #if WITH_DEBUGGING_MODULECMD static char _proc_ModuleCmd_Update[] = "ModuleCmd_Update"; #endif /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ModuleCmd_Update ** ** ** ** Description: Execution of the module-command 'update' ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp Attached Tcl Interp. ** ** int argc Number of arguments ** ** char *argv[] Argument list ** ** ** ** Result: int TCL_ERROR Failure ** ** TCL_OK Successful operation ** ** ** ** Attached Globals: flags Controls the callback functions ** ** ** ** ************************************************************************ ** ++++*/ int ModuleCmd_Update( Tcl_Interp *interp, int count, char *module_list[]) { #ifdef BEGINENV char *buf, /** Read buffer **/ *var_ptr, /** Pointer to a variables name **/ *val_ptr, /** Pointer to a variables value **/ **load_list, /** List of loaded modules **/ *tmpload, /** LOADEDMODULES contents **/ *loaded, /** Buffer for tokenization **/ *filename; /** The name of the file, where the **/ /** beginning environment resides **/ FILE *file; /** Handle to read in a file **/ int list_count = 0, maxlist = 16, /** Max. number of list entries **/ buffer_size = UPD_BUFSIZE; /** Current size of the input buffer **/ char *ptr, c; /** Read pointers and char buffer **/ #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_START, LOC, _proc_ModuleCmd_Update, NULL); #endif #if BEGINENV == 99 if (!Tcl_GetVar2( interp,"env","MODULESBEGINENV", TCL_GLOBAL_ONLY)) { ErrorLogger( ERR_BEGINENVX, LOC, NULL); return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } #endif /** ** Nothing loaded so far - we're ready! **/ if( !( tmpload = (char *) getenv("LOADEDMODULES"))) { if( OK != ErrorLogger( ERR_MODULE_PATH, LOC, NULL)) goto unwind0; else goto success0; } /** ** First I'll update the environment with what's in _MODULESBEGINENV_ **/ filename = EMGetEnv( interp,"_MODULESBEGINENV_"); if(filename && *filename) { /** ** Read the begining environment **/ if( NULL != (file = fopen( filename, "r"))) { if((char *) NULL == (buf = stringer(NULL, buffer_size, NULL ))) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind0; while( !feof( file)) { /** ** Trigger to entries of the type ** = **/ ptr = buf; while( !feof( file)) { if((ptr-buf) >= buffer_size-10) { /** 10 bytes safety **/ null_free((void *) &buf); if((char *) NULL == (buf = stringer(NULL, buffer_size += UPD_BUFSIZE, NULL ))) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind0; } /** ** Read a character and put it into the read buffer. Check ** for the lines (CR) or a terminator character ... **/ if( '\n' == (*ptr++ = c = fgetc( file))) { *ptr++ = c = '\0'; break; } if( !c) break; } /** while **/ /** ** If there hasn't been a terminator so far, put it at the ** end of the line. Therefor we've left a safety space at the ** buffers end ;-) **/ if( c) *ptr++ = '\0'; /** ** Now let's evaluate the read line **/ if( var_ptr = strchr( buf, '=')) { *var_ptr = '\0'; val_ptr = var_ptr+1; var_ptr = buf; /** ** Reset the environment to the values derivered from the ** _MODULESBEGINENV_. ** Do not change the LOADEDMODULES variable ;-) ** Do not change the TCL_LIBRARY and TK_LIBRARY also. **/ if( strncmp( var_ptr, "LOADEDMODULES", 12) && strncmp( var_ptr, "TCL_LIBRARY", 10 ) && strncmp( var_ptr, "TK_LIBRARY", 9 )) if( !strncmp( var_ptr, "MODULEPATH", 10)) moduleSetenv( interp, var_ptr, val_ptr, 1); else EMSetEnv( interp, var_ptr, val_ptr); } /** if( var_ptr) **/ } /** while **/ /** ** Close the _MODULESBEGINENV_ file anf free up the read buffer. **/ null_free((void *) &buf); if( EOF == fclose( file)) if( OK != ErrorLogger( ERR_CLOSE, LOC, filename, NULL)) goto unwind0; } else { /** if( fopen) **/ if( OK != ErrorLogger( ERR_OPEN, LOC, filename, "reading", NULL)) goto unwind0; } /** if( fopen) **/ } /** if( filename) **/ /** ** Allocate memory for a buffer to tokenize the list of loaded modules ** and a list buffer **/ if( NULL == (load_list = (char**) module_malloc( maxlist*sizeof(char**)))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) goto unwind0; if( NULL == (loaded = stringer(NULL, 0, tmpload, NULL))) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind1; /** ** Tokenize and build the list **/ if( *loaded) { for( load_list[ list_count++] = xstrtok( loaded, ":"); load_list[ list_count-1]; load_list[ list_count++] = xstrtok( NULL, ":") ) { /** ** Conditionally we have to double the space, we've allocated for ** the list **/ if( list_count >= maxlist) { maxlist = maxlist<<1; if(!(load_list = (char**) module_realloc((char *) load_list, maxlist*sizeof(char**)))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) goto unwind1; } /** if( maxlist) **/ } /** for **/ /** ** Load all the modules in the list **/ ModuleCmd_Load( interp, 1, list_count, load_list); } /** ** Free up what has been allocated and return on success **/ null_free((void *) &loaded); null_free((void *) &load_list); success0: #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_END, LOC, _proc_ModuleCmd_Update, NULL); #endif return( TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ unwind1: null_free((void *) &load_list); unwind0: null_free((void *) &filename); #else /* BEGINENV */ ErrorLogger( ERR_BEGINENV, LOC, NULL); #endif /* BEGINENV */ return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** End of 'ModuleCmd_Update' **/ modules-3.2.10/ModuleCmd_Use.c000066400000000000000000000241711210077407400161050ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: ModuleCmd_Use.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: Prepends (and appends) directories to the MODULEPATH ** ** environment variable to enable access to more ** ** modulefiles. ** ** ** ** Exports: ModuleCmd_Use ** ** ModuleCmd_UnUse ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: af24837bb2adc1beba4276c79f510b5bf7e82331 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "ModuleCmd_Use.c"; /** File name of this module **/ #if WITH_DEBUGGING_UTIL_1 static char _proc_append_to_modulesbeginenv[] = "append_to_modulesbeginenv"; #endif #if WITH_DEBUGGING_MODULECMD static char _proc_ModuleCmd_Use[] = "ModuleCmd_Use"; static char _proc_ModuleCmd_UnUse[] = "ModuleCmd_UnUse"; #endif /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ #ifdef BEGINENV /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: append_to_modulesbeginenv ** ** ** ** Description: Append the passed variable (with value) to the begin-** ** ning environment ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp Attached Tcl Interp. ** ** char *var Name of the variable ** ** ** ** Result: - ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ static void append_to_modulesbeginenv( Tcl_Interp *interp, char *var) { char *filename, /** The filename, where the begin- **/ /** ning environment resides **/ *val; /** Value of the passed variable **/ FILE *file; /** File read handle **/ #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_append_to_modulesbeginenv, NULL); #endif if( var #if BEGINENV == 99 && Tcl_GetVar2( interp,"env","MODULESBEGINENV", TCL_GLOBAL_ONLY) #endif ) { #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_DEBUG, LOC, "Adding '", var, "'"); #endif /** ** Get filename and the value of the passed variable **/ filename = EMGetEnv( interp, "_MODULESBEGINENV_"); if(filename && *filename) { val = EMGetEnv( interp, var); /** ** Append the string = **/ if( NULL != (file = fopen( filename, "a+"))) { fprintf( file, "%s=%s\n", var, val); if( EOF == fclose( file)) ErrorLogger( ERR_CLOSE, LOC, filename, NULL); } else { ErrorLogger( ERR_OPEN, LOC, filename, "appending", NULL); } } /** if( get filename) **/ null_free((void *)&filename); } /** if( var passed) **/ } /** End of 'append_to_modulesbeginenv' **/ #else # define append_to_modulesbeginenv( a, b) {} #endif /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ModuleCmd_Use ** ** ** ** Description: Execution of the module-command 'use' ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp Attached Tcl Interp. ** ** int argc Number of arguments ** ** char *argv[] Argument list ** ** ** ** Result: int TCL_ERROR Failure ** ** TCL_OK Successful operation ** ** ** ** Attached Globals: g_flags Controllig the callback functions ** ** ** ** ************************************************************************ ** ++++*/ int ModuleCmd_Use( Tcl_Interp *interp, int argc, char *argv[]) { struct stat stats; /** Buffer for the stat() systemcall **/ char *pathargv[4]; /** Argument buffer for Tcl calls **/ int i; /** ** Parameter check. Usage is 'module use [ ... ]' **/ #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_START, LOC, _proc_ModuleCmd_Use, NULL); #endif if( argc < 1) { if( OK != ErrorLogger( ERR_USAGE, LOC, "use [-a|--append] dir [dir ...]", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Remove is done by another subroutine **/ if( g_flags & M_REMOVE) return( ModuleCmd_UnUse( interp, argc, argv)); /** ** Append or prepend the new module path **/ if( append_flag ) { pathargv[0] = "append-path"; } else { pathargv[0] = "prepend-path"; } /** ** Append (prepend) all passed paths to MODULEPATH in case they do exist, ** and are readable directories **/ pathargv[1] = "MODULEPATH"; pathargv[3] = NULL; for( i=0; i < argc; i++) { /** ** Check for -a|--append flag (if in modulefile - it's not parsed ** by getoptlong) (keep -append for backward compatibility) **/ if( (!strcmp("-a",argv[i])) || (!strcmp("--append",argv[i])) || (!strcmp("-append",argv[i]))) { pathargv[0] = "append-path"; continue; } else if( stat( argv[i], &stats) < 0) { /** ** Check for existing, readable directories **/ if( OK != ErrorLogger( ERR_DIRNOTFOUND, LOC, argv[i], NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } else if( !S_ISDIR( stats.st_mode)) { if( OK != ErrorLogger( ERR_NODIR, LOC, argv[i], NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Used the 'cmdSetPath' callback function to modify the MODULEPATH **/ pathargv[2] = argv[i]; if( cmdSetPath((ClientData) 0, interp, 3, (CONST84 char **) pathargv) == TCL_ERROR) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** for **/ /** ** Add the new value of MODULESPATH to the end ** of the beginenvcache so that update will be able to find its ** modulefiles. **/ append_to_modulesbeginenv( interp, "MODULEPATH"); #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_END, LOC, _proc_ModuleCmd_Use, NULL); #endif return( TCL_OK); } /** End of 'ModuleCmd_Use' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ModuleCmd_UnUse ** ** ** ** Description: Execution of the module-command 'unuse' ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp Attached Tcl Interp. ** ** int argc Number of arguments ** ** char *argv[] Argument list ** ** ** ** Result: int TCL_ERROR Failure ** ** TCL_OK Successful operation ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ int ModuleCmd_UnUse( Tcl_Interp *interp, int argc, char *argv[]) { char *pathargv[4]; int i = 0; #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_START, LOC, _proc_ModuleCmd_UnUse, NULL); #endif /** ** Parameter check. Usage is 'module use [ ... ]' **/ if( argc < 1) { if( OK != ErrorLogger( ERR_USAGE, LOC, "unuse dir [dir ...]", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Remove all passed paths from MODULEPATH ** Use the 'cmdSetPath' callback function to modify the MODULEPATH **/ pathargv[0] = "remove-path"; pathargv[1] = "MODULEPATH"; pathargv[3] = NULL; for(i = 0; i < argc; i++) { pathargv[2] = argv[i]; if(cmdRemovePath((ClientData) 0, interp, 3, (CONST84 char **) pathargv) == TCL_ERROR) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** for **/ /** ** Add the new value of MODULESPATH to the end ** of the beginenvcache so that update will be able to find its ** modulefiles. **/ append_to_modulesbeginenv( interp, "MODULEPATH"); #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_END, LOC, _proc_ModuleCmd_UnUse, NULL); #endif return( TCL_OK); } /** End of 'ModuleCmd_UnUse' **/ modules-3.2.10/ModuleCmd_Whatis.c000066400000000000000000000476631210077407400166230ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: ModuleCmd_Whatis.c ** ** First Edition: 1995/12/31 ** ** ** ** Authors: Jens Hamisch, jens@Strawberry.COM ** ** ** ** ModuleCmd_Apropos ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 4a401d29f9f9d732e363213a65d6ae5889644045 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ #define WHATIS_SOME 0 #define WHATIS_ALL 1 /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "ModuleCmd_Whatis.c"; /** File name of this module **/ #if WITH_DEBUGGING_MODULECMD static char _proc_ModuleCmd_Whatis[] = "ModuleCmd_Whatis"; static char _proc_ModuleCmd_Apropos[] = "ModuleCmd_Apropos"; #endif #if WITH_DEBUGGING_UTIL_1 static char _proc_whatis_dir[] = "whatis_dir"; static char _proc_read_cache[] = "read_cache"; static char _proc_apropos_cache[] = "apropos_cache"; #endif static char cache_name[] = APR_CACHE; /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ static int read_cache( int, char**, FILE*, int); static int whatis_dir( char*, int, char**, FILE*, int); static char *apropos_cache(void); /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ModuleCmd_Whatis ** ** ** ** Description: Display the passed modules 'whatis' information ** ** ** ** First Edition: 1995/12/31 ** ** ** ** Parameters: Tcl_Interp *interp Attached Tcl Interp. ** ** int argc Number of arguments ** ** char *argv[] Argument list ** ** ** ** Result: int TCL_ERROR Failure ** ** TCL_OK Successful operation ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** g_current_module The module which is handled ** ** by the current command ** ** ** ** ************************************************************************ ** ++++*/ int ModuleCmd_Whatis( Tcl_Interp *interp, int argc, char *argv[]) { struct stat stats; Tcl_Interp *whatis_interp; Tcl_DString cmdbuf; int i, result = TCL_OK, done = 0; char modulefile[ MOD_BUFSIZE], modulename[ MOD_BUFSIZE], *modpath = (char *)NULL,/** Buffer for the contents of the **/ /** environment variable MODULEPATH **/ **wptr, *dirname = (char *)NULL, *cache_file = (char *) NULL; /** Name of the cache file **/ FILE *cachefp = (FILE *) NULL; /** Cache file pointer **/ #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_START, LOC, _proc_ModuleCmd_Whatis, NULL); #endif /** ** Initialize the command buffer and set up the modules flag to ** 'whatisonly' **/ Tcl_DStringInit( &cmdbuf); g_flags |= M_WHATIS; /** ** Handle each passed module file. Create a Tcl interpreter for each ** module file to be handled and initialize it with custom module commands **/ if ( argc) { /** ** User provided a list of modules for ``whatis'' info **/ for(i=0; i **/ unwind1: null_free((void *) &cache_file); null_free((void *) &modpath); unwind0: return( TCL_ERROR); /** --- EXIT PROCEDURE (FAILURE) --> **/ } /** End of 'ModuleCmd_Whatis' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ModuleCmd_Apropos ** ** ** ** Description: Scan the whatis database in order to find something ** ** matching the passed strings ** ** ** ** First Edition: 1995/12/31 ** ** ** ** Parameters: Tcl_Interp *interp Attached Tcl Interp. ** ** int argc Number of arguments ** ** char *argv[] Argument list ** ** ** ** Result: int TCL_ERROR Failure ** ** TCL_OK Successful operation ** ** ** ** Attached Globals: ** ** ** ** ************************************************************************ ** ++++*/ int ModuleCmd_Apropos( Tcl_Interp *interp, int argc, char *argv[]) { struct stat stats; char *dirname; char *modpath; /** Buffer for the contents of the **/ /** environment variable MODULEPATH **/ int i, done = 0; char *c; char *cache_file; /** Name of the cache file **/ FILE *cachefp = (FILE *) NULL; /** Cache file pointer **/ #if WITH_DEBUGGING_MODULECMD ErrorLogger( NO_ERR_START, LOC, _proc_ModuleCmd_Apropos, NULL); #endif /** ** Ignore case ... convert all arguments to lower case **/ if( sw_icase) for( i=0; i **/ } /** End of 'ModuleCmd_Apropos' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: whatis_dir ** ** ** ** Description: Print all files beyond the passed directory ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: char *dir Directory to be scanned ** ** int argc Number of tokens ** ** char **argv List of tokens to check ** ** FILE *cfp Cache file pointer ** ** ** ** Result: int TCL_OK Successful operation ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** g_current_module The module which is handled ** ** by the current command ** ** ** ** ************************************************************************ ** ++++*/ static int whatis_dir( char *dir, int argc, char **argv, FILE *cfp, int whatis_list) { fi_ent *dirlst_head = NULL; /** Directory list base pointer **/ int count = 0; /** Number of elements in the top **/ /** level directory list **/ int tcount = 0; /** Total number of files to print **/ char **list; /** flat list of module files **/ int start = 0, i, k; int result = TCL_OK; Tcl_Interp *whatis_interp; Tcl_DString cmdbuf; char modulefile[ MOD_BUFSIZE]; char **wptr, *c; struct stat stats; #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_whatis_dir, "dir='", dir, NULL); #endif /** ** Normal reading of the files **/ if( NULL == (dirlst_head = get_dir( dir, NULL, &count, &tcount))) if( OK != ErrorLogger( ERR_READDIR, LOC, dir, NULL)) goto unwind0; if( NULL == (list = (char**) module_malloc( tcount * sizeof( char**)))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) goto unwind1; dirlst_to_list( list, dirlst_head, count, &start, NULL, NULL); /** ** Initialize the command buffer and set up the modules flag to 'whatislay ** only' **/ Tcl_DStringInit( &cmdbuf); g_flags |= M_WHATIS; /** ** Check all the files in the flat list for the passed tokens **/ for( i=0; i **/ unwind2: delete_cache_list( list, start); unwind1: delete_dirlst( dirlst_head, count); unwind0: return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ } /** End of 'whatis_dir' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: read_cache ** ** ** ** Description: Grep in the cache file for the passed tokens ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: int argc Number of tokens ** ** char **argv List of tokens to check ** ** FILE *cfp Cache file pointer ** ** ** ** Result: int TCL_OK Successful operation ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ static int read_cache( int argc, char **argv, FILE *cfp, int whatis_list) { char *wptr, *c; char modulefile[ MOD_BUFSIZE]; char buffer[ MOD_BUFSIZE]; int k; #if WITH_DEBUGGING_UTIL_1 /* ErrorLogger( NO_ERR_START, LOC, _proc_read_cache, "dir='", dir, NULL); */ #endif while( wptr = fgets( buffer, MOD_BUFSIZE, cfp)) { /** ** Ingnore case? **/ if( sw_icase) { strncpy( modulefile, wptr, MOD_BUFSIZE); for( c = modulefile; c && *c; c++) *c = tolower( *c); c = modulefile; } else c = wptr; c = strchr( c, ':'); c++; /** ** Seek for the passed tokens **/ if ( whatis_list) fprintf( stderr, "%s", wptr); else for( k=0; k --> PREFIX/etc/ ** / --> /RC_FILE ** / --> / **/ if( env = getenv( "MODULEWHATISCACHE")) { if((char *) NULL == (env_file = strrchr( env, '/'))) { env_file = env; env_path = instpath; } else { *env_file++ = '\0'; env_path = env; } if( !*env_file) env_file = cache_name; } else { env_path = instpath; env_file = cache_name; } /** ** Finaly we have to change PREFIX -> PREFIX/etc **/ if( env_path == instpath) { if((char *) NULL == (buffer = stringer(NULL,0, env_path,"/etc/",env_file,NULL))) goto unwind0; } else { if((char *) NULL == (buffer = stringer(NULL,0, env_path,"/",env_file,NULL))) goto unwind0; } /** ** Return the name of the cache file **/ #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_END, LOC, _proc_apropos_cache, NULL); #endif return( buffer); unwind0: return (char *) NULL; } /** End of 'apropos_cache' **/ modules-3.2.10/NEWS000066400000000000000000000573011210077407400137540ustar00rootroot00000000000000* Note: Implied Consent - If you send in a code patch or fix of one type or another you consent to have your name and email address listed here unless you explicitly note otherwise. Whether your name & email is actually listed depends on how extensive the change. (If it's a minor code, document change, or spelling correction your name will probably not be listed.) **************************** Release 3.2 ****************************** Modules 3.2.10 Dec 21, 2012 R.K. Owen (rk@owen.sj.ca.us) * Fixed the module switch with custom delimiters (Tyson Whitehead) * If a bash shell check if interactive or not for alias/functions * Fix the flags with regards to recursive load/unload * Fix perl.pm init file typo (bug 3497092) * Moved from cvs to git (and now: modulefile/module-git) * Fix the module swap with the --delim option (Tyson Whitehead) * Increased the "update" buffer (Leon Kos) * Use the locale for sorting modulefiles by the avail command * Fixed the segfault problem with Tcl_RegExpCompile() (Kenneth Hoste, Tyson Whitehead) * Updated the FSF address in LICENSE.GPL (Jan Synacek) * Forked the Tcl-only version to be maintained by Kent Mein. * Added the "module-info type" query to return 'C' to indicate that the modulecmd executable is the "C" version. (The Tcl-only version will return 'Tcl'.) * Search /usr/lib64 for tclConfig.sh also (Jan Synacek) * Tested loading 20 other modulefiles from a single one * Have ChangeLog generated by a script due to Marcus D. Hanwell Modules 3.2.9 Nov 24, 2011 R.K. Owen (rk@owen.sj.ca.us) * Fix the coexistence of load/remove flags (Martin Siegert) * Fixed an overlapping string copy (Wilson Snyder & Orion Poplawski) * Isolated calls to the new interpreter and get & set env.vars. * Crucial bug fix of same by (Orion Poplawski). * Optionally use Tcl memory check routines for malloc/realloc. * Fixed the "module purge" memory corruption (Poor Yorick) * Added support for Ruby (Tammo Tjarks) Modules 3.2.8 Oct 1, 2010 R.K. Owen (rk@owen.sj.ca.us) * Handle the .modulerc/.version in deep modulefile dirs, Patches thanks to Lindsay Todd, and others. * Note that .version takes precedence over .modulerc files. * Renamed init/python to init/python.py and updated with anonymous patch to eliminate 'sed' references * Renamed init/perl to init/perl.pm * Added brief section to module.1 on invoking modules for perl & python * Added Nathaniel Waisbrot's patch for CMake support with tests. * Fixed the MANPATH in modulefiles/modules to use configure generated values. * Added the configure --with-man-path so a system specific MANPATH could be used. Some "man"s radically change their search path when a MANPATH exists and when not. The default is "/usr/man:/usr/share/man" (when both exists). * Purging a purged module list does not result in an error. * Fixed the configure script for searching for tclConfig.sh and handle --without-x in the tests. Modules 3.2.7 Jul 30, 2009 R.K. Owen (rk@owen.sj.ca.us) * Have init/bash export the module function (thanks to Roy Dragseth) * Fixed swap bug when prepending or appending multiple times (fix thanks to Gavin Walker), added tests for same. * Have purge remove loaded modules in reverse order (patch contributed by carriees) * Added a batch of patches from Gerrit Renker - Goes through each of the two manpages, bringing them up to date. - Fix an error in configure.ac caused by misspelling - Fix typos in help messages and source-code comments - Fix the setup of $MODULESPATH to not have a trailing ':' - Fix segmentation violation occurring when the shelltype is absent - Fix a condition where 'make uninstall' does not cleanse a directory - Fix a build problem which set the executable bit on 'data' files - Cleans up noise in '.modulespath' file - Replaces external sed filter script with internal Makefile.am rule - Adds missing 'zsh' case in etc/global - simplify (t)csh initialisation - Add bash auto-completion for the 'module' command - Adds new 'chdir' modulefile command (sets cwd on module load) * versions a & b fixed some bugs Modules 3.2.6 Oct 29, 2007 R.K. Owen (rk@owen.sj.ca.us) * Fixed the locate_module.c:realloc() calls which didn't properly take the element size into account (Fix thanks to Ron Isaacson). Modules 3.2.5 Feb 14, 2007 R.K. Owen (rk@owen.sj.ca.us) * Wrapped all malloc() calls to make sure the size is never 0. This fixes a problem spotted by Francesco Nigro under AIX, and diagnosed by G Lehnert. * Updated tests when domainname is unknown. Modules 3.2.4 Feb 2, 2007 R.K. Owen (rk@owen.sj.ca.us) * Fixed bug where "empty" directory paths in the MODULEPATH env.var. needed to be handled gracefully. Modules 3.2.3 Jun 1, 2006 R.K. Owen (rk@owen.sj.ca.us) * Allow version names to be substrings of other version names thanks to dgoldendias at users.sourceforge.net * Fixed compiling bug when --enable-log was specified. * Made some minor changes to the syslogging and tests so that they all pass. * the set-alias command will for Bourne shell derivatives substitute the safe ${1+"$@"} for $*. * Added the --delim option to prepend-path and append-path to allow arbitrary delimiters instead of the colon ':' * Fixed build problem with regards to the init/* files (solution due to Thomas Zeiser) Modules 3.2.2 May 4, 2006 R.K. Owen (rk@owen.sj.ca.us) * Replaced all strtok() calls with an internal version. * Now can append/prepend and empty string '' or colons ':' * Added more --with-tclx-* options in case tclxConfig.sh can not be found, but the TclX lib does exist. * Expanded the search path for tclConfig.sh. * Updated the TclX init call for 8.4 Modules 3.2.1 Feb 13, 2006 R.K. Owen (rk@owen.sj.ca.us) * Catch 'exit N' within modulefiles, use this as an exit return code. Has the behavior of loading the modulefile up to the point of exit. * For bash, a non-zero exit will append a test that returns false. * Added tests for "break" and "exit N" * various other bug fixes Modules 3.2.0 Jan 19, 2006 R.K. Owen (rk@owen.sj.ca.us) * default for cache is now "no" * Added version_test() to testsuite to make some of the tests conditional on the values generated by --version. * Reworked every configure-based file - the configure options help is formatted with AC_HELP_STRING - uses automake to generate most of the Makefile.in - renamed configure.in to configure.ac per autoconf - Versioning is optional now with a configure option - reworked the init scripts for versioning or not - eliminated acconfig.h and put templates in configure.ac - make install now honors the DESTDIR variable for package builds - honors bindir for modulecmd location (but the init scripts are only correct if no versioning) * Collected the usage info and now it can be displayed with the --help or -H option (same as help) * --version now gives most of the optional configure parameters for easy debugging of problems * Made the output deterministic (sorted) and reworked tests also * Fixed the UserLevel check code (which failed when optimized) * Fixed bug in "Switch" command when --enable-free was set * Added or Fine-tuned the --enable-shell-funcs, --enable-shell-alias and --enable-shell-eval configure options. The configure script will test for the existence of the first two properties in /bin/sh where the options can override the tested values. Made the associated tests conditional on the existence of these properties. * The configure script now tests how large env.vars. can be for /bin/csh, the default behavior is if > 4000 then do not set --with-split-size, else if smaller then set to the tested value - 20. If the option is given, but no value, then set to 1000. * Fixed the tests to work when --enable-beginenv ... also changed the error message when disabled. * Added and set the default for --enable-beginenv=test, which means that this feature is enabled by the user by setting the MODULESBEGINENV env.var. for a file name (allows one level of variable expansion). * Have the caching skip version control directories (CVS, RCS, .svn) unless they have a .version file then assume the directory is a genuine modulefiles directory. * Expand '$$' to the current process id when performing one level of variable expansion for the MODULESBEGINENV env.var * Fixed up the automake/autoconf scripts to create a workable distribution tarball * Fixed the configuration behavior if --exec-prefix is given Also put the init/ scripts under the --exec-prefix, but keep the special bin scripts under the --prefix root. * Updated the config/tcl.m4 (used by configure) * Eliminated any warnings caused by using Tcl 8.4 * Fixed any mixed size differences when using ints and pointers. (Only an issue with 64 bit machines.) * Updated the init* subcommands to work on multiple "module load" lines in the "dot rc" files. Added a suite of tests too. * Eliminated the --with-force-path option, with the attendant code. It was supposed to make sure PATH and LD_LIBRARY_PATH contain some minimum set of paths ... it was rarely, if ever, used. Contributor: Andrew Ruder * cmdConflict.c: Fixed memory allocation bug in cmdPrereq(). When there is more than 1 argument to the prereq command, both savedlens and savedlists were indexed past what the initial malloc allowed. * ModuleCmd_Refresh.c: Like "update" but refreshes only the non-persistent attributes of the currently loaded modules, regardless of the state of the loaded modules (i.e. refresh aliases). Contributor: Mark Lakata * removed configure *.in files from testsuite and added envvars to allow running the testsuite from another directory * other fixes to testsuite * allowed one argument for 'switch', i.e. "module switch foo/1.3" is the same as "module switch foo foo/1.3" * bug fix in cmdXResources regarding parsing the XRDB * removed probetcl from distribution; function moved to aclocal.m4 * special shell chars in env vars are escaped rather than quoted. This allows the use of single quotes inside the env var * noglob option turned on for module command in csh/tcsh * use customed temp file routine, rather than tmpnam or tempnam * minor bugs **************************** Release 3.1 ****************************** Modules 3.1.6 Thu Jan 3 20:56:16 PST 2002 R.K. Owen (rk@owen.sj.ca.us) Contributors: Scott Gaskins Leo Butler ) Philip Kearns Andy Bruce * A 'break' in a modulefile will cause the modulefile to not be added to $LOADEDMODULES, but will be considered a successful execution to not affect other modulefiles being loaded concurrently (Patch due to Scott Gaskins). * Tests and docs added for the above. * Added CYGWIN/Windows specific code (due to Andy Bruce) * Fixed problem with module load when the full path is given (patch due to Scott Gaskins). * Added tests for the above problem. * Added the Modules-Paper in PDF format (thanks to Philip Kearns and Leo Butler for raising the issue). * Modified probetcl to avoid using the -c option (patch due to Philip Kearns). * Modified probetcl to use tclsh first then tcl * Added TCL_VERSION to configure and use it in the Makefile to use the -ltcl@TCL_VERSION@ library. Modules 3.1.5 Sat Aug 18 07:32:48 PDT 2001 R.K. Owen (rk@owen.sj.ca.us) Contributors: Eric Stanley * Fixed up cmdPath to remove individual items from a path (patch due to Eric Stanley). * Fixed problem of failed "module loads" in a modulefile (patch due to Eric Stanley). Modules 3.1.4 Fri Aug 3 12:45:55 PDT 2001 R.K. Owen (rk@owen.sj.ca.us) * Some preliminary steps to a rpm file. * Added bz2 files to distribution mix. * Fixed "module swap" to put the substituted module in the same path location as the old. Also added a number of tests for this feature. (Bug was pointed out by Leo Butler ) * Added tests for the "is-loaded" modulefile command introduced back in 3.0.8-rko. * Fixed up some documents. Modules 3.1.3 Wed Jul 11 14:30:53 PDT 2001 R.K. Owen (rk@owen.sj.ca.us) * Added module-cvs modulefile for easy CVS/ftp access to the modules CVS repository. * Added README.perl describing Ron Isaacson's Env::Modulecmd perl module (Ron.Isaacson@morganstanley.com). * Added document file INSTALL.RH7x which explains how to set up an modules environment for all users through the system shell files. Is specific to Linux/RedHat 7.x, but is of general applicability. * Added further tests for modulefile "module use dir_path" * Fixed bug of unloading a modulefile with a "module use dir_path" * Environment variable contents are now quoted to preserve any embedded environment variables. (Needed for versioning) * Added over 50 tests specific to module versioning, and testing xgetenv. * Fixed the unsetenv on unload function, the feature added in 3.0.6-rko was supposed to set the env.var. to the optional third argument. This was to allow old env.var. values to be recovered by unraveling a stack set in an other env.var. Added tests for this feature. This is used by the version modulefile. * Fixed and updated the version modulefile to allow stacked versions to be removed the stack. * Removed an annoying spurious stderr newline. Modules 3.1.2 Fri Jun 8 23:12:24 PDT 2001 R.K. Owen (rk@owen.sj.ca.us) * Fixed the "module use --append" feature, and fixed the tests for "module use", "module use --append", and "module unuse". * Changed the global variable names (flags,current_module) to (g_flags, g_current_module) to identify their ubiquity in the module source. Modules 3.1.1 Thu Feb 1 11:20:44 PST 2001 Robert Minsk (egbert@centropolisfx.com) Contributors: Robert Minsk * init file for python added (Robert Minsk) * Added the beginnings of support for scheme. Still need an init script. (Robert Minsk) * Fixed bug with the _LMFILES_ environment variable. If a user was using a csh variant of a shell and modules was compiled with with-split-size enable the _LMFILES_ variable was not handled correctly when it needed splitting. (Robert Minsk) * Fixed bug with creating aliases for ksh, bash, and zsh to recognize the escape ("\"). Any time an alias had a "$" in it a function was created instead of an alias. (Robert Minsk) * Fixed bug in searching the LOADEDMODULES environment variable. Would not find a module if only a partial module name was given. (Robert Minsk) * Fixed memory corruption bug in LOADEDMODULES environment variable handling. (Robert Minsk) * Fixed bug in csh init file. Some versions of csh echo the current prompt if the shell was in an eval of an eval (eval `eval ...`). (Robert Minsk) * Started adding support for mel (Maya Extension Language) (Robert Minsk) Note: Since I have just recently become a co-maintainer of modules with R.K. Owen it has been hard to keep up with user submitted patches. If you did not receive proper credit for a fix or enhancement that has appeared in this release you will receive proper credit in the next release. Robert Minsk Modules 3.1.0 Contributors: Jens Hamisch Robert Minsk Magnus Holmberg * Fixed the changed *interpter->result return value with Tcl8.3+ (patch due to Jens Hamisch). * Removed warning message for unloading a module that's not loaded. * Added source code cross-referencing via cxref-1.5b(patched) (see http://www.gedanken.demon.co.uk/cxref/ for details). * Changed the long format, eliminated the release column as a separate entity. The release value is just part of the package name. * Added --with-dot.ext[=<.ext>] to configure & DOT_EXT to config.h for an extension to be added to the shell dot-file names for the "module init*" commands * Addes .modules to dot file list for "init*" commands (Magnus Holmberg) * Matched the "help" and "man module" optional commands more closely * Fixed man pages it's .modulerc not .modulesrc * Made it easier to ftp distribution to metalab.unc.edu * Fixed init/perl & init/tcsh (due to Robert Minsk). * Fixed "module list" to show paths deeper than 2 levels (due to Robert Minsk). * Fixed warning message about `alias' to non-sh/csh derivatives (due to Robert Minsk). * Fixed tests with regards to syslogging & alias. * Licensed changed to GPL. **************************** Release 3.0 ****************************** Modules 3.0.8-rko Wed May 10 09:45:55 PDT 2000 R.K. Owen (rk@owen.sj.ca.us) Contributors: Steve Muskiewicz Robert Minsk * Added another option to the module-info command named "specified" which gives the name as specified on the command line. This patch is due to Robert Minsk. * Added the beginnings of python support. Still need an init script. This patch is due to Robert Minsk. * Changed the numbering of modules during a terse listing. Instead of numbering left-to-right row by row, number top-down by columns ... this corresponds to the order of modules. Patch is compliments of Steve Muskiewicz. * Fixed a modulefile unload of another modulefile problem. This patch is due to Steve Muskiewicz. * Fixed swap bug with setenv. Patch due to Robert Minsk. * Added 'is-loaded' to test whether a given module is loaded or not already. (need to add testsuite.) Provided by Robert Minsk. Modules 3.0.7-rko Fri Apr 7 10:58:45 PDT 2000 R.K. Owen (rk@owen.sj.ca.us) * Fixed xgetenv * A bunch of patches from Robert Minsk that eliminates a lot of the compile time warnings (mostly unused variables etc.) * More patches from Robert Minsk for the --disable-cache option. * Modified add.modules to provisionally handle .bash_profile and .bash_login (thanks to Ted Richards). * Modified the way shell start-up files are specified in init.c with patches from Max Zomborszki. Now easier for a site to make local customizations. Modules 3.0.6-rko Wed Feb 16 09:06:34 PST 2000 R.K. Owen (rk@owen.sj.ca.us) * Changed "unsetenv" to allow an optional third argument to set the env.var. to when unloading. * Fixed bugs with and upgraded the "module init*" commands. * Added a preliminary RPM .spec file ... some of the versioning changes conflict with some RPM features. Modules 3.0.5-rko (not meant for public release) Fri Jan 21 18:59:18 PST 2000 R.K. Owen (rk@owen.sj.ca.us) * Changed the behavior if "module" is called without an argument. In addition to the error message it prints out the help text. * Fixed a problem with module swapping. A test needs to be added to the testsuite. * Rewrote many of the init files & modified modules to allow one level of env.var. expansion in the MODULEPATH & MODULERCFILE environment variables. The purpose is to allow the co-existence of many versions of the module command. Only this & successive versions will implement this. * Got the --with-logging configure option actually doing something in the code. The default is no syslog-ing. However, this affects the tests ... expect 3 failures originating from testsuite/modules.50-cmds/100-loglevel.exp . (fixed in version 3.0.9-rko) Modules 3.0.4-rko Wed Jan 12 09:45:21 PST 2000 R.K. Owen (rk@owen.sj.ca.us) * Rewrote a lot of the calls to low level Tcl RegExp routines, which required direct access to the tclRegexp.h header file. Used higher level Tcl routines to accomplish the same. The net result is that modules should be configurable under any version of Tcl > 7.4 (not tested). * Rewrote a reference to a low level Tcl glob routine, which required direct access to the tclInt.h header file. Used the $HOME environment instead. * Mean-time hack to support multiple subdirectories for the "avail" option. * Fixed the long listings to be Y2K OK. * Added a version option to print out the module version ... for future automated scripting. * Some documentation clean-up. * Removed all references to PARSEABLE_ERRORS in config.h and configuration ... since it's not used at all. * Modified init files because some systems treat undefined variables in sh/ksh/bash/zsh as errors and terminates login process (Thanks to Martin Jost). * Modified Tcl_HashTable declaration initialization to assignment, because some ANSI C compilers complain (Thanks to Martin Jost). Modules 3.0.3-rko Thu Dec 23 08:20:44 PST 1999 R.K. Owen (rk@owen.sj.ca.us) * removed the global definition refering to stdout and put the assignment in one of the routines. This fixes a compilation problem with RedHat 6.1 & gcc-2.95. Modules 3.0.2-rko Thu Nov 11 16:57:30 PST 1999 R.K. Owen (rk@owen.sj.ca.us) * added the --[enable|disable]-version-magic option to the configure script and associated sources. However, `disabling' will break the ./modules.20-locate/030-defvers.exp test. `disabling' allows older modulefile directories that don't have .version files with proper module magic cookies to be parsed. * Disabled errorlogging if "module avail" can't open a directory. * Added some logic in the Makefile & elsewhere to generate patch-able diff files. Modules 3.0.1-rko Tue Oct 26 12:47:58 PDT 1999 R.K. Owen (rk@owen.sj.ca.us) * misc fixes from compiling with AIX xlc compiler * cmdInfo - incorrect call to Tcl_SetResult() fixed Modules 3.0.0-rko Thu Aug 12 08:32:52 PDT 1999 R.K. Owen (rk@owen.sj.ca.us) * Grabbed the 3.0beta sources from ftp.modules.org made wide-spread changes to update it & port it to Linux * Modified file/routine comments to be visible to cxref * collapsed sw_human, sw_terse to sw_format & toggling bits for long/terse/human/parse output options * Fixed list/avail output * Added RCS Ids removed SCCS Ids, placed sources into CVS * Got "module whatis" to list all whatis entries as designed, but not implemented * Removed unnecessary & made files from CVS control * Added several scripts for setting up a modules environment: add.modules, mkroot * Minor fixes to init files to eliminate env. variable persistence * Upgraded man pages and Help * Wrote INSTALL document to hand-hold the modules novice * Reworked testsuite to test current results * Codified distribution based on version level * Created LSM Tue Oct 1 13:53:47 MET DST 1996 Jens Hamisch (jens@Strawberry.COM) * modules_def.h ModuleCmd_Whatis.c, ModuleCmd_List.c - Bugfix: Skip directories while scanning all modulefiles for 'apropos' - traditional lists output * doc/modulefile.4.in, doc/module.1.in - new fetures of 3.0 added * aclocal.m4, configure.in, config.h.in, init.c, main.c - Patches for TCL 7.6 / TK 4.2 applied. Probe for TCL version number added. API for TCLX has changed on TCLX 7.6 Mon Jul 29 18:03:50 MET DST 1996 Swen Thuemmler * cmdModule.c strdup the module_command, because Tcl_Eval modifies the argv beginning @ Tcl 7.5 Thu Feb 8 15:05:40 1996 Leif Hedstrom * ModuleCmd_Avail.c (print_aligned_files): Fix out of bounds array access. * error.c (MeasLookup): Initilization of `mid'. (GetFacility_sub): Dito. * cmdVersion.c (FindName): Initialization of `cmp', I don't know if it's correct to set it to `1', but it's definitely wrong not to initialize it at all! :) (FindModule): Dito. Sat Jan 6 13:29:48 MET 1996 Jens Hamisch (jens@Strawberry.COM) * aclocal.m4 configure.in Makefile.in: - Add a 'touch' rule in order to fix the modification dates of the modulefiles in the testsuite * cmdAlias.c cmdConflict.c cmdMisc.c cmdPath.c cmdSetenv.c cmdXResource.c cmdModule.c cmdTrace.c cmdUlvl.c cmdVerbose.c cmdVersion.c cmdWhatis.c cmdLog.c: - Unification of the DISPLAY output modules-3.2.10/README000066400000000000000000000630011210077407400141270ustar00rootroot00000000000000 The Modules Package Version 3.1 John L. Furlan jlf@behere.com Peter W. Osel pwo@Osel.DE Jens Hamisch Jens.Hamisch@Strawberry.COM R.K. Owen rk@owen.sj.ca.us 2 October 1996 2 June 2000 1. Introduction _______________ This directory contains a copy of The Modules Package that uses Tcl (Tool Command Language) developed by John Ousterhout at Sun Microsystems. You must obtain a copy of Tcl (at least version 8.3). Tcl should be available either at the same site you obtained The Modules Package or from http://dev.scriptics.com/ . For an introduction to The Modules Package, see the paper, "Modules: Providing a Flexible User Environment", in the Proceeding of the 1991 Large Installation Systems Administrators USENIX Conference (USENIX LISA V). A copy of the paper is included in Postscript form in doc/Modules-Paper.ps. The paper describes the concepts behind Modules and a prototype/proof-of-concept implementation based on shell scripts being sourced into the user environment. The implementation details have changed, but the package concepts haven't. 2. Documentation ________________ The ./doc directory contains both the paper and man pages describing the user's and the module writer's usage. Look at ChangeLog for detailed information regarding changes. Big changes to 3.2: o Using the automake/autoconf mechanism for creating the configure script. o Have the configure script test and set more things with regards to /bin/sh and /bin/csh characterstics. o Lots of code clean-up. o Made the tests conditional on configure options. o Handle the silent changes in Tcl 8.4 Big changes to 3.1: o Changed the license to GPL o Source code cross-referencing documented in ./xref/*.html files. Big changes since 3.0 prior to 3.1: o Ported to Linux. o Removed any dependence on low-level Tcl routines. o Can use environment variable references in MODULEPATH for indirection. o Can switch between different versions of the module command. o Fixed "module whatis" to work as advertised. o Added the INSTALL document to aid in first-time and upgrading installations. o Fixed "module avail" and "module list" to show levels deeper than 2. o Added "is-loaded" and "module-info specified" to modulefile commands. Big changes for 3.0: o Testsuite added o Support for Tcl/TclX 7.6 and Tk 4.2 o Introduction of user levels for generation of error messages o Enhanced module logging facilities using stdout, stderr, files and the syslog o Enhanced module trace feature o Modulefile configuration management. Symbolic module file names and aliases o Hierarchical modulecmd rc-file structure o Command line switches o Traceable output for module list and module command (configurable and on request) o Active dependecy resolution. This is experimental at the moment!!! Big changes for 2.3: o Support for Tcl/TclX 7.5 and Tk 4.1 o Code cleanup. Added inline documentation. Unification of source module layouts. o Added alloc tracer for locating memory leaks o Added 'uname domain'. o Added M_HELP as a modetype, so that 'module-info mode [help]' will be possible o Optional support for extended Tcl (tclX) 7.x o Modules now uses the standard Tcl initialization (init.tcl), enabling autoloading of Tcl functions. Big changes for 2.2: o Installation changed to use GNU's configure script (version 2.x). o Updated to support Tcl 7.x o Paths and modulefile names with '+'s in them should work now. o Multi-level paths should work. Well, at least better than 2.0. o "module load ." doesn't dump core. o Support for "perl" output. o Ability to exit without having modulefile listed as "loaded". Use an argument to exit other than 0 or 1. o More stringent checking of user-level command names. o A sysconf.h file to help with multi-platform support. This area and the installation process still needs work. o A new and improved cmdXResource.c Big changes for 2.0: o Added a new environment variable, _LOADED_MODULEFILES_, which keeps track of which file and directory each modulefile was loaded from. This is necessary for locating modulefiles if the MODULEPATH variable has changed or if a full pathname was specified as the modulefile to load. o Added an update sub-command which attempts to reload all of the currently loaded modulefiles. When Modules is first initialized a snapshot of the environment is saved into a file in the user's home directory. When the update sub-command is run, the environment variables are restored to their earlier state and the modulefiles are reloaded. Only the variables that modulefiles touch are changed. o Added an purge sub-command which unloads all currently loaded modulefiles. o set-alias should be fixed and should work for all shell types. In the case of the Bourne shell-variants, it creates functions. o If multiple modulefiles are listed to be added or removed and one of them has an error, only that modulefile will fail. All of the other modulefiles will load or unload successfully (assuming they don't in turn have errors). o INCOMPATABILITY ISSUE: stdout is not tied to stderr any more. So, if you to a 'puts stdout' in any of your modulefiles, that will go directly to the shell. You should change all puts statements that goto stdout to goto stderr. o avail prints out all of the modulefiles by recursively looking through all directories under every entry in MODULEPATH. It will also cache the information since it can take much longer than the previous version. Finally, only files containing the "#%Module" magic cookie header and that don't end in '~' will be listed. Other files will be ignored. o A .version file in a modulefile directory will be parsed to find out which modulefile is the default version for the directory name. o Locating modulefiles is recursive and ignores files ending in '~' and which don't have the "#%Module" magic header. o The switch command really works now. o Added uname command for fast access to system information. Not sure if uname is portable. o Unload using a directoryname will look for a version that is already loaded instead of the default version specified by the .version file or by the highest lexicographical name in the directory. o Added ability for modulefile-specific help and modulefile-specific display. 3. Building and Installing Modules __________________________________ (Read the INSTALL file for a more recent description of installation procedures.) First, you'll need to decide on a location to keep Modules on your network. The path name to the initialization files must be the same on all of the systems using Modules. This is because your users' .cshrc or other shell startup files must hard code this directory in order to source their Modules initialization file. You will also need to choose a location for the 'modulecmd' program and all of your modulefiles. The location of these can be different on different systems, but it is not recommended. These paths are used in the Modules initialization files. If you decide not to use this structure, then you will need to edit the initialization files by hand. Use the --prefix configure option to control the installation of Modules. See below for more configure options. Example: If you decide to keep Modules in /depot/Modules, run "configure --prefix=/depot/Modules" initialization file --> /depot/Modules/init modulefiles --> /depot/Modules/modulefiles modulecmd --> /depot/Modules/bin manual pages --> /depot/Modules/man Tcl libraries --> /depot/Modules/lib/tcl (if any) The Modules Package is written in conformant ANSI C and should build on any UNIX machine with an ANSI C compiler like the GNU C compiler. Check the MACHINES file for a list of machines and OSs Modules has been test built on. The module error logger requires the ANSI C 'stdarg.h' being installed. At the moment there's no support for traditional vargargs handling using 'varargs.h'. To build Modules, first build Tcl and run the tests provided with Tcl to verify it built correctly. If you want to use the testsuite, you should install dejagnu-1.2 or better before configuring modules. Be sure to have your PATH pointing to 'runtest' when calling 'configure'. Then run the GNU autoconf script, ./configure. A Makefile will be automatically generated. Some Modules-specific configure options... (See also ./configure --help) Autoconf @variable@'s can be passed along to the configure script, in particular for setting paths. The one of interest is @VERSION@ for using the current module version. e.g. --prefix=/usr/local/Modules/@VERSION@ ------------------------------------------------------------------------ --with-etc-path= use etc path= [/etc] --with-skel-path= use skel path= [/etc/skel] o Place to find the csh.modules * profile.modules files and where the new user dot files are (both are needed by add.modules script). o The skeleton user dot files need to point to the etc path for setting up modules environment on login. ------------------------------------------------------------------------ --with-split-size= With split size= [TEST] --without-split-size Without - " - o Most C Shell implementations have a size requirement on the length of the line which can be evaluated. If you run into very long environment changes, you may run into this problem. Select size to be something less than the size your C Shell will accept. The configure script will test this in your /bin/csh upto 10,000 characters. If you do not specify anything configure will set the split-size for you if the limit it finds is less than 4000 characters. This can be overridden by specifying --with-split-size='some_value' specifying --without-split-size will disable this feature. Just specifying --with-split-size without a value will default to a value of 1000. ------------------------------------------------------------------------ --enable-shell-funcs With sh functions [TEST] --disable-shell-funcs Without - " - o Does your Bourne Shell support functions? If so, then the modulefile set-alias will work properly. If not, aliases will not be available when using the Bourne Shell. The default is to test your /bin/sh when configuring build, but specifying either option will override the tested characteristic. ------------------------------------------------------------------------ --enable-shell-alias With sh functions [TEST] --disable-shell-alias Without - " - o Does your Bourne Shell support aliases? A true Bourne Shell doesn't but most are just a link to some other Bourne-like shell. If so, then modules will use the alias mechanism when using set-alias. If not, aliases will not be available unless sh functions are supported when using the Bourne Shell. The default is to test your /bin/sh when configuring build, but specifying either option will override the tested characteristic. ------------------------------------------------------------------------ --enable-shell-eval With shell alias eval [DEF] --disable-shell-eval Without - " - o This specifies whether aliases will be evaluated by the shell or sourced from a temporary file. Some shells can't handle the specification of aliases in the eval line very well. To get around this problem, when aliases are set by a modulefile, a temporary file is created and then sourced into the shell. This guarentees the aliases are evaluated correctly, but may leave lots of cruft in the /tmp directory, which is generally not a good idea. ------------------------------------------------------------------------ --enable-free With free() calls --disable-free Without -" - [DEF] o Since the modulecmd is transient, disabling calls to free() can provide some small performance enhancement since the memory usage is low and the program will exit rapidly. If you want the calls to free() back in for some reason, set this option. ------------------------------------------------------------------------ --enable-cache With directory cache --disable-cache Without - " - [DEF] o Modules will maintain a cache of the available modulefiles for each directory in the modulefile search path. The cache greatly accelerates how long it takes to determine the list of available modulefiles, but for automatic cache updates this requires a world writeable file. ------------------------------------------------------------------------ --with-cache-umask= With cache files umask= --without-cache-umask 0 [DEF] o Set the umask for creating cache files. The default of 0 creates modulecachefiles that are writable by anyone. If you don't like world writable files, or mount the Modules file system read-only set it to 002. Don't forget to occasionally refresh the cache files by running module avail with an account that has write permissions. ------------------------------------------------------------------------ --with-static Link static (don't use dynamic libraries) --without-static Use dynamic libraries [DEF] o A note. I've found that at least the X11 libraries should be linked statically. If you encounter problems, e.g. getting some warnings about version mismatch of dynamic libraries, link the modulecmd statically. o If you're using Tcl/TclX 7.5 on an SunOS or Solaris box, the dynamic loader library (libdl.so.1) will be liked in. Since this is not available as a staic library, using --without-static is recommended. ------------------------------------------------------------------------ --with-tclx With extended TCL (tclX) commands --without-tclx Without - " - [DEF] o Extended Tcl is a superset of standard Tcl and is built alongside the standard Tcl sources. It adds many new commands to standard Tcl, e.g. Unix Access Commands, File I/O Commands, String and Character Manipulation Commands, ... See the manual pages that come with tclX for a complete list of added features. ------------------------------------------------------------------------ --with-module-path= With user defined MODULEPATH --without-module-path Default $prefix/modulefiles [DEF] o Set the MODULEFILE environment variable in all initialization files to the given (colon separated!). The default is to use $prefix/modulefiles (which usually contains version specific modulefiles). o Every site should use this to specify where local modulefiles are placed which are independent of module versions. ------------------------------------------------------------------------ --with-version-path use module path= [/usr/local/Modules/versions] o Place to put module version modulefiles for switching between different versions of the module command. ------------------------------------------------------------------------ --with-autoload-path= directories where Tcl will search for libraries to load --without-autoload-path Default $prefix/lib/tcl [DEF] o will be prepended to Tcl's auto_path variable. These directories are searched for library functions that can be autoloaded. Note that this path has to be *space* separated and enclosed in double quotes!! The default is to use "$prefix/lib/tcl". ------------------------------------------------------------------------ --with-tcl= directory containting Tcl configuration (tclConfig.sh) --with-tclx= directory containting TclX configuration (tclxConfig.sh) o the tclConfig.sh file was created when Tcl was built, and has pointers to where the libraries and header files were installed. It is usually found in $prefix/lib, where $prefix is the directory you installed Tcl. (Same for TclX too.) ------------------------------------------------------------------------ --with-debug= Set up the debug level to the specified value --without-debug Disable debugging [DEF] o The debug level will be set to the specified value. Available values may be looked up in 'modules_def.h'. Debugging may be configured in order to trace: - module commands - TCL interpreter initialization - callback functions - module file localization - utility functions Enable this feature for debugging only! The higher the debugging level, the greater the amount of runtime information printed! All debug mes- sages will be spooled to . The debug-level cannot be changed at runtime at the moment! It is configured as a fixed value at compile time! ------------------------------------------------------------------------ --enable-version-magic set .version magic requirement[DEF] --disable-version-magic unset requirement o Enable or disable the requirement that .version files need the "#%MOdule1.0" magic cookie at the file start to be properly recognized and parsed. ------------------------------------------------------------------------ NO LONGER AVAILABLE --enable-parseable-msgs Configure parseable error messages --disable-parseable-msgs Use the traditional ones o Switch between traditional error messages in multi-line format or parse- able ones that look like the GNU messages. The parseable message format is: module(line):Message-Type:Message-Number: Text with Message-Type being one of: INFO, WARNING, PROBLEM, ERROR, FATAL, PANIC, DEBUG and an unique message id in decimal format. ------------------------------------------------------------------------ --enable-logging Enable the module logging feature --disable-logging No module logging [DEF] --with-log-facility-verbose[=] --with-log-facility-info[=] --with-log-facility-debug[=] --with-log-facility-debug[=] --with-log-facility-warn[=] --with-log-facility-problem[=] --with-log-facility-problem[=] --with-log-facility-fatal[=] --with-log-facility-panic[=] o Turn logging on and define the logging facilities for the different error levels. Each facility may be a syslog-facility as 'local7.debug', a standard stream as 'stderr', a filename or the word 'no' for dis- abling a single log facility. ------------------------------------------------------------------------ --with-trace-load= --with-trace-unload= --with-trace-switch= --with-trace-disp= --with-trace-list= --with-trace-avail= --with-trace-help= --with-trace-init= --with-trace-use= --with-trace-unuse= --with-trace-update= --with-trace-purge= --with-trace-clear= --with-trace-whatis= --with-trace-apropos= o Turns tracing for the specific module command on or off. The value is a list of colon separated TCL regular expressions matching the module files to be traced. This maybe overridden using the 'module-trace' command. See 'modulefile(4)' for detailed information. A number of example modulefiles have been provided in the example-modulefiles directory. This should help provide you with some idea on how to write modulefiles. If you upgrade from a previous module version and have adapted the MODULEPATH environment variable in your installed init files, don't forget to set the MODULEFILE in the configuration step: (See the INSTALL document for more current information.) ./configure --with-module-path=$MODULEPATH Just type 'make' and it should build. If you have dejagnu installed, you may want to run the testsuite now. Type 'make check' and it should run. Finally, type 'make install' and 'modulecmd' along with the initfiles will be installed. 4. modules-interest@lists.sourceforge.net _________________________________________ As of release 2.0, I have worked with Richard Elling to create a Modules interest alias for discussion about Modules and other Modules-related packages such as Richard's user-setup. The email list was moved from eng.auburn.edu to SourceForge.net with version 3.0. If you would like to be added to the modules-interest alias, email majordomo@lists.sourceforge.net with "subscribe modules-interest address" in the body of the message where "address" is your Internet e-mail address. 5. Miscellaneous ________________ tcsh(1) user might want to add the following to their tcsh startup file (~/.cshrc or ~/.tcshrc): # program tcsh's completion for module command: complete module \ 'n/use/d/' \ 'n/unuse/d/' \ 'n/*/(load unload switch display avail use \ unuse update purge list clear help \ initadd initrm initswitch initlist initclear)/' You might want to add the following line to /etc/magic, so that file(1) recognizes modulefiles: # # Environment Modules modulefiles # 0 string #%Module1.0 Environment Modules version 1.0 6. Special Thanks _________________ Ken Manheimer and Don Libes at the National Institute of Standards and Technology deserve special thanks for their help and ideas toward the original paper, design considerations, and the use of Tcl. Maureen Chew and others at Sun Microsystems have provided me with an test site and many ideas on how to improve my Tcl implementation of Modules. Leif Hedstrom added GNU's autoconf support, x-resource command, helped significantly with the port to Tcl 7.x and has provided valuable input. I would also like to thank Richard Elling at Auburn University for his comments, help with the Modules' man pages and his application 'user-setup'. A paper on 'user-setup' was presented at this year's USENIX LISA VI conference. The paper and the application can be acquired via anonymous ftp from ftp.eng.auburn.edu. Peter W. Osel added support for Extended Tcl (TclX), autoloading of Tcl functions, autoconf 2.x; There are many others that deserve thanks but too many to list here -- thanks to everyone who has helped. R.K.Owen added the modules versioning, ported to Linux, reworked the code to use higher level Tcl calls eliminating the need for Tcl internal header files, various code fixes and changes, added some useful scripts, and is the current maintainer of the modules-3.1 distribution. Robert Minsk , added the "module-info specified" and the "is-loaded" modulefile commands, and for various code and script fixes. Further & updated list of contributors can be found in the ChangeLog file. 7. Bugs and Comments ____________________ Report bugs to 'modules-interest@Eng.Auburn.EDU'. Please try to provide a full environment listing and a copy of the modulefiles you're trying to manipulate. Be as explicit and detailed as possible. Comments and suggestions for improvement are always welcome. 8. Getting the Sources ______________________ There are two ways to get the sources. If you just intend to use modules and have no interest in modifying or improving them, then get them via anonymous ftp from Primary-site: ftp1.sourceforge.net /pub/sourceforge/m/mo/modules Alternate-site: sunsite.unc.edu /pub/Linux/utils/shell/ Alternate-site: owen.sj.ca.us /pub/rkowen/modules/ However, if you have coding expertise and wish to contribute code modifications ... or you want the ``bleeding edge'' latest sources then get them via the Modules CVS repository server: This will download the current checked-in version cvs -d:pserver:anonymous@cvs.modules.sourceforge.net:/cvsroot/modules login Just hit return when prompted for the password. cvs -d:pserver:anonymous@cvs.modules.sourceforge.net:/cvsroot/modules \ checkout modules (The preceeding commands may be wrong - visit for other CVS download instructions.) If you have modules installed already from a recent distribution, then you can use the aliases defined by the module-cvs modulefile. Typically, it can be loaded with: module load modules module-cvs Then use the modules-login and modules-get aliases. You will need recent versions of automake and autoconf if you use the CVS version of modules. After your initial checkout you must run the command: % autoreconf -f -i to generate the rest of the build infrastructure. For a brief HOWTO on CVS read http://kooz.sj.ca.us/rkowen/howto/cvsF.html . To contribute code patches, please "cvs diff -u" them against the modules CVS repository. Thanks, John L. Furlan (with additions by R.K.Owen and Harlan Stenn) modules-3.2.10/TODO000066400000000000000000000013311210077407400137350ustar00rootroot00000000000000THINGS TODO ----------- * Add an option for user to select between strcmp/strcasecmp/colcomp in filename_compare. (add tests for each of the options.) * Make "unload" be more sensible, as to what is the opposite behavior of "use", "unuse", "load", & "unload" in unloading a module. * Use the "module avail" cache even for the module load/unload lookups * Add --remove (opposite of --create) to remove cache files * Add "exists" switch to exit with 0 or 1 if the given modulefile exists or not. * Add "exec" switch to execute the given "embedded" Tcl routines in modulefiles. * Add RPM distribution creation to Makefile. * fix order that and scope of .modulerc files are read in. * fix the module-alias command. modules-3.2.10/acinclude.m4000066400000000000000000000045251210077407400154460ustar00rootroot00000000000000dnl dnl File: acinclude.m4 dnl Revision: 1.10 dnl Last Mod: 2005/11/13 dnl Created: 1994/06/19 dnl Author: Leif Hedstrom dnl Martin S. Utesch dnl Peter W. Osel dnl Modified: R.K.Owen dnl dnl Search a set of full-path file names, and select the first one dnl that we can locate. Works a little bit like AC_PATH_PROG, but dnl search paths can be defined with $3. dnl AC_DEFUN([EM_PATH_PROG_SEARCH], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $3; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_$1="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROG_SEARCH will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test -n "[$]$1"; then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) dnl -------------------------------------------------------------- dnl AC_SET_STATIC(VARIABLE [, VALUE]) dnl dnl Define a substition variable ($1) to be a reasonable option to dnl link the binary `static'. $2 is the option as provided with dnl the command line switch, e.g. yes, no, "-static" etc. dnl AC_DEFUN([EM_SET_STATIC], [ AC_MSG_CHECKING([for static linking flag]) if test "$2" = "yes"; then if test "$CC" = "gcc"; then $1="-static" AC_MSG_RESULT([setting $1 to '-static']) elif test "$UNAME" != ""; then os_system=`$UNAME -s` if test "$os_system" = "IRIX"; then $1="-non_shared" AC_MSG_RESULT([setting $1 to '-non_shared']) else $1="-Bstatic" AC_MSG_RESULT([setting $1 to '-Bstatic']) fi else $1="-Bstatic" AC_MSG_RESULT([setting $1 to '-Bstatic']) fi elif test "$2" != "no"; then AC_MSG_RESULT([setting $1 to '$2']) $1=$2 else test "$2" != "no" && $1=$2 AC_MSG_RESULT(no) fi])dnl dnl -------------------------------------------------------------- modules-3.2.10/aclocal.m4000066400000000000000000001075261210077407400151220ustar00rootroot00000000000000# generated automatically by aclocal 1.11.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, # Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, [m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, # 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([config/emtcl.m4]) m4_include([config/tcl.m4]) m4_include([acinclude.m4]) modules-3.2.10/cmdAlias.c000066400000000000000000000132161210077407400151330ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdAlias.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: The Tcl set-alias command ** ** ** ** Exports: cmdSetAlias ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 592c3a52c48dbf5c0dfe7d60e8ee1dd6b10b98c4 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "cmdAlias.c"; /** File name of this module **/ #if WITH_DEBUGGING_CALLBACK static char _proc_cmdSetAlias[] = "cmdSetAlias"; #endif /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdSetAlias ** ** ** ** Description: Callback function for (re)setting aliases ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdSetAlias( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdSetAlias, NULL); #endif /** ** Whatis mode? **/ if( g_flags & (M_WHATIS | M_HELP)) return( TCL_OK); /** ------- EXIT PROCEDURE -------> **/ /** ** Parameter check. Valid commands are: ** ** unset-alias ** set-alias **/ if( (!strncmp( argv[0], "un", 2) && (argc != 2)) || (!strncmp( argv[0], "set", 3) && (argc != 3))) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "variable", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Display only mode? **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s\t ", argv[ 0]); while( --argc) fprintf( stderr, "%s ", *++argv); fprintf( stderr, "\n"); return( TCL_OK); /** ------- EXIT PROCEDURE -------> **/ } /** ** Switch command **/ if( g_flags & M_SWSTATE1) { set_marked_entry(markAliasHashTable, (char *) argv[1], M_SWSTATE1); return( TCL_OK); /** ------- EXIT PROCEDURE -------> **/ } else if( g_flags & M_SWSTATE2) { set_marked_entry(markAliasHashTable, (char *) argv[1], M_SWSTATE2); } else if( g_flags & M_SWSTATE3) { int marked_val; if(marked_val = chk_marked_entry(markAliasHashTable,(char *) argv[1])) { if( marked_val == M_SWSTATE1) store_hash_value(aliasUnsetHashTable, argv[1], argv[2]); else return( TCL_OK); /** ------- EXIT PROCEDURE -------> **/ } } else if( g_flags & M_REMOVE) { store_hash_value( aliasUnsetHashTable, argv[1], argv[2]); } /** ** Finally remove or set the alias **/ if( *argv[0] == 'u' || (g_flags & M_REMOVE)) store_hash_value( aliasUnsetHashTable, argv[1], argv[2]); else store_hash_value( aliasSetHashTable, argv[1], argv[2]); #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdSetAlias, NULL); #endif return( TCL_OK); } /** End of 'cmdSetAlias' **/ modules-3.2.10/cmdChdir.c000066400000000000000000000027541210077407400151400ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** File: cmdChdir.c ** ** First Edition: 2009-06-27 ** ** ** ** Authors: Gerrit Renker ** ** Description: Implements a "chdir" command to set the working ** ** directory upon module load/switch. ** ** ** ** Exports: cmdChDir ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** change_dir Communicates the target directory. ** ** ************************************************************************ ** ****/ #include "modules_def.h" static char module_name[] = __FILE__; char *change_dir = NULL; int cmdChDir(ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, __func__, NULL); #endif if(g_flags & ~(M_LOAD|M_SWSTATE2)) return TCL_OK; if (argc != 2) { if (OK != ErrorLogger( ERR_USAGE, LOC, argv[0], " directory", NULL)) return TCL_ERROR; } if (g_flags & M_NONPERSIST) return TCL_OK; if(g_flags & M_DISPLAY) { fprintf(stderr, "%s\t%s\n", argv[0], argv[1]); return TCL_OK; } /* The actual work happens here */ if (change_dir != NULL) free(change_dir); change_dir = strdup(argv[1]); return TCL_OK; } modules-3.2.10/cmdConflict.c000066400000000000000000000403611210077407400156440ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdConflict.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: The Tcl conflict and prereq commands. ** ** ** ** Exports: cmdConflict ** ** cmdPrereq ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 729617d8bb5db0ac3250d01b322bcee750b8c540 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char error_module[ MOD_BUFSIZE]; static char module_name[] = "cmdConflict.c"; /** File name of this module **/ #if WITH_DEBUGGING_UTIL static char _proc_checkConflict[] = "checkConflict"; #endif #if WITH_DEBUGGING_CALLBACK static char _proc_cmdConflict[] = "cmdConflict"; static char _proc_cmdPrereq[] = "cmdPrereq"; #endif /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: checkConflict ** ** ** ** Description: Check whether the 'g_current_module' is in the list ** ** of passed modules ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp According Tcl interp.** ** char *path Modulepath to be chk.** ** char **modulelist List of loaded mod. ** ** int nummodules Number of loaded mod.** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** g_current_module Module to check for ** ** ** ** ************************************************************************ ** ++++*/ static int checkConflict( Tcl_Interp *interp, char *path, char **modulelist, unsigned int nummodules) { char **new_modulelist; int new_nummodules, k; struct stat stat_info; char *buffer; #if WITH_DEBUGGING_UTIL ErrorLogger( NO_ERR_START, LOC, _proc_checkConflict, NULL); #endif memset( error_module, '\0', MOD_BUFSIZE); /** ** Check all modules passed to me as parameter ** At first clarify if they really so exist ... **/ for( k=0; k **/ unwind1: null_free((void *) &buffer); unwind0: return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** End of 'checkConflict' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdConflict ** ** ** ** Description: Callback function for 'confilct' ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdConflict( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { char **pathlist, /** List of module-pathes **/ **modulelist; /** List of modules **/ char *modulepath; /** Contents of MODULEPATH **/ int i, j, /** Loop counters **/ numpaths, nummodules;/** Size of the according arrays **/ #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdConflict, NULL); #endif /** ** Whatis mode **/ if( g_flags & (M_WHATIS | M_HELP)) goto success0; /** ** Check the parameters. Usage is 'conflict [ ...]' **/ if( argc < 2) if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "conflicting-modulefiles", NULL)) goto unwind0; /** ** There will be no conflicts in case of switch or unload **/ if( g_flags & (M_REMOVE | M_SWITCH)) goto success0; /** ** Load the MODULEPATH and split it into a list of paths. Assume success ** if no list to be built... **/ if((char *) NULL == (modulepath = xgetenv( "MODULEPATH"))) if( OK != ErrorLogger( ERR_MODULE_PATH, LOC, NULL)) goto unwind0; if((char **) NULL==(pathlist=SplitIntoList(interp, modulepath, &numpaths, _colon))) goto success1; /** ** Non-persist mode? **/ if (g_flags & M_NONPERSIST) { return (TCL_OK); } /** ** Display? **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s\t ", argv[ 0]); while( --argc) fprintf( stderr, "%s ", *++argv); fprintf( stderr, "\n"); goto success2; } /** ** Now check/display all passed modules ... **/ for( i=1; i **/ unwind2: FreeList( pathlist, numpaths); unwind1: null_free((void *) &modulepath); unwind0: return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** End of 'cmdConflict' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdPrereq ** ** ** ** Description: Callback function for 'prereq' ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdPrereq( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { char ***savedlists = (char ***) NULL; int *savedlens = (int *) NULL; char **pathlist, **modulelist, *modulepath, *notloaded_flag = (char *) argv[1]; int i, j, k, numpaths, nummodules, listcnt = 0, Result = TCL_OK; char buffer[ MOD_BUFSIZE]; #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdPrereq, NULL); #endif /** ** Parameter check. Usage is 'prereq [ ...]' **/ if( argc < 2) if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], " prerequisite-modules", NULL)) goto unwind0; /** ** There's no prerequisite check in case of removal **/ if( g_flags & (M_REMOVE | M_WHATIS)) goto success0; /** ** Non-persist mode? **/ if (g_flags & M_NONPERSIST) { return (TCL_OK); } /** ** Display mode **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s\t ", argv[ 0]); while( --argc) fprintf( stderr, "%s ", *++argv); fprintf( stderr, "\n"); goto success0; } /** ** Load the MODULEPATH and split it into a list of paths. Assume success ** if no list to be built... **/ if((char *) NULL == (modulepath = xgetenv( "MODULEPATH"))) if( OK != ErrorLogger( ERR_MODULE_PATH, LOC, NULL)) goto unwind0; #if WITH_DEBUGGING_CALLBACK_1 ErrorLogger( NO_ERR_DEBUG, LOC, "Got modulepath: '", modulepath, "'", NULL); #endif if((char **) NULL==(pathlist=SplitIntoList(interp, modulepath, &numpaths, _colon))) goto success1; /** ** Allocate memory for the lists of conflict modules **/ if((char ***) NULL==(savedlists=(char***) module_malloc(numpaths * (argc-1) * sizeof(char**)))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) goto unwind1; if((int *) NULL == (savedlens = (int*) module_malloc(numpaths * (argc-1) * sizeof( int)))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) goto unwind2; /** ** Check/Display all passed modules **/ #if WITH_DEBUGGING_CALLBACK_1 ErrorLogger( NO_ERR_DEBUG, LOC, "Scanning all ", (sprintf( buffer, "%d", numpaths), buffer), "modulepaths", NULL); #endif for( i=1; i **/ unwind3: null_free((void *) &savedlens); unwind2: null_free((void *) &savedlists); unwind1: null_free((void *) &modulepath); unwind0: return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** End of 'cmdPrereq' **/ modules-3.2.10/cmdInfo.c000066400000000000000000000314501210077407400147750ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdInfo.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: The Tcl module-info routine which provides informa- ** ** tion about the state of Modules as the modulefile ** ** is being parsed. ** ** ** ** Exports: cmdModuleInfo ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 451d721552b7050eb97f9b9290d952f1816a2693 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "cmdInfo.c"; /** File name of this module **/ #if WITH_DEBUGGING_CALLBACK static char _proc_cmdModuleInfo[] = "cmdModuleInfo"; #endif /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdModuleInfo ** ** ** ** Description: Callback function for 'module-info' ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly ** ** before this function is ** ** called in order to control ** ** everything. ** ** g_specified_module The module name from the ** ** command line. ** ** g_current_module The module which is handled ** ** by the current command ** ** ** ** ************************************************************************ ** ++++*/ int cmdModuleInfo( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { char *s, *t, buf[ BUFSIZ]; #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdModuleInfo, NULL); #endif /** ** Parameter check **/ if( argc < 2) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "info-descriptor ", "descriptor-args", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } if( !strcmp(argv[1], "type")) { /** ** 'module-info type' ** returns 'C' to refer to the C-version of modules ** (the Tcl-only version returns 'Tcl') **/ Tcl_SetResult( interp, "C", TCL_STATIC); } else if( !strcmp( argv[1], "flags")) { /** ** 'module-info flags' ? **/ char tmpbuf[6]; sprintf( tmpbuf, "%d", g_flags); Tcl_SetResult( interp, tmpbuf, TCL_VOLATILE); } else if( !strcmp( argv[1], "mode")) { /** ** 'module-info mode' ** without suggestion this will return the name of the state we're in. **/ if( argc < 3) { if( g_flags & M_SWSTATE1) Tcl_SetResult( interp, "switch1", TCL_STATIC); else if( g_flags & M_SWSTATE2) Tcl_SetResult( interp, "switch2", TCL_STATIC); else if( g_flags & M_SWSTATE3) Tcl_SetResult( interp, "switch3", TCL_STATIC); else if( g_flags & M_LOAD) Tcl_SetResult( interp, "load", TCL_STATIC); else if( g_flags & M_REMOVE) Tcl_SetResult( interp, "remove", TCL_STATIC); else if( g_flags & M_DISPLAY) Tcl_SetResult( interp, "display", TCL_STATIC); else if( g_flags & M_HELP) Tcl_SetResult( interp, "help", TCL_STATIC); else if( g_flags & M_WHATIS) Tcl_SetResult( interp, "whatis", TCL_STATIC); else if( g_flags & M_NONPERSIST) Tcl_SetResult( interp, "nonpersist", TCL_STATIC); else Tcl_SetResult( interp, "unknown", TCL_STATIC); } else { /** ** 'module-info mode ' ** results in a boolean return indicating whether this is the ** correct state ... **/ Tcl_SetResult( interp, "0", TCL_STATIC); if( !strcmp( argv[2], "load")) { if( g_flags & M_LOAD) Tcl_SetResult( interp, "1", TCL_STATIC); } else if( !strcmp( argv[2], "remove")) { if( g_flags & M_REMOVE) Tcl_SetResult( interp, "1", TCL_STATIC); } else if( !strcmp( argv[2], "display")) { if( g_flags & M_DISPLAY) Tcl_SetResult( interp,"1", TCL_STATIC); } else if( !strcmp( argv[2], "nonpersist")) { if( g_flags & M_NONPERSIST) Tcl_SetResult( interp,"1", TCL_STATIC); } else if( !strcmp( argv[2], "help")) { if( g_flags & M_HELP) Tcl_SetResult( interp, "1", TCL_STATIC); } else if( !strcmp( argv[2], "whatis")) { if( g_flags & M_WHATIS) Tcl_SetResult( interp, "1", TCL_STATIC); } else if( !strcmp( argv[2], "switch1")) { if( g_flags & M_SWSTATE1) Tcl_SetResult( interp,"1",TCL_STATIC); } else if( !strcmp(argv[2], "switch2")) { if( g_flags & M_SWSTATE2) Tcl_SetResult( interp,"1",TCL_STATIC); } else if( !strcmp(argv[2], "switch3")) { if( g_flags & M_SWSTATE3) Tcl_SetResult( interp,"1",TCL_STATIC); } else if( !strcmp(argv[2], "switch")) { if( g_flags & M_SWITCH) Tcl_SetResult( interp, "1", TCL_STATIC); } else { ErrorLogger( ERR_USAGE, LOC, argv[0], "mode ", "[load|remove|" "display|help|whatis|switch1|switch2|switch3|switch|nonpersist]", NULL); return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } } } else if( !strcmp( argv[1], "user")) { /** ** 'module-info user' ** without suggestion this will return the current user level **/ if( argc < 3) { if( UL_NOVICE == sw_userlvl) Tcl_SetResult( interp, "novice", TCL_STATIC); else if( UL_ADVANCED == sw_userlvl) Tcl_SetResult( interp, "advanced", TCL_STATIC); else if( UL_EXPERT == sw_userlvl) Tcl_SetResult( interp, "expert", TCL_STATIC); else Tcl_SetResult( interp, "unknown", TCL_STATIC); } else { /** ** 'module-info user ' ** results in a boolean return indicating whether this is the ** correct user level ... **/ Tcl_SetResult( interp, "0", TCL_STATIC); if( !strcmp( argv[2], "novice")) { if( UL_NOVICE == sw_userlvl) Tcl_SetResult( interp, "1", TCL_STATIC); } else if( !strcmp( argv[2], "advanced")) { if( UL_ADVANCED == sw_userlvl) Tcl_SetResult( interp, "1", TCL_STATIC); } else if( !strcmp( argv[2], "expert")) { if( UL_EXPERT == sw_userlvl) Tcl_SetResult( interp, "1", TCL_STATIC); } else { ErrorLogger( ERR_USAGE, LOC, argv[0], "user ", "[novice|advanced|expert]", NULL); return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } } } else if( !strcmp(argv[1], "name")) { /** ** 'module-info name' ** returns the name of the current module **/ Tcl_SetResult( interp, g_current_module, TCL_VOLATILE); } else if( !strcmp(argv[1], "shell")) { /** ** 'module-info shell' ** returns the name of the current user shell **/ if( argc < 3) { Tcl_SetResult( interp, shell_name, TCL_VOLATILE); } else { if( !strcmp( argv[2], shell_name)) Tcl_SetResult( interp, "1", TCL_STATIC); else Tcl_SetResult( interp, "0", TCL_STATIC); } } else if( !strcmp(argv[1], "shelltype")) { /** ** 'module-info shelltype' ** returns the name of the current user shelltype family **/ if( argc < 3) { Tcl_SetResult( interp, shell_derelict, TCL_VOLATILE); } else { if( !strcmp( argv[2], shell_derelict)) Tcl_SetResult( interp, "1", TCL_STATIC); else Tcl_SetResult( interp, "0", TCL_STATIC); } } else if( !strcmp(argv[1], "trace")) { /** ** 'module-info trace' ** Check whether tracing is turned on **/ char *cmd, *module; if( argc > 2) cmd = (char *) argv[ 2]; else cmd = module_command; if( argc > 3) module = (char *) argv[ 3]; else module = g_current_module; if( CheckTracing(interp, cmd, module)) Tcl_SetResult( interp, "1", TCL_STATIC); else Tcl_SetResult( interp, "0", TCL_STATIC); } else if( !strcmp(argv[1], "tracepat")) { char *cmd, *pattern; if( argc > 2) cmd = (char *) argv[ 2]; else cmd = module_command; if((char *) NULL == (pattern = GetTraceSel(interp, cmd))) Tcl_SetResult( interp, "*undef*", TCL_STATIC); else Tcl_SetResult( interp, pattern, TCL_VOLATILE); } else if( !strcmp(argv[1], "alias")) { /** ** 'module-info alias' ** Print the value of the passed alias **/ if( argc < 3) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "alias ", "name", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } if( AliasLookup( (char *) argv[2], &s, &t)) { /* sprintf( buf, "%s/%s", s, t); */ strcpy( buf, s); strcat( buf, "/"); strcat( buf, t); Tcl_SetResult( interp, buf, TCL_VOLATILE); } else { Tcl_SetResult( interp, "*undef*", TCL_STATIC); } } else if( !strcmp(argv[1], "symbols")) { /** ** 'module-info symbols' ** List all symbolic names of the passed or current module file **/ char *name; name = (argc < 3) ? g_current_module : (char *) argv[2]; if((char *) NULL == (s = ExpandVersions( name))) Tcl_SetResult( interp, "*undef*", TCL_STATIC); else Tcl_SetResult( interp, (char *) s, TCL_VOLATILE); } else if( !strcmp(argv[1], "version")) { /** ** 'module-info version' ** Returns the full qualified module name and version of the passed ** symbolic version specifier **/ if( VersionLookup( (char *) argv[2], &s, &t)) { if( t) { /* sprintf( buf, "%s/%s", s, t); */ strcpy( buf, s); strcat( buf, "/"); strcat( buf, t); } else { /* sprintf( buf, "%s", s); */ strcpy( buf, s); } Tcl_SetResult( interp, buf, TCL_VOLATILE); } else { Tcl_SetResult( interp, "*undef*", TCL_STATIC); } } else if( !strcmp(argv[1], "specified")) { /** ** 'module-info specified' ** gives the module name as specified on the command line **/ if( g_specified_module) { /* TCL_STATIC because it comes from the command line */ Tcl_SetResult( interp, g_specified_module, TCL_STATIC); } else { Tcl_SetResult( interp, "*undef*", TCL_STATIC); } } else { /** ** unknown command .... **/ if( OK != ErrorLogger( ERR_INFO_DESCR, LOC, argv[1], NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdModuleInfo, NULL); #endif return( TCL_OK); } /** End of 'cmdModuleInfo' **/ modules-3.2.10/cmdIsLoaded.c000066400000000000000000000137141210077407400155710ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdIsLoaded.c ** ** First Edition: 2000/04/12 ** ** ** ** Description: The Tcl conflict and prereq commands. ** ** ** ** Exports: cmdIsLoaded ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 97f15a6c37e9bfa0bccc33603bc5f838466f1260 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "cmdIsLoaded.c"; /** File name of this module **/ #if WITH_DEBUGGING_CALLBACK static char _proc_cmdIsLoaded[] = "cmdIsLoaded"; #endif /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdIsLoaded ** ** ** ** Description: Callback function for 'is-loaded' ** ** ** ** First Edition: 2000/04/12 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdIsLoaded( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { char **pathlist; char **modulelist; char *modulepath; char *notloaded_flag = (char *) argv[1]; int i, j, k, numpaths, nummodules; #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdIsLoaded, NULL); #endif /** ** Parameter check. Usage is 'is-loaded [ ...]' **/ if( argc < 2) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "is-loaded-modules", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** There's no prerequisite check in case of whatis **/ if( g_flags & M_WHATIS) return( TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ /** ** Load the MODULEPATH and split it into a list of paths **/ if( !(modulepath = (char *) getenv( "MODULEPATH"))) { if( OK != ErrorLogger( ERR_MODULE_PATH, LOC, NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } #if WITH_DEBUGGING_CALLBACK_1 ErrorLogger( NO_ERR_DEBUG, LOC, "Got modulepath: '", modulepath, "'", NULL); #endif if( !(pathlist = SplitIntoList( interp, modulepath, &numpaths, _colon))) return( TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ /** ** Check/Display all passed modules **/ for( i=1; i **/ /** ** Parameter check **/ if( argc < 3) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], " error-weight", " facility", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Display mode? **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s\t ", argv[ 0]); while( --argc) fprintf( stderr, "%s ", *++argv); fprintf( stderr, "\n"); return( TCL_OK); /** ------- EXIT PROCEDURE -------> **/ } /** ** Get the current facility pointer. **/ if((char **) NULL == (facptr = GetFacilityPtr( (char *) argv[1]))) return(( OK == ErrorLogger(ERR_INVWGHT_WARN,LOC, argv[1],NULL)) ? TCL_OK : TCL_ERROR); /** ** Allocate memory for the facility list **/ if((char *) NULL == (faclist = (char *) module_malloc( alc_len))) return(( OK == ErrorLogger( ERR_ALLOC, LOC, NULL)) ? TCL_OK : TCL_ERROR); /** ** Scan all given facilities and add them to the list **/ for( i=2; i alc_len) { alc_len += PART_LEN; if(!(faclist = (char *) module_realloc( faclist, alc_len))) return(( OK == ErrorLogger( ERR_ALLOC, LOC, NULL)) ? TCL_OK : TCL_ERROR); } faclist[save_len] = ':'; strcpy( &faclist[save_len + 1], argv[ i]); } /** ** Now scan the whole list and copy all valid parts into a new buffer **/ if((char *) NULL == (tmp = stringer(NULL, strlen( faclist), NULL))) { null_free((void *) &faclist); return(( OK == ErrorLogger( ERR_ALLOC, LOC, NULL)) ? TCL_OK : TCL_ERROR); } for( t = tmp, s = xstrtok( faclist, ":, \t"); s; s = xstrtok( NULL, ":, \t") ) { if (s && !*s) continue; /* skip empty ones */ if( '.' == *s || '/' == *s || /** filename **/ !strcmp( _stderr, s) || !strcmp( _stdout, s) || /** special **/ !strcmp( _null, s) || !strcmp( _none, s) || /** null **/ CheckFacility( s, &i, &i) ) { /** syslog **/ if( t != tmp) *t++ = ':'; strcpy( t, s); t += strlen( s); } else { /** ** bad facility found **/ if( OK != ErrorLogger( ERR_INVFAC_WARN, LOC, s, NULL)) break; /** for **/ } } /** for **/ /** ** Now, 'tmp' should contain the new list of facilities. Check wheter ** there has been one allocated so far ... ** We do not need the orginal faclist any more. **/ null_free((void *) &faclist); if((char *) NULL != *facptr) null_free((void *) facptr); *facptr = tmp; #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdModuleLog, NULL); #endif return( TCL_OK); } /** End of 'cmdModuleLog' **/ modules-3.2.10/cmdMisc.c000066400000000000000000000133541210077407400150000ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdMisc.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: The Tcl 'system' command ** ** ** ** Exports: cmdSystem ** ** ** ** Notes: The Following code was written by Don Libes, NIST ** ** It was taken from his tool, 'expect' ... ** ** I have edited parts of it... ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 2f8da08476e5cd6791b9f7dd4077b416a6d54f6f $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ #define MAX_ARGLIST 10240 /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "cmdMisc.c"; /** File name of this module **/ #if WITH_DEBUGGING_CALLBACK static char _proc_cmdSystem[] = "cmdSystem"; #endif /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdSystem ** ** ** ** Description: Callback function for 'system' ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdSystem( ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { int i; int saved_stdout; char buf[ MAX_ARGLIST]; char *bufp = buf; int total_len = 0, arg_len; #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdSystem, NULL); #endif /** ** Whatis mode **/ if( g_flags & (M_WHATIS | M_HELP)) return( TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ /** ** Display mode? **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s\t\t ", argv[ 0]); for( i=1; i **/ } /** ** Prepare a buffer to hold the complete 'system' call ** Watch over the commands complete length while copying ... **/ for( i = 1; i MAX_ARGLIST) { if( OK != ErrorLogger( ERR_ARGSTOLONG, LOC, argv[0], (sprintf( buf, "%d", total_len), buf), NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Copy the argument ov the buffer and put a space at its end **/ memcpy( bufp, argv[i], arg_len); bufp += arg_len; memcpy( bufp, " ", 1); bufp += 1; } /** ** For Modules, stdout must be directed to stderr so it ** isn't parsed by the evaluating shell. We also must save it here so it ** can be restored after this command has been executed. **/ saved_stdout = TieStdout(); *(bufp-1) = '\0'; i = system( buf); /** ** Following the style of Tcl_ExecCmd, we can just return the ** raw result (appropriately shifted and masked) to Tcl **/ sprintf( buf, "%d", (0xff & (i >> 8))); Tcl_SetResult( interp, buf, TCL_VOLATILE); /* * Restore stdout. */ UnTieStdout( saved_stdout); #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdSystem, NULL); #endif return( TCL_OK); } /** End of 'cmdSystem' **/ modules-3.2.10/cmdModule.c000066400000000000000000000552561210077407400153410ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdModule.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: The actual module command from the Tcl level. This ** ** routines calls other ModuleCmd routines to carry out ** ** the subcommand requested. ** ** ** ** Exports: cmdModule ** ** Read_Modulefile ** ** Execute_TclFile ** ** CallModuleProcedure ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 429749ba5233f5a38a54992c6039d1d74feed204 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ char _fil_stdin[] = "stdin"; char _fil_stdout[] = "stdout"; char _fil_stderr[] = "stderr"; char _fil_devnull[] = "/dev/null"; int linenum = 0; static char module_name[] = "cmdModule.c"; /** File name of this module **/ #if WITH_DEBUGGING_CALLBACK static char _proc_cmdModule[] = "cmdModule"; #endif #if WITH_DEBUGGING_UTIL static char _proc_Read_Modulefile[] = "Read_Modulefile"; #endif #if WITH_DEBUGGING_UTIL_1 static char _proc_Execute_TclFile[] = "Execute_TclFile"; static char _proc_CallModuleProcedure[] = "CallModuleProcedure"; #endif char *module_command; /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdModule ** ** ** ** Description: Evaluation of the module command line and callup of ** ** the according subroutine ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** g_current_module The module which is handled ** ** by the current command ** ** ** ** ************************************************************************ ** ++++*/ int cmdModule( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { int return_val = -1, i; int store_flags = g_flags; char *store_curmodule = NULL; char *save_module_command = NULL; int match = 0; /** ** These skip the arguments past the shell and command. **/ int num_modulefiles = argc - 2; char **modulefile_list = (char **) argv + 2; #if 0 int x=0; # define _XD fprintf(stderr,":%d:",++x), #else # define _XD #endif #define _MTCH _XD match = #define _ISERR ((match == -1) && (*TCL_RESULT(interp))) #define _TCLCHK(a) {if(_ISERR) ErrorLogger(ERR_EXEC,LOC,TCL_RESULT(a),NULL);} #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdModule, NULL); #endif /** ** Help or whatis mode? **/ if( g_flags & (M_HELP | M_WHATIS)) return( TCL_OK); /** ** Parameter check **/ if( argc < 2) { (void) ErrorLogger( ERR_USAGE, LOC, "module", " command ", " [arguments ...] ", NULL); (void) ModuleCmd_Help( interp, 0, modulefile_list); return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Non-persist mode? **/ if (g_flags & M_NONPERSIST) { return (TCL_OK); } /** ** Display whatis mode? **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s\t\t ", argv[ 0]); for( i=1; i **/ } /** ** Check for the module 'magic cookie' ** Trust stdin as a valid module file ... **/ if( !strcmp( filename, _fil_stdin) && !check_magic( filename, MODULES_MAGIC_COOKIE, MODULES_MAGIC_COOKIE_LENGTH)) { if( OK != ErrorLogger( ERR_MAGIC, LOC, filename, NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Now do execute that module file and evaluate the result of the ** latest executed command **/ result = Execute_TclFile(interp, filename); #if WITH_DEBUGGING_UTIL if(EM_ERROR == ReturnValue(interp, result)) ErrorLogger( NO_ERR_DEBUG, LOC, "Execution of '", filename, "' failed", NULL); #endif /** ** Return the result as derivered from the module file execution **/ #if WITH_DEBUGGING_UTIL ErrorLogger( NO_ERR_END, LOC, _proc_Read_Modulefile, NULL); #endif return( result); } /** End of 'Read_Modulefile' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: Execute_TclFile ** ** ** ** Description: Read in and execute all commands concerning the Tcl ** ** file passed as parameter ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp According Tcl interp.** ** char *filename ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: line Input read buffer ** ** ** ** ************************************************************************ ** ++++*/ int Execute_TclFile( Tcl_Interp *interp, char *filename) { FILE *infile; int gotPartial = 0; int result = 0; EM_RetVal em_result = EM_OK; char *cmd; Tcl_DString cmdbuf; #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_Execute_TclFile, NULL); #endif /** ** If there isn't a line buffer allocated so far, do it now **/ if( line == NULL) { if( NULL == (line = (char*) module_malloc(LINELENGTH * sizeof(char)))) { if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } } /** ** If we're supposed to be interpreting from stdin, set infile ** equal to stdin, otherwise, open the file and interpret **/ if( !strcmp( filename, _fil_stdin)) { infile = stdin; } else { if( NULL == (infile = fopen( filename, "r"))) { if( OK != ErrorLogger( ERR_OPEN, LOC, filename, "reading", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } } /** ** Allow access to which file is being loaded. **/ linenum = 0; Tcl_SetVar( interp, "ModulesCurrentModulefile", filename, 0); Tcl_DStringInit( &cmdbuf); while( 1) { linenum++; if( fgets(line, LINELENGTH, infile) == NULL) { if( !gotPartial) { break; /** while **/ } line[0] = '\0'; } /** ** Put the whole command on the command buffer **/ cmd = Tcl_DStringAppend( &cmdbuf, line, (-1)); if( line[0] != 0 && !Tcl_CommandComplete(cmd)) { gotPartial++; continue; } /** ** Now evaluate the command and react on its result ** Reinitialize the command buffer **/ #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_DEBUG, LOC, " Evaluating '", cmd, "'", NULL); #endif result = Tcl_Eval( interp, cmd); if( EM_ERROR == (em_result = ReturnValue(interp, result))) { ErrorLogger( ERR_EXEC, LOC, cmd, NULL); } Tcl_DStringTrunc( &cmdbuf, 0); #if WITH_DEBUGGING_UTIL_1 { char buffer[ 80]; switch( result) { case TCL_OK: strcpy( buffer, "TCL_OK"); break; case TCL_ERROR: strcpy( buffer, "TCL_ERROR"); break; case TCL_LEVEL0_RETURN: strcpy( buffer, "TCL_LEVEL0_RETURN"); break; } ErrorLogger( NO_ERR_DEBUG, LOC, " Result: '", buffer, "'", NULL); } #endif switch( result) { case TCL_OK: gotPartial = 0; continue; /** while **/ case TCL_ERROR: interp->errorLine = ((linenum-1)-gotPartial) + interp->errorLine; /* FALLTHROUGH */ case TCL_LEVEL0_RETURN: break; /** switch **/ } /** ** If the while loop hasn't been continued so far, it is to be broken ** now **/ break; /** while **/ } /** while **/ /** ** Free up what has been used, close the input file and return the result ** of the last command to the caller **/ Tcl_DStringFree( &cmdbuf); if( EOF == fclose( infile)) if( OK != ErrorLogger( ERR_CLOSE, LOC, filename, NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_END, LOC, _proc_Execute_TclFile, NULL); #endif return( result); } /** End of 'Execute_TclFile' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: CallModuleProcedure ** ** ** ** Description: Call a Tcl Procedure ** ** Executes the passed modulefile (conditionally hidden)** ** and then evaluates the passed Tcl procedure ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp According Tcl interp.** ** Tcl_DString *cmdptr Buffer fot the Tcl ** ** command ** ** char *modulefile According module file** ** char *procname Name of the Tcl Proc.** ** int suppress_output Controlls redirect.** ** of stdout and stderr ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ int CallModuleProcedure( Tcl_Interp *interp, Tcl_DString *cmdptr, char *modulefile, char *procname, int suppress_output) { char cmdline[ LINELENGTH]; char *cmd; int result; int saved_stdout = 0, saved_stderr = 0, devnull; #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_CallModuleProcedure, NULL); #endif /** ** Must send stdout and stderr to /dev/null until the ** ModulesHelp procedure is called. **/ if( suppress_output) { if( 0 > (devnull = open( _fil_devnull, O_RDWR))) { if( OK != ErrorLogger( ERR_OPEN, LOC, _fil_devnull, "changing", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Close STDOUT and reopen it as /dev/null **/ if( -1 == ( saved_stdout = dup( 1))) if( OK != ErrorLogger( ERR_DUP, LOC, _fil_stdout, NULL)) return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ if( -1 == close( 1)) if( OK != ErrorLogger( ERR_CLOSE, LOC, _fil_stdout, NULL)) return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ if( -1 == dup( devnull)) if( OK != ErrorLogger( ERR_DUP, LOC, _fil_devnull, NULL)) return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ /** ** Close STDERR and reopen it as /dev/null **/ if( -1 == ( saved_stdout = dup( 2))) if( OK != ErrorLogger( ERR_DUP, LOC, _fil_stderr, NULL)) return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ if( -1 == close( 2)) if( OK != ErrorLogger( ERR_CLOSE, LOC, _fil_stderr, NULL)) return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ if( -1 == dup( devnull)) if( OK != ErrorLogger( ERR_DUP, LOC, _fil_devnull, NULL)) return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ } /** ** Read the passed module file **/ Read_Modulefile( interp, modulefile); /** ** Reinstall stdout and stderr **/ if( suppress_output) { /** ** Reinstall STDOUT **/ if( EOF == fflush( stdout)) if( OK != ErrorLogger( ERR_FLUSH, LOC, _fil_stdout, NULL)) return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ if( EOF == fflush( stderr)) if( OK != ErrorLogger( ERR_FLUSH, LOC, _fil_stderr, NULL)) return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ if( -1 == close( 1)) if( OK != ErrorLogger( ERR_CLOSE, LOC, _fil_stdout, NULL)) return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ /** ** Reinstall STDERR **/ if( -1 == dup( saved_stdout)) if( OK != ErrorLogger( ERR_DUP, LOC, _fil_stdout, NULL)) return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ if( -1 == close( 2)) if( OK != ErrorLogger( ERR_CLOSE, LOC, _fil_stderr, NULL)) return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ if( -1 == dup( saved_stderr)) if( OK != ErrorLogger( ERR_DUP, LOC, _fil_stderr, NULL)) return( TCL_ERROR); /** ------- EXIT (FAILURE) --------> **/ } /** ** Now evaluate the Tcl Procedure **/ /* sprintf( cmdline, "%s\n", procname); */ strcpy( cmdline, procname); strcat( cmdline, "\n"); cmd = Tcl_DStringAppend( cmdptr, cmdline, (-1)); result = Tcl_Eval( interp, cmd); Tcl_DStringTrunc( cmdptr, 0); #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_END, LOC, _proc_CallModuleProcedure, NULL); #endif return( result); } /** End of 'CallModuleProcedure' **/ modules-3.2.10/cmdPath.c000066400000000000000000000534031210077407400150000ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdPath.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: The path manipulation routines. Much of the heart of ** ** Modules is contained in this file. These routines ** ** are responsible for adding and removing directories ** ** from given PATH-like variables. ** ** ** ** Exports: cmdSetPath ** ** cmdRemovePath ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 1aa261a485ed8fb00714dd83cca77b3d187368ec $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" #ifdef HAS_SYS_PARAM_H #include #endif /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ #ifdef MAXPATHLEN #define PATH_BUFLEN MAXPATHLEN #else #define PATH_BUFLEN 1024 #endif /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ #define _TCLCHK(a) \ {if (*(TCL_RESULT(a))) ErrorLogger(ERR_EXEC,LOC,TCL_RESULT(a),NULL);} /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "cmdPath.c"; /** File name of this module **/ #if WITH_DEBUGGING_CALLBACK static char _proc_cmdSetPath[] = "cmdSetPath"; static char _proc_cmdRemovePath[] = "cmdRemovePath"; static char _proc_Remove_Path[] = "Remove_Path"; #endif static char buffer[ PATH_BUFLEN]; /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ static int Remove_Path( Tcl_Interp *interp, char *variable, char *item, char *sw_marker, const char *delim); /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdSetPath ** ** ** ** Description: Add the passed value (argv[2]) to the specified vari-** ** able (argv[1]). argv[0] specifies, if the variable ** ** is to be appended or prepended. Each directory in ** ** the path is checked to see whether it is already ** ** in the path. If so it is not added. ** ** (Handles options -d C, or --delim[=]C ) ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdSetPath( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { Tcl_RegExp chkexpPtr; /** Regular expression for **/ /** marker checking **/ char *oldpath, /** Old value of 'var' **/ *newpath, /** New value of 'var' **/ *sw_marker = APP_SW_MARKER, /** arbitrary default **/ *startp=NULL, *endp=NULL, /** regexp match endpts **/ *qualifiedpath, /** List of dirs which aren't already in path **/ **pathlist; /** List of dirs **/ const char *delim = _colon; /** path delimiter **/ int append = 1, /** append or prepend **/ numpaths, /** number of dirs in path **/ qpathlen, /** qualifiedpath length **/ arg1 = 1, /** arg start **/ x; /** loop index **/ Tcl_Obj *np_obj; /** new path Tcl Obj **/ #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdSetPath, NULL); #endif /** ** Whatis mode? **/ if( g_flags & (M_WHATIS | M_HELP)) goto success0; /** ** Check arguments. There should be at least 3 args: ** argv[0] - prepend/append ** ... ** argv[n-1]- varname ** argv[n] - value **/ if(argc < 3) if( OK != ErrorLogger(ERR_USAGE, LOC, argv[0], " path-variable directory", NULL)) goto unwind0; /** ** Should this guy be removed from the variable ... If yes, do so! **/ if(g_flags & M_REMOVE) return( cmdRemovePath(client_data, interp, argc, argv)); /** ----> **/ /** ** prepend or append. The default is append. **/ if( !( append = !!strncmp( argv[0], "pre", 3))) sw_marker = PRE_SW_MARKER; /** ** Non-persist mode? **/ if (g_flags & M_NONPERSIST) { return (TCL_OK); } /** ** Display only ... ok, let's do so! **/ if(g_flags & M_DISPLAY) { fprintf( stderr, "%s\t ", argv[ 0]); while( --argc) fprintf( stderr, "%s ", *++argv); fprintf( stderr, "\n"); goto success0; } /** ** Check for the delimiter option **/ if(*(argv[arg1]) == '-') { if (!strcmp(argv[arg1], "-d")) { delim = argv[arg1+1]; arg1 += 2; } else if (!strcmp(argv[arg1], "--delim")) { delim = argv[arg1+1]; arg1 += 2; } else if (!strncmp(argv[arg1], "--delim=", 8)) { delim = argv[arg1]+8; arg1++; } } /** ** Get the old value of the variable. MANPATH defaults to a configure ** generated value. ** Put a \ in front of each '.' and '+'. ** (this is an intentional memory leak) **/ oldpath = EMGetEnv( interp, argv[arg1]); _TCLCHK(interp) if(!oldpath || !*oldpath) { null_free((void *) &oldpath); oldpath = !strcmp( argv[arg1], "MANPATH") ? stringer(NULL,0,DEFAULTMANPATH,NULL) : stringer(NULL,0,"",NULL); } /** ** Split the new path into its components directories so each ** directory can be checked to see whether it is already in the ** existing path. **/ if( !( pathlist = SplitIntoList( interp, (char *) argv[arg1+1], &numpaths, delim))) goto unwind0; /** ** Some space for the list of paths which ** are not already in the existing path. **/ if((char *) NULL == (qualifiedpath = stringer(NULL,0, argv[arg1+1], delim, NULL))) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind1; qpathlen = strlen(qualifiedpath)+1; *qualifiedpath = '\0'; /** make sure null for later **/ for( x = 0; x < numpaths; x++) { regex_quote( pathlist[x], buffer, PATH_BUFLEN); /** ** Check to see if path is already in this path variable. ** It could be at the ** beginning ... ^path: ** middle ... :path: ** end ... :path$ ** only one ... ^path$ **/ if((char *) NULL == (newpath = stringer(NULL,0, "(^", buffer, delim, ")|(",delim, buffer, delim,")|(",delim, buffer, "$)|(^", buffer, "$)",NULL))) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind2; np_obj = Tcl_NewStringObj(newpath,strlen(newpath)); chkexpPtr = Tcl_GetRegExpFromObj(interp, np_obj, TCL_REG_ADVANCED); _TCLCHK(interp) null_free((void *) &newpath); /** ** If the directory is not already in the path, ** add it to the qualified path. **/ if( !Tcl_RegExpExec(interp, chkexpPtr, oldpath, oldpath)) if (!stringer(qualifiedpath + strlen(qualifiedpath), qpathlen - strlen(qualifiedpath), pathlist[x], delim, NULL)) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind2; } /** End of loop that checks for ** already existent path **/ /** ** If all of the directories in the new path already exist, ** exit doing nothing. **/ if( ! *qualifiedpath) goto success1; /* remove trailing delimiter */ qualifiedpath[strlen(qualifiedpath) - 1] = '\0'; /** ** Some space for our newly created path. ** We size at the oldpath plus the addition. **/ if(!(newpath = stringer(NULL, strlen( oldpath) + strlen(qualifiedpath) + 2,NULL))) if( OK != ErrorLogger( ERR_STRING, LOC, NULL)) goto unwind2; *newpath = '\0'; /** ** Easy job to do, if the old path has not been set up so far ... **/ if( !strcmp( oldpath, "")) { strcpy( newpath, qualifiedpath); /** ** Otherwise we have to take care on prepending vs. appending ... ** If there is a append or prepend marker within the variable (see ** modules_def.h) the changes are made according to this markers. Other- ** wise append and prepend will be relative to the strings begin or end. **/ } else { Tcl_Obj *sw_obj = Tcl_NewStringObj(sw_marker,strlen(sw_marker)); Tcl_RegExp markexpPtr = Tcl_GetRegExpFromObj(interp, sw_obj,TCL_REG_ADVANCED); _TCLCHK(interp) strcpy( newpath, oldpath); if( Tcl_RegExpExec(interp, markexpPtr, oldpath, oldpath)) { _TCLCHK(interp) Tcl_RegExpRange(markexpPtr, 0, (CONST84 char **) &startp, (CONST84 char **) &endp); /** ** Append/Prepend marker found **/ if( append) { char ch = *startp; *startp = '\0'; strcpy(newpath, oldpath); /** ** check that newpath has a value before adding delim **/ if (strlen(newpath) > 0 && newpath[strlen(newpath)-1] != *delim) strcat(newpath, delim); strcat(newpath, qualifiedpath); if (newpath[strlen(newpath)-1] != *delim) strcat(newpath, delim); *startp = ch; strcat(newpath, startp); } else { char ch = *endp; *endp = '\0'; strcpy(newpath, oldpath); if (newpath[strlen(newpath)-1] != *delim) strcat(newpath, delim); strcat(newpath, qualifiedpath); *endp = ch; strcat(newpath, endp); } } else { /** ** No marker set **/ if(append) { strcpy(newpath, oldpath); if (newpath[strlen(newpath)-1] != *delim) strcat(newpath, delim); strcat(newpath, qualifiedpath); } else { strcpy(newpath, qualifiedpath); if (*oldpath != *delim) strcat(newpath, delim); strcat(newpath, oldpath); } } /** if( marker) **/ } /** if( strcmp) **/ /** ** Now the new value to be set resides in 'newpath'. Set it up. **/ moduleSetenv( interp, (char *) argv[arg1], newpath, 1); _TCLCHK(interp) #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdSetPath, NULL); #endif /** ** Free resources **/ null_free((void *) &newpath); success1: null_free((void *) &oldpath); null_free((void *) &qualifiedpath); FreeList( pathlist, numpaths); success0: return( TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ unwind2: null_free((void *) &qualifiedpath); unwind1: FreeList( pathlist, numpaths); unwind0: null_free((void *) &oldpath); return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** End of 'cmdSetPath' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function:cmdRemovePath ** ** ** ** Description: Remove the passed value (argv[2]) from the specified ** ** variable (argv[1]). In case of switching this pro- ** ** cedure removes markers from the path, too. argv[0] ** ** specifies, if the append- or prepend-marker is af- ** ** fected ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdRemovePath( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { char *sw_marker = APP_SW_MARKER, /** arbitrary default **/ **pathlist; /** List of dirs **/ const char *delim = _colon; /** path delimiter **/ int numpaths, /** number of dirs in path **/ arg1 = 1, /** arg start **/ x; /** loop index **/ #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdRemovePath, NULL); #endif /** ** Check arguments. There should be give 3 args: ** argv[0] - prepend/append/remove-path ** ... ** argv[n-1]- varname ** argv[n] - value **/ if(argc < 3) if( OK != ErrorLogger(ERR_USAGE,LOC,argv[0],"path-variable directory", NULL)) goto unwind0; /** ** Non-persist mode? **/ if (g_flags & M_NONPERSIST) { return (TCL_OK); } /** ** Display only ... ok, let's do so! **/ if(g_flags & M_DISPLAY) { fprintf( stderr, "%s\t ", argv[ 0]); while( --argc) fprintf( stderr, "%s ", *++argv); fprintf( stderr, "\n"); goto success0; } /** ** prepend or append. The default is append. **/ if( ! strncmp( argv[0], "pre", 3)) sw_marker = PRE_SW_MARKER; /** ** Check for the delimiter option **/ if(*(argv[arg1]) == '-') { if (!strcmp(argv[arg1], "-d")) { delim = argv[arg1+1]; arg1 += 2; } else if (!strcmp(argv[arg1], "--delim")) { delim = argv[arg1+1]; arg1 += 2; } else if (!strncmp(argv[arg1], "--delim=", 8)) { delim = argv[arg1]+8; arg1++; } } /** ** For switch state3, we're looking to remove the markers. **/ if( g_flags & M_SWSTATE3) argv[arg1+1] = sw_marker; /** ** Split the path into its components so each item can be removed ** individually from the variable. **/ if( !( pathlist = SplitIntoList( interp, (char *) argv[arg1+1], &numpaths, delim))) goto unwind0; /** ** Remove each item individually **/ for( x = 0; x < numpaths; x++) if(TCL_OK != Remove_Path(interp,(char *) argv[arg1],pathlist[x], sw_marker, delim)) goto unwind1; #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdRemovePath, NULL); #endif /** ** Free resources **/ FreeList(pathlist, numpaths); success0: return( TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ unwind1: FreeList(pathlist, numpaths); unwind0: return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** End of 'cmdRemovePath' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: Remove_Path ** ** ** ** Description: This function actually does the work of removing ** ** the item from the path. It is done this way to ** ** support multiple items (often directories) ** ** separated by colons in the variable value. ** ** ** ** First Edition: 2001/08/08 ** ** ** ** Parameters: Tcl_Interp *interp According Tcl interp.** ** char *variable Variable from which ** ** to remove item ** ** char *item Item to remove ** ** char *sw_marker Switch marker ** ** const char *delim path delimiter ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ static int Remove_Path( Tcl_Interp * interp, char *variable, char *item, char *sw_marker, const char *delim ) { char *oldpath, /** current path **/ *olditem; /** item from path **/ int i, /** counter **/ found = 0, /** flag to indicate item was found **/ pcount = 0, /** count of items in path **/ addsep = 0, /** flag to add separator **/ marked = 0, /** flag path contains sw_marker **/ oldpathlen = 0; Tcl_DString _newpath; Tcl_DString *newpath = &_newpath; Tcl_DStringInit(newpath); /** ** Get the current value of the "PATH" environment variable **/ oldpath = (char *) EMGetEnv(interp, variable); if (!oldpath || !*oldpath) { null_free((void *) &oldpath); _TCLCHK(interp); goto success0; /** -------- EXIT (SUCCESS) -------> **/ } /* copy oldpath to not mess with the TCL value of env(PATH) */ if (!(oldpath = stringer(NULL,0, oldpath, NULL))) if (OK != ErrorLogger(ERR_STRING, LOC, NULL)) goto unwind0; /* get length of oldpath before it gets modified by xstrtok */ oldpathlen = strlen(oldpath); /* determine if sw_marker is in the path */ olditem = xstrtok(oldpath, delim); while (olditem) { if (!strcmp(olditem, sw_marker)) { marked = 1; } pcount++; olditem = xstrtok(NULL, delim); } /** pointer arithmetic on oldpath ** if olditem starts at terminating null string of oldpath, ** it means the last character in oldpath was ":", meaning ** the last element was the empty string. use <= to catch ** this case and process the last empty element */ for (olditem = oldpath; olditem <= oldpath + oldpathlen; olditem += strlen(olditem) + 1) { if (strcmp(olditem, item)) { /* not the droids we're looking for */ if (Tcl_DStringLength(newpath)) { if (!Tcl_DStringAppend(newpath, delim, 1)) if (OK != ErrorLogger(ERR_STRING, LOC, NULL)) goto unwind1; } if (!Tcl_DStringAppend(newpath, olditem, -1)) if (OK != ErrorLogger(ERR_STRING, LOC, NULL)) goto unwind1; } else { /* bingo! Don't add it to new path */ found++; if ((g_flags & M_SWSTATE1) && !marked) { /** ** In state1, we're actually replacing old paths with ** the markers for future appends and prepends. ** ** We only want to do this once to mark the location ** the module was formed around. **/ marked = 1; if (Tcl_DStringLength(newpath)) { if (!Tcl_DStringAppend (newpath, delim, 1)) if (OK != ErrorLogger(ERR_STRING, LOC, NULL)) goto unwind1; } if (!Tcl_DStringAppend(newpath, sw_marker, -1)) if (OK != ErrorLogger(ERR_STRING, LOC, NULL)) goto unwind1; } } } if (!found) { goto success1; } if (Tcl_DStringLength(newpath)) { /** ** Cache the set. Clear the variable from the unset table just ** in case it was previously unset. **/ store_hash_value(setenvHashTable, variable, Tcl_DStringValue(newpath)); clear_hash_value(unsetenvHashTable, variable); /** ** Store the new PATH value into the environment. **/ (void) EMSetEnv( interp, variable, Tcl_DStringValue(newpath)); _TCLCHK(interp); } else { /** ** In this case, I should go ahead and unset the variable ** from the environment because I'm removing the very last ** path. ** ** First I'm going to clear the variable from the ** setenvHashTable just in case its already been altered ** and had a significant value at the time. It's very ** possible that I'm removing the only two or three paths ** from this variable. If that's the case, then all the ** earlier paths were marked for output in this hashTable. ** ** Secondly, I actually mark the the environment variable ** to be unset when output. **/ clear_hash_value(setenvHashTable, variable); moduleUnsetenv(interp, variable); /** ** moduleUnsetenv doesn't unset the variable in the Tcl ** space because the $env variable might need to be ** used again in the modulefile for locating other ** paths. BUT, since this was a path-type environment ** variable, the user is expecting this to be empty ** after removing the only remaining path. So, I set ** the variable empty here. **/ (void) EMSetEnv( interp, variable, ""); _TCLCHK(interp); } /** ** Free what has been used and return on success **/ success1: null_free((void *)&oldpath); success0: Tcl_DStringFree(newpath); return (TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ unwind1: null_free((void *)&oldpath); unwind0: Tcl_DStringFree(newpath); return (TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** End of 'Remove_Path' **/ modules-3.2.10/cmdSetenv.c000066400000000000000000000314531210077407400153510ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdSetenv.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: The routines for setting and unsetting environment ** ** variables from within modulefiles. ** ** ** ** Exports: cmdSetEnv ** ** cmdUnsetEnv ** ** moduleSetenv ** ** moduleUnsetenv ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: c7add002bfd4245181fa551c05d0426cd79abc76 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "cmdSetenv.c"; /** File name of this module **/ #if WITH_DEBUGGING_CALLBACK static char _proc_cmdSetEnv[] = "cmdSetEnv"; static char _proc_cmdUnsetEnv[] = "cmdUnsetEnv"; #endif #if WITH_DEBUGGING_UTIL_1 static char _proc_moduleSetenv[] = "moduleSetenv"; static char _proc_moduleUnsetenv[] = "moduleUnsetenv"; #endif /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdSetEnv ** ** ** ** Description: Callback function for the 'setenv' command ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdSetEnv( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { int force; /** Force removale of variables **/ char *var; /** Varibales name **/ char *val; /** Varibales value **/ #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdSetEnv, NULL); #endif /** ** Check parameters. Usage is: [-force] variable value **/ if( argc < 3 || argc > 4) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "[-force] variable value", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Get variables name and value from the argument array **/ if( *argv[1] == '-') { if( !strncmp( argv[1], "-force", 6)) { force = 1; var = (char *) argv[2]; val = (char *) argv[3]; } else { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "[-force] variable value", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } } else { force = 0; var = (char *) argv[1]; val = (char *) argv[2]; } moduleSetenv( interp, var, val, force); /** ** This has to be done after everything has been set because the ** variables may be needed later in the modulefile. **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s\t\t ", argv[ 0]); while( --argc) fprintf( stderr, "%s ", *++argv); fprintf( stderr, "\n"); } #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdSetEnv, NULL); #endif return( TCL_OK); } /** End of 'cmdSetEnv' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: moduleSetenv ** ** ** ** Description: Set or unset environment variables ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp According Tcl interp.** ** char *variable Name of the variable ** ** char *value Value to be set ** ** int force Force removal ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int moduleSetenv( Tcl_Interp *interp, char *variable, char *value, int force) { char *oldval; /** Old value of 'variable' **/ #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_moduleSetenv, NULL); #endif oldval = EMGetEnv( interp, variable); if (!oldval || !*oldval) null_free((void *)&oldval); /** ** Check to see if variable is already set correctly... **/ if( !(g_flags & (M_REMOVE|M_DISPLAY|M_SWITCH|M_NONPERSIST)) && oldval) { if( !strcmp( value, oldval)) { return( TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ } } /** ** If I'm in SWSTATE1, I'm removing stuff from the old modulefile, so ** I'll just mark the variables that were used with the SWSTATE1 flag and ** return. ** ** When I come back through in SWSTATE2, I'm setting the variables that ** are in the new modulefile. So, I'll keep track of these by marking ** them as touched by SWSTATE2 and then actually setting their values in ** the environment down below. ** ** Finally, in SWSTATE3, I'll check to see if the variables in the old ** modulefiles that have been marked are still marked as SWSTATE1. If ** they are still the same, then I'll just unset them and return. ** ** And, if I'm not doing any switching, then just unset the variable if ** I'm in remove mode. **/ if( g_flags & M_SWSTATE1) { set_marked_entry( markVariableHashTable, variable, M_SWSTATE1); return( TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ } else if( g_flags & M_SWSTATE2) { set_marked_entry( markVariableHashTable, variable, M_SWSTATE2); } else if( g_flags & M_SWSTATE3) { intptr_t marked_val; marked_val = chk_marked_entry( markVariableHashTable, variable); if( marked_val) { if( marked_val == M_SWSTATE1) return( moduleUnsetenv(interp, variable)); /** -------> **/ else return( TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ } } else if( (g_flags & M_REMOVE) && !force) { return( moduleUnsetenv( interp, variable)); /** -------> **/ } /** ** Keep track of our changes just in case we have to bail out and restore ** the environment. **/ if( !(g_flags & (M_NONPERSIST | M_DISPLAY | M_WHATIS | M_HELP))) { store_hash_value( setenvHashTable, variable, value); clear_hash_value( unsetenvHashTable, variable); } /** ** Store the value into the environment **/ EMSetEnv( interp, variable, value); #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_END, LOC, _proc_moduleSetenv, NULL); #endif return( TCL_OK); } /** End of 'moduleSetenv' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdUnsetEnv ** ** ** ** Description: Callback function for the 'unset' command ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdUnsetEnv( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { /** ** Parameter check. The name of the variable has to be specified **/ #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdUnsetEnv, NULL); #endif if( argc < 2 || argc > 3) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "variable [value]", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Non-persist mode? **/ if (g_flags & M_NONPERSIST) { return (TCL_OK); } /** ** Unset the variable or just display what to do ... **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s\t ", argv[ 0]); while( --argc) fprintf( stderr, "%s ", *++argv); fprintf( stderr, "\n"); } else if( g_flags & M_REMOVE && argc == 3) { int save_flags = g_flags; /** allow an optional 3rd argument to set the env.var. to on removal **/ g_flags = (g_flags & ~M_REMOVE) | M_LOAD; moduleSetenv( interp, (char *) argv[1], (char *) argv[2], 0); g_flags = save_flags; } else { moduleUnsetenv( interp, (char *) argv[1]); } /** ** Return on success **/ #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdUnsetEnv, NULL); #endif return( TCL_OK); } /** End of 'cmdUnsetEnv' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: moduleUnsetenv ** ** ** ** Description: Unset environment variables ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp According Tcl interp.** ** char *variable Name of the variable ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int moduleUnsetenv( Tcl_Interp *interp, char *variable) { #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_moduleUnsetenv, NULL); #endif /** ** Don't unset the variable in Tcl Space. ** If module writer *REALLY* wants it gone, use $env **/ if( !(g_flags & (M_NONPERSIST | M_DISPLAY | M_WHATIS | M_HELP))) { store_hash_value( unsetenvHashTable, variable, NULL); clear_hash_value( setenvHashTable, variable); } #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_END, LOC, _proc_moduleUnsetenv, NULL); #endif return( TCL_OK); } /** end of 'moduleUnsetenv' **/ modules-3.2.10/cmdTrace.c000066400000000000000000000475251210077407400151520ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdTrace.c ** ** First Edition: 1995/12/26 ** ** ** ** Authors: Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: The Tcl module-trace routine which provides a con- ** ** trolling interface to the modulecmd tracing feature ** ** ** ** Exports: cmdModuleTrace ** ** GetTraceSel ** ** CheckTracing ** ** CheckTracingList ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 2564a650f50da30bb8c1cd18bab6393e086b56f2 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ typedef struct _mod_trace { char **re_ptr; /** Pointer to the reqular expr. **/ /** which identifies the command **/ char const *cmd; /** The spelled command for printing **/ char *tracing; /** The tracing setup **/ char alloc; /** Alloc flag **/ } ModTrace; /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ #ifdef WITH_TRACE_LOAD # define MOD_TR_LOAD WITH_TRACE_LOAD #else # define MOD_TR_LOAD _all_off #endif #ifdef WITH_TRACE_UNLOAD # define MOD_TR_UNLOAD WITH_TRACE_UNLOAD #else # define MOD_TR_UNLOAD _all_off #endif #ifdef WITH_TRACE_SWITCH # define MOD_TR_SWITCH WITH_TRACE_SWITCH #else # define MOD_TR_SWITCH _all_off #endif #ifdef WITH_TRACE_DISP # define MOD_TR_DISP WITH_TRACE_DISP #else # define MOD_TR_DISP _all_off #endif #ifdef WITH_TRACE_LIST # define MOD_TR_LIST WITH_TRACE_LIST #else # define MOD_TR_LIST _all_off #endif #ifdef WITH_TRACE_AVAIL # define MOD_TR_AVAIL WITH_TRACE_AVAIL #else # define MOD_TR_AVAIL _all_off #endif #ifdef WITH_TRACE_HELP # define MOD_TR_HELP WITH_TRACE_HELP #else # define MOD_TR_HELP _all_off #endif #ifdef WITH_TRACE_INIT # define MOD_TR_INIT WITH_TRACE_INIT #else # define MOD_TR_INIT _all_off #endif #ifdef WITH_TRACE_USE # define MOD_TR_USE WITH_TRACE_USE #else # define MOD_TR_USE _all_off #endif #ifdef WITH_TRACE_UNUSE # define MOD_TR_UNUSE WITH_TRACE_UNUSE #else # define MOD_TR_UNUSE _all_off #endif #ifdef WITH_TRACE_UPDATE # define MOD_TR_UPDATE WITH_TRACE_UPDATE #else # define MOD_TR_UPDATE _all_off #endif #ifdef WITH_TRACE_PURGE # define MOD_TR_PURGE WITH_TRACE_PURGE #else # define MOD_TR_PURGE _all_off #endif #ifdef WITH_TRACE_CLEAR # define MOD_TR_CLEAR WITH_TRACE_CLEAR #else # define MOD_TR_CLEAR _all_off #endif #ifdef WITH_TRACE_APROPOS # define MOD_TR_APROPOS WITH_TRACE_APROPOS #else # define MOD_TR_APROPOS _all_off #endif #ifdef WITH_TRACE_REFRESH # define MOD_TR_REFRESH WITH_TRACE_REFRESH #else # define MOD_TR_REFRESH _all_off #endif #ifdef WITH_TRACE_WHATIS # define MOD_TR_WHATIS WITH_TRACE_WHATIS #else # define MOD_TR_WHATIS _all_off #endif /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "cmdTrace.c"; /** File name of this module **/ #if WITH_DEBUGGING_CALLBACK static char _proc_cmdModuleTrace[] = "cmdModuleTrace"; #endif /** ** Tracing strings ** contain a colon separated list of 'switch on/switch off' selector for ** module files. Each selector beginning with a '+' means 'tracing on', '-' ** means 'tracing off'. ** The +/- switch is followed by the name of the modulefile to which it ** belongs. All valif TCL regexps may be specified here. **/ static char _all[] = ".*"; static char _all_on[] = "+.*"; static char _all_off[] = "-.*"; /** ** The tracing selection table **/ static ModTrace TraceSelect[] = { { &addRE, "load", MOD_TR_LOAD, 0 }, /** 0 **/ { &rmRE, "unload", MOD_TR_UNLOAD, 0 }, /** 1 **/ { &swRE, "switch", MOD_TR_SWITCH, 0 }, /** 2 **/ { &dispRE, "display", MOD_TR_DISP, 0 }, /** 3 **/ { &listRE, "list", MOD_TR_LIST, 0 }, /** 4 **/ { &availRE, "avail", MOD_TR_AVAIL, 0 }, /** 5 **/ { &helpRE, "help", MOD_TR_HELP, 0 }, /** 6 **/ { &initRE, "init", MOD_TR_INIT, 0 }, /** 7 **/ { &useRE, "use", MOD_TR_USE, 0 }, /** 8 **/ { &unuseRE, "unuse", MOD_TR_UNUSE, 0 }, /** 9 **/ { &updateRE, "update", MOD_TR_UPDATE, 0 }, /** 10 **/ { &purgeRE, "purge", MOD_TR_PURGE, 0 }, /** 11 **/ { &clearRE, "clear", MOD_TR_CLEAR, 0 }, /** 12 **/ { &whatisRE, "whatis", MOD_TR_WHATIS, 0 }, /** 13 **/ { &aproposRE, "apropos", MOD_TR_APROPOS, 0 }, /** 14 **/ { &refreshRE, "refresh", MOD_TR_REFRESH, 0 } /** 15 **/ }; /** ************************************************************************ **/ /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ static int GetTraceTable( Tcl_Interp *interp, char *cmd, int num); static int ChangeTraceSel( Tcl_Interp *interp, char *cmd_tab, int cmd_tab_size, char on_off, char *module_pat); static int CheckTracingPat( Tcl_Interp *interp, char *pattern, char *modulefile); /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdModuleTrace ** ** ** ** Description: Callback function for 'trace' ** ** ** ** First Edition: 1995/12/26 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: TraceSelect List containing all tracing settings ** ** g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdModuleTrace( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { char on_off = '+'; /** The first argument **/ char **args; /** Argument pointer for scanning **/ int i, k; /** Loop counter **/ int cmd_tab_size; char *cmd_table; /** Command table **/ int ret = TCL_OK; #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdModuleTrace, NULL); #endif /** ** Whatis mode? **/ if( g_flags & (M_WHATIS | M_HELP)) return( TCL_OK); /** ------- EXIT PROCEDURE -------> **/ /** ** Parameter check **/ if( argc < 2) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "on|off", "[cmd [cmd ...]]", "[ -module module [module ...]]", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** On or off? **/ if( !strcmp( argv[ 1], "on")) on_off = '+'; else if( !strcmp( argv[ 1], "off")) on_off = '-'; else { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "on|off", "[cmd [cmd ...]]", "[ -module module [module ...]]", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Non-persist mode? **/ if (g_flags & M_NONPERSIST) { return (TCL_OK); } /** ** Display mode? **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s\t ", argv[ 0]); for( i=1; i **/ } /** ** We need a table of module command involved in this trace selection. ** Allocate one and initialize it. **/ cmd_tab_size = sizeof( TraceSelect) / sizeof( TraceSelect[ 0]); if((char *) NULL == (cmd_table = (char *) module_malloc( cmd_tab_size))) return((OK == ErrorLogger( ERR_ALLOC, LOC, NULL)) ? TCL_OK : TCL_ERROR); /** ** Scan all commands specified as options. The last option to be scanned ** is either the real last one, or the '-module' one **/ args = (char **) argv + 2; i = argc - 2; memset( cmd_table, !i, cmd_tab_size); while( i--) { char *tmp = *args++; /** ** Check for '-module' **/ if( !strncmp( tmp, "-module", strlen( tmp))) break; /** ** This should be a module command. ** Check it against the TraceSelect table **/ if( -1 != (k = GetTraceTable(interp, tmp, cmd_tab_size))) { cmd_table[ k] = 1; } else { if( OK != ErrorLogger( ERR_COMMAND, LOC, tmp, NULL)) { null_free((void *) &cmd_table); return( TCL_ERROR); } } } /** while( i--) **/ /** ** Now scan all Modulefiles concerned in the current command ** If we ran to the end of the argument list (i==0), ALL files are ** concerned in this ... **/ if( 0 >= i) { ret = ChangeTraceSel(interp, cmd_table, cmd_tab_size, on_off, _all); } else { while( i-- && TCL_OK == ret) ret = ChangeTraceSel(interp, cmd_table, cmd_tab_size, on_off, *args++); } /** ** Cleanup finally and return **/ null_free((void *) &cmd_table); #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdModuleTrace, NULL); #endif return( ret); } /** End of 'cmdModuleTrace' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: GetTraceTable ** ** ** ** Description: Returns the TraceSelect index for the passed module ** ** subcommand ** ** ** ** First Edition: 1995/12/26 ** ** ** ** Parameters: char *cmd Subcommand to be checked ** ** int num Number of commands to be chk ** ** ** ** Result: int >= 0 Successful completion ** ** -1 Any error ** ** ** ** ************************************************************************ ** ++++*/ static int GetTraceTable(Tcl_Interp *interp, char *cmd, int num) { int k; for( k=0; k < num; k++) { if( Tcl_RegExpMatch(interp, cmd, *(TraceSelect[k].re_ptr))) return( k); /** ----------- Got it ------------> **/ } /** for( k) **/ /** ** Not found .. **/ return( -1); } /** End of 'GetTraceTable' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: GetTraceSel ** ** ** ** Description: Retrieve the trace selection pattern for the passed ** ** module command ** ** ** ** First Edition: 1995/12/26 ** ** ** ** Parameters: char *cmd Subcommand to be checked ** ** ** ** Result: char * NULL Module subcommand not found ** ** Otherwise Assigned trace pattern ** ** ** ** ************************************************************************ ** ++++*/ char *GetTraceSel( Tcl_Interp *interp, char *cmd) { int k; if( -1 == (k = GetTraceTable(interp, cmd, (sizeof( TraceSelect) / sizeof( TraceSelect[ 0]) )))) return((char *) NULL); return( TraceSelect[ k].tracing); } /** End of 'GetTraceSel' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ChangeTraceSel ** ** ** ** Description: Change the trace selection for all commands speci- ** ** fied in the passed 'cmd_table'. The passed module- ** ** name has to be changed according 'on_off' ** ** ** ** First Edition: 1995/12/26 ** ** ** ** Parameters: char *cmd_table Boolean array indicating all ** ** commands in the TraceSelect ** ** table to be changed ** ** int cmd_tab_size Size of this array ** ** char on_off '+' switch tracing on ** ** '-' switch tracing off ** ** char *module_pat Pattern for the affected ** ** module files ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** ************************************************************************ ** ++++*/ static int ChangeTraceSel( Tcl_Interp *interp, char *cmd_table, int cmd_tab_size, char on_off, char *module_pat) { char *pattern, *s, *t, *tmp; int len = strlen( module_pat); int i; int ret = TCL_OK; /** ** Need a buffer for to build the complete pattern **/ if((char *) NULL == (pattern = (char *) module_malloc(len + 2))) { ErrorLogger( ERR_ALLOC, LOC, NULL); return( TCL_ERROR); } /** ** Check if this is the ALL pattern. If it is, replace all affected ** entries with '_all_on' or '_all_off' **/ if( !strcmp( module_pat, _all)) { for( i=0; i < cmd_tab_size; i++) { if( cmd_table[ i]) { if( TraceSelect[ i].alloc) null_free((void *) &(TraceSelect[ i].tracing)); TraceSelect[ i].alloc = 0; TraceSelect[ i].tracing = ('+' == on_off) ? _all_on : _all_off; } } } else { /** if( ALL pattern) **/ /** ** Check the pattern for colons ... **/ if( strchr( module_pat, ':')) if( OK != ErrorLogger( ERR_COLON, LOC, module_pat, NULL)) ret = TCL_ERROR; if( TCL_OK == ret) { /** ** Build the complete pattern **/ *pattern = on_off; strcpy( pattern + 1, module_pat); len += 1; /** ** Loop for all entries to be changed **/ for( i=0; i < cmd_tab_size; i++) { if( cmd_table[ i]) { /** ** allocate a buffer for the new pattern **/ if((char *) NULL == (tmp = (char *) module_malloc(len + 2 + strlen( TraceSelect[ i].tracing)))) { if( OK == ErrorLogger( ERR_ALLOC, LOC, NULL)) { continue; } else { ret = TCL_ERROR; break; } } /** ** Copy the new pattern to the buffer at first **/ strcpy( tmp, pattern); t = tmp + len; /** ** Tokenize the old pattern and remove duplicates **/ for( s = strtok( TraceSelect[ i].tracing, ":"); s; s = strtok( NULL, ":") ) { if( strcmp( (s+1), module_pat)) { *t++ = ':'; while( *t++ = *s++); t--; } } /** for **/ /** ** Finally check if we have to dealloc and set up the ** new pattern **/ if( TraceSelect[ i].alloc) null_free((void *) &(TraceSelect[ i].tracing)); TraceSelect[ i].tracing = tmp; TraceSelect[ i].alloc = 1; } /** if **/ } /** for **/ } /** if( ret) **/ } /** if( ALL pattern) **/ /** ** Free what has been allocated an return **/ null_free((void *) &pattern); return( ret); } /** End of 'ChangeTraceSel' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: CheckTracing ** ** ** ** Description: Check wheter thracing is turned on for the passed ** ** command and modulefile ** ** ** ** First Edition: 1995/12/26 ** ** ** ** Parameters: char *cmd Subcommand to be checked ** ** char *modulefile Modulefile to be checked ** ** ** ** Result: int 0 No tracing ** ** 1 Tracing enabled ** ** ** ** ************************************************************************ ** ++++*/ int CheckTracing( Tcl_Interp *interp, char *cmd, char *modulefile) { int k; /** ** Get the TraceSelect table index **/ if( -1 == (k = GetTraceTable(interp, cmd, (sizeof( TraceSelect) / sizeof( TraceSelect[0]) )))) { ErrorLogger( ERR_COMMAND, LOC, cmd, NULL); return( 0); } /** ** Now check this guy ... **/ return( CheckTracingPat(interp, TraceSelect[ k].tracing, modulefile)); } /** End of 'CheckTracing' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: CheckTracingPat ** ** ** ** Description: Check the passed pattern if it enables tracing for ** ** the passed module file ** ** ** ** First Edition: 1995/12/26 ** ** ** ** Parameters: char *pattern Pattern to be checked ** ** char *modulefile Modulefile to be checked ** ** ** ** Result: int 0 No tracing ** ** 1 Tracing enabled ** ** ** ** ************************************************************************ ** ++++*/ static int CheckTracingPat( Tcl_Interp *interp, char *pattern, char *modulefile) { char *s; int ret; /** ** Tokenize the pattern and check if it matches ... **/ for( s = strtok( pattern, ":"); s; s = strtok( NULL, ":") ) { ret = ('+' == *s++); if( Tcl_RegExpMatch(interp, modulefile, s)) return( ret); } /** for **/ /** ** No pattern matched the module file name ... **/ return( 0); } /** End of 'CheckTracingPat' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: CheckTracingList ** ** ** ** Description: Check wheter tracing is turned on for the passed ** ** command and at least one of the passed modulefiles ** ** ** ** First Edition: 1995/12/26 ** ** ** ** Parameters: char *cmd Subcommand to be checked ** ** int count Number of passed modulefiles ** ** char **modules Modulefiles to be checked ** ** ** ** Result: int 0 No tracing ** ** 1 Tracing enabled ** ** ** ** ************************************************************************ ** ++++*/ int CheckTracingList( Tcl_Interp *interp, char *cmd, int count, char **modules) { int k; /** ** Get the TraceSelect table index **/ if( -1 == (k = GetTraceTable(interp, cmd, (sizeof( TraceSelect) / sizeof( TraceSelect[0]) )))) { ErrorLogger( ERR_COMMAND, LOC, cmd, NULL); return( 0); } /** ** Now check whether one of them requires tracing **/ while( count--) if( CheckTracingPat(interp, TraceSelect[ k].tracing, *modules++)) return( 1); return( 0); } /** End of 'CheckTracingList' **/ modules-3.2.10/cmdUlvl.c000066400000000000000000000147031210077407400150260ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdUlvl.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: The Tcl module-user routine which changes the cur- ** ** rent user level ** ** ** ** Exports: cmdModuleUser ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 258acbcbc68eded9ae20ffe9239be82e30c3e49f $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "cmdUlvl.c"; /** File name of this module **/ #if WITH_DEBUGGING_CALLBACK static char _proc_cmdModuleUser[] = "cmdModuleUser"; #endif #if WITH_DEBUGGING_CALLBACK_1 static char _proc_cmdModuleUser_sub[] = "cmdModuleUser_sub"; #endif /** ** names for the user level **/ static char _str_ul_novice[] = "novice"; static char _str_ul_advanced[] = "advanced"; static char _str_ul_expert[] = "expert"; /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdModuleUser ** ** ** ** Description: Callback function for 'info' ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdModuleUser( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdModuleUser, NULL); #endif /** ** Whatis mode? **/ if( g_flags & (M_WHATIS | M_HELP)) return( TCL_OK); /** ------- EXIT PROCEDURE -------> **/ /** ** Parameter check **/ if( argc < 2) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "level ", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Non-persist mode? **/ if (g_flags & M_NONPERSIST) { return (TCL_OK); } /** ** Display mode? **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s\t ", argv[ 0]); while( --argc) fprintf( stderr, "%s ", *++argv); fprintf( stderr, "\n"); return( TCL_OK); /** ------- EXIT PROCEDURE -------> **/ } /** ** Change the user level **/ return( cmdModuleUser_sub( (char *) argv[ 1])); } /** End of 'cmdModuleUser' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdModuleUser_sub ** ** ** ** Description: Check the user level passed as argument and set up ** ** the global user level flag ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: char *user_level User level string to be chk. ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: sw_userlvl Contains the binary coded userlevel ** ** ** ** ************************************************************************ ** ++++*/ int cmdModuleUser_sub( char *user_level) { char *s; int len_arg; #if WITH_DEBUGGING_CALLBACK_1 ErrorLogger( NO_ERR_START, LOC, _proc_cmdModuleUser_sub, NULL); #endif len_arg = strlen( user_level); s = user_level; while( s && *s) { *s = tolower( *s); s++; } if( !strncmp( user_level, _str_ul_novice, len_arg)) { sw_userlvl = UL_NOVICE; } else if( !strncmp( user_level, _str_ul_advanced, len_arg)) { sw_userlvl = UL_ADVANCED; } else if( !strncmp( user_level, _str_ul_expert, len_arg)) { sw_userlvl = UL_EXPERT; } else { if( OK != ErrorLogger( ERR_USERLVL, LOC, user_level, NULL)) return( TCL_ERROR); /** ---- EXIT (FAILURE) ---> **/ } /** ** Success **/ #if WITH_DEBUGGING_CALLBACK_1 ErrorLogger( NO_ERR_END, LOC, _proc_cmdModuleUser_sub, NULL); #endif return( TCL_OK); } /** End of 'cmdModuleUser_sub' **/ modules-3.2.10/cmdUname.c000066400000000000000000000174041210077407400151520ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdUname.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: Provides fast aquisition of the information available** ** via uname. This shows a 10x improvement over having ** ** to exec the actual uname program from within a ** ** modulefile. ** ** ** ** Exports: cmdUname ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 986c78c90605e7e69e905b4bdd447fe724954a3d $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" #ifdef HAVE_UNAME #include #endif /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ #ifndef HAVE_UNAME typedef struct utsname { char sysname[ NAMELEN]; /** System name **/ char nodename[ NAMELEN]; /** Node name **/ char release[ NAMELEN]; /** OS Release **/ char version[ NAMELEN]; /** OS Version **/ char machine[ NAMELEN]; /** Machine type **/ } UTS_NAME; #endif /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ #define NAMELEN (8 + 1) /** 8 chars + 1 terminator **/ #define DOMAINLEN (64 + 1) /** 8 chars + 1 terminator **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "cmdUname.c"; /** File name of this module **/ #if WITH_DEBUGGING_CALLBACK static char _proc_cmdUname[] = "cmdUname"; #endif static struct utsname namestruct = { UNAME_SYSNAME, UNAME_NODENAME, UNAME_RELEASE, UNAME_VERSION, UNAME_MACHINE }; static char domain[ DOMAINLEN] = UNAME_DOMAIN; static int namestruct_init = 0; /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdUname ** ** ** ** Description: Callback function for the commands 'sysname', ** ** 'nodename', 'release', 'version' and 'machine' ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdUname( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { int length; #ifdef PHOSTNAME #ifndef HAVE_GETHOSTNAME FILE* hname; #endif #endif #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdUname, NULL); #endif /** ** Parameter check. One parameter should be given providing a selector ** do differ between: **/ if( argc != 2) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "member", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } #ifdef HAVE_UNAME /** ** Proceed the system call **/ if( !namestruct_init && uname( &namestruct) < 0) { if( OK != ErrorLogger( ERR_UNAME, LOC, NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } #else /* not HAVE_UNAME */ /** ** If we do not have the uname system call, fixed values defined ** at compile time will be returned. The only differenc is the ** nodename, which may be seeked for using 'gethostname' or the ** PHOSTNAME file. **/ #ifdef HAVE_GETHOSTNAME if( -1 == gethostname( namestruct.nodename, NAMELEN)) if( OK != ErrorLogger( ERR_GETHOSTNAME, LOC, NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ #else /* not HAVE_GETHOSTNAME */ #ifdef PHOSTNAME if( NULL == (hname = popen( PHOSTNAME, "r"))) { if( OK != ErrorLogger( ERR_POPEN, LOC, PHOSTNAME, "reading", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } fgets( namestruct.nodename, NAMELEN, hname); namestruct.nodename[ strlen( namestruct.nodename)-1] = '\0'; if( -1 == pclose( hname)) if( OK != ErrorLogger( ERR_PCLOSE, LOC, PHOSTNAME, NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ #endif /* not PHOSTNAME */ #endif /* not HAVE_GETHOSTNAME */ #endif /* not HAVE_UNAME */ /** ** Set up the domain name **/ #ifdef HAVE_GETDOMAINNAME if( !namestruct_init) if( -1 == getdomainname( domain, DOMAINLEN)) if( OK != ErrorLogger( ERR_GETDOMAINNAME, LOC, NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ #endif /** ** Now the name structure surely IS initialized **/ namestruct_init = 1; /** ** Return the selected value **/ length = strlen( argv[1]); if( !strncmp( argv[1], "sysname", length)) { Tcl_SetResult( interp, namestruct.sysname, TCL_VOLATILE); } else if( !strncmp( argv[1], "nodename", length)) { Tcl_SetResult( interp, namestruct.nodename, TCL_VOLATILE); } else if( !strncmp( argv[1], "release", length)) { Tcl_SetResult( interp, namestruct.release, TCL_VOLATILE); } else if( !strncmp( argv[1], "version", length)) { Tcl_SetResult( interp, namestruct.version, TCL_VOLATILE); } else if( !strncmp( argv[1], "machine", length)) { Tcl_SetResult( interp, namestruct.machine, TCL_VOLATILE); } else if( !strncmp( argv[1], "domain", length)) { Tcl_SetResult( interp, domain, TCL_VOLATILE); } else { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "{sysname|nodename|" "release|version|machine|domain}", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdUname, NULL); #endif return( TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ } /** End of 'cmdUname' **/ modules-3.2.10/cmdVerbose.c000066400000000000000000000115121210077407400155040ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdVerbose.c ** ** First Edition: 1995/12/31 ** ** ** ** Authors: Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: The Tcl module-verbose routine allows switchin ver- ** ** bosity on and off during module file execution ** ** ** ** Exports: cmdModuleVerbose ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 3c6341f3500413e4b144c24a5275b1a8076fe322 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "cmdVerbose.c"; /** File name of this module **/ #if WITH_DEBUGGING_CALLBACK static char _proc_cmdModuleVerbose[] = "cmdModuleVerbose"; #endif /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdModuleVerbose ** ** ** ** Description: Callback function for 'verbose' ** ** ** ** First Edition: 1995/12/31 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: sw_verbose The verbose level selector ** ** g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdModuleVerbose( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdModuleVerbose, NULL); #endif char **argptr = (char **) argv; /** ** Whatis mode? **/ if( g_flags & (M_WHATIS | M_HELP)) return( TCL_OK); /** ------- EXIT PROCEDURE -------> **/ /** ** Parameter check **/ if( argc < 2) { if( OK != ErrorLogger( ERR_USAGE, LOC, argptr[0], " on|off|fmt [args]", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Display mode? **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s ", argptr[ 0]); while( --argc) fprintf( stderr, "%s ", *++argptr); fprintf( stderr, "\n"); return( TCL_OK); /** ------- EXIT PROCEDURE -------> **/ } /** ** on or off **/ if( !strcmp( argptr[1], "on")) sw_verbose = 1; else if( !strcmp( argptr[1], "off")) sw_verbose = 0; else Module_Verbosity( --argc, ++argptr); #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdModuleVerbose, NULL); #endif return( TCL_OK); } /** End of 'cmdModuleVerbose' **/ modules-3.2.10/cmdVersion.c000066400000000000000000001104361210077407400155310ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdVersion.c ** ** First Edition: 1995/12/28 ** ** ** ** Authors: Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: The Tcl module-version routine which provides the ** ** definition of symbolic version names and the module- ** ** alias command providing the definition of module and ** ** version aliases ** ** ** ** Exports: cmdModuleVersion ** ** cmdModuleAlias ** ** CleanupVersion ** ** AliasLookup ** ** ExpandVersions ** ** ** ** Notes: This module defines the callback functions for the defi- ** ** nition of symbolic module names and module aliases. The ** ** syntax of the according commands is defined as: ** ** ** ** Module-Versions: ** ** module-version / [ ... ] ** ** module-version / [ ... ] ** ** module-version [ ... ] ** ** module-version [ ... ] ** ** ** ** Module-Alias: ** ** module-alias / ** ** module-alias / ** ** module-alias ** ** module-alias ** ** ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 438a5547e46b20965c44e72390007b5e9ad8e996 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** ************************************************************************ **/ /** **/ /** The whole thing is handled in memory. The structure is build of module **/ /** and name records. There are 3 types of name records: version, name **/ /** and alias. **/ /** **/ /** | | **/ /** +---+---+<-------------------------------+ +---+---+ **/ /** | module| ------------------------+ | | alias | **/ /** +---+---+ --------+ | | +-------+ **/ /** | ^ +----+----+ | | | **/ /** | +--- | version | +--+--+ | +---+---+ **/ /** | | +----+----+ | name|---+ <-----| alias | **/ /** | | | +--+--+ | +---+---+ **/ /** | | +----+----+ | | | **/ /** | +--- | version |------>+--+--+ | +---+---+ **/ /** | | +----+----+<-+--- | name|---+ | alias | **/ /** | | | | +- +--+--+ | +---+---+ **/ /** | | +----+----+ | | | | | **/ /** | +--- | version | | | +--+--+ | +---+---+ **/ /** | | +----+----+ | | | name|---+ <-----| alias | **/ /** | | | | | +--+--+ | +---+---+ **/ /** | | | | | | **/ /** | | +->+--+--+ | +---+---+ **/ /** +---+---+ +--- | name|---+ | alias | **/ /** | module| +--+--+ | +---+---+ **/ /** +---+---+ | | | **/ /** | **/ /** alphabetic ordered alphabtic ordered **/ /** list of names depending list of aliases **/ /** on a single module file **/ /** **/ /** Each module name points to a list of symbolic names and versions. **/ /** The versions themselves can be symbolic names and therefore are of the **/ /** same record type as the names. **/ /** The name and the version list are alphabetically sorted (even the **/ /** module list is). A version record points to a related name record **/ /** containing a symbolic name for the version. Starting at this record, **/ /** the name records build a queue of symbolic names for the version. **/ /** Both, the version and the name record, do have a backward pointer to **/ /** the module record. **/ /** **/ /** The alias list builds a alphabetic ordered list of defined aliases. **/ /** Each alias record points to the related name record. **/ /** **/ /** ************************************************************************ **/ typedef struct _mod_module { struct _mod_module *next; /** alphabetic queue **/ struct _mod_name *version; /** version queue **/ struct _mod_name *name; /** name queue **/ char *module; /** the name itself **/ } ModModule; typedef struct _mod_name { struct _mod_name *next; /** alphabetic queue **/ struct _mod_name *ptr; /** logical next **/ struct _mod_name *version; /** backwards version pointer **/ struct _mod_module *module; /** related module **/ char *name; /** the name itself **/ } ModName; /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ #define HISTTAB 100 /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "cmdVersion.c"; /** File name of this module **/ #if WITH_DEBUGGING_CALLBACK static char _proc_cmdModuleVersion[] = "cmdModuleVersion"; static char _proc_cmdModuleAlias[] = "cmdModuleAlias"; #endif #if WITH_DEBUGGING_UTIL_2 static char _proc_CleanupVersion[] = "CleanupVersion"; #endif #if WITH_DEBUGGING_UTIL_1 static char _proc_AddModule[] = "AddModule"; static char _proc_FindModule[] = "FindModule"; static char _proc_AddName[] = "AddName"; static char _proc_FindName[] = "FindName"; #endif /** ** The module and aliases list **/ static ModModule *modlist = (ModModule *) NULL; static ModName *aliaslist = (ModName *) NULL; /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ static void CleanupVersionSub( ModModule *ptr); static void CleanupName( ModName *ptr); static ModModule *AddModule( char *name); static ModModule *FindModule( char *name, ModModule **prev); static ModName *AddName( char *name, ModName **start, ModModule *module); static ModName *FindName( char *name, ModName *start, ModName **prev); static char *CheckModuleVersion( char *name); static char *scan_versions( char *buffer, char *base, ModName *ptr, ModModule *modptr); /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdModuleVersion ** ** ** ** Description: Callback function for 'version' ** ** ** ** First Edition: 1995/12/28 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: modlist List containing all version names ** ** g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdModuleVersion( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { char *version, *module; ModModule *modptr; ModName *versptr, *nameptr, *tmp, *ptr; int i; #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdModuleVersion, NULL); #endif /** ** Whatis mode? **/ if( g_flags & M_WHATIS) return( TCL_OK); /** ------- EXIT PROCEDURE -------> **/ /** ** Parameter check **/ if( argc < 3) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], " modulename ", " symbolic-version [symbolic-version ...] ", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } if((char *) NULL == (module = CheckModuleVersion( (char *) argv[1]))) { ErrorLogger( ERR_BADMODNAM, LOC, argv[1], NULL); return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Display mode? **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s\t ", argv[ 0]); for( i=1; i **/ } *version++ = '\0'; /** ** Now we have a module and a version. ** Check wheter it exists (cond. create them). Check both, the version ** and the name queue in order to locate the desired version ... **/ if((ModModule *) NULL == (modptr = AddModule( module))) { ErrorLogger( ERR_BADMODNAM, LOC, argv[1], NULL); return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } if((ModName *) NULL == (ptr = FindName( version, modptr->version, &tmp))) { if((ModName *) NULL == (ptr = FindName( version, modptr->name, &tmp))) versptr = AddName( version, &modptr->version, modptr); else versptr = ptr->version; } else versptr = ptr; /** ** Check all symbolic names now and allocate a name record for them **/ for( i=2; iname, &tmp)) { if( OK != ErrorLogger( ERR_DUP_SYMVERS, LOC, argv[i], NULL)) break; else continue; } if((ModName *)NULL == (nameptr = AddName((char *)argv[ i],&modptr->name, modptr))) { if( OK != ErrorLogger( ERR_INTERAL, LOC, NULL)) break; else continue; } /** ** Concat the new element at the beginning of the name queue ... **/ nameptr->ptr = versptr->ptr; versptr->ptr = nameptr; nameptr->version = versptr; } #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdModuleVersion, NULL); #endif return( TCL_OK); } /** End of 'cmdModuleVersion' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: ExpandVersions ** ** ** ** Description: Callback function for 'version' ** ** ** ** First Edition: 1995/12/28 ** ** ** ** Parameters: char *name Name to be expanded ** ** ** ** Result: char* NULL No symbols found ** ** Otherwise Pointer to the list string ** ** ** ** ************************************************************************ ** ++++*/ char *ExpandVersions( char *name) { char *version, *module, *s; static char buffer[ BUFSIZ]; ModModule *modptr, *tmp1; ModName *ptr, *tmp2; #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdModuleVersion, NULL); #endif /** ** Parameter check **/ if((char *) NULL == (module = CheckModuleVersion( name))) return((char *) NULL ); /** -------- EXIT (FAILURE) -------> **/ if((char *) NULL == (version = strrchr( module, '/'))) { if( OK != ErrorLogger( ERR_INTERAL, LOC, NULL)) return((char *) NULL ); /** -------- EXIT (FAILURE) -------> **/ } *version++ = '\0'; /** ** Now we have a module and a version. ** Check wheter it exists **/ if((ModModule *) NULL == (modptr = FindModule( module, &tmp1))) return((char *) NULL ); /** -------- EXIT (FAILURE) -------> **/ if((ModName *) NULL == (ptr = FindName( version, modptr->version, &tmp2))) { if((ModName *) NULL == (ptr = FindName( version, modptr->name, &tmp2))) return((char *) NULL ); /** -------- EXIT (FAILURE) -------> **/ ptr = ptr->version; } if( !ptr->ptr) return((char *) NULL ); /** -------- EXIT (FAILURE) -------> **/ /** ** Now scan in all the symbolic version names **/ *buffer = '\0'; if( s = scan_versions( buffer, buffer, ptr->ptr, modptr)) *--s = '\0'; /** remove trailing ':' **/ #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdModuleVersion, NULL); #endif return( buffer); } /** End of 'ExpandVersions' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: scan_versions ** ** ** ** Description: Scan all symbolic versions pointed to be the passed ** ** ModName pointer and print them as a list into the ** ** passed buffer. ** ** ** ** First Edition: 1995/12/28 ** ** ** ** Parameters: char *buffer Buffer for printing in ** ** ModName *ptr Name structure pointer ** ** ModModule *modptr Assigned module name ** ** ** ** Result: char* NULL Nothing printed into the ** ** buffer ** ** Otherwise Pointer to the end of the ** ** string in the buffer ** ** ** ** ************************************************************************ ** ++++*/ static char *scan_versions( char *buffer, char *base, ModName *ptr, ModModule *modptr) { ModName *tmp, *vers; char *s; char *mayloop; /** ** Recursively print the queue of names **/ if( !ptr) return((char *) NULL); /** ------ EXIT (END) -----> **/ if( !ptr->name) { if( OK != ErrorLogger( ERR_INTERAL, LOC, NULL)) return((char *) NULL); /** ---- EXIT (FAILURE) ---> **/ } else { /** ** Prevent endless loops ** To allow for version names that are substrings of other ** version names, match against "(^|:)name:" not just "name"... **/ mayloop = strstr( base, ptr->name); if( mayloop != NULL ) { if( mayloop == base || *(mayloop-1) == ':' ) { if( *(mayloop + strlen(ptr->name)) == ':' ) { if (strcmp(ptr->name,_default)) ErrorLogger( ERR_SYMLOOP, LOC, ptr->name, NULL); return((char *) NULL); /** ---- EXIT (FAILURE) ---> **/ } } } /** ** Now print ... **/ /* sprintf( buffer, "%s:", ptr->name); */ strcpy( buffer, ptr->name); /* if you change this, may affect the loop checker above */ strcat( buffer, ":"); buffer += strlen( buffer); /** ** Check wheter this is a version name again ... ** This is a recursion, too **/ if((ModName *) NULL != (vers = FindName( ptr->name, modptr->version, &tmp))) { if( s = scan_versions( buffer, base, vers->ptr, modptr)) buffer = s; } } /** ** This is the recursion. Preserve the buffer end pointer **/ if( s = scan_versions( buffer, base, ptr->ptr, modptr)) buffer = s; return( buffer); } /** End of 'scan_versions' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: CheckModuleVersion ** ** ** ** Description: Reduce the passed module name into a / ** ** string ** ** ** ** First Edition: 1995/12/28 ** ** ** ** Parameters: char *name name to be checked ** ** ** ** Result: char* NULL any error ** ** Otherwise Pointer to a / ** ** string ** ** ** ** Attached Globals: modlist List containing all version names ** ** aliaslist List containing all alises ** ** g_current_module The module which is handled ** ** by the current command ** ** ** ** ************************************************************************ ** ++++*/ static char *CheckModuleVersion( char *name) { static char buffer[ BUFSIZ]; char *s, *t; /** ** Check the first parameter and extract modulename and version **/ if( '/' == *name) { /** only the version specified **/ /** ** get the module name from the current module ... **/ if( !g_current_module) return((char *) NULL); strcpy( buffer, g_current_module); if((char *) NULL == (t = strrchr( buffer, '/'))) t = buffer + strlen( buffer); *t++ = '/'; *t = '\0'; /** ** The version has been specified as a parameter **/ if( s = strrchr( name, '/')) { s++; } else { ErrorLogger( ERR_INTERAL, LOC, NULL); return((char *) NULL); } strcpy( t, s); } else { /** Maybe an alias or a module **/ strcpy( buffer, name); if( !strrchr( buffer, '/')) { /** ** Check wheter this is an alias ... **/ if( AliasLookup( buffer, &s, &t)) { /* sprintf( buffer, "%s/%s", s, t); */ strcpy( buffer, s); strcat( buffer, "/"); strcat( buffer, t); } else { /** ** The default version is being selected **/ t = buffer + strlen( buffer); if( '/' != *t) *t++ = '/'; strcpy( t, _default); } } } /** ** Pass the buffer reference to the caller **/ return( buffer); } /** End of 'CheckModuleVersion' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdModuleAlias ** ** ** ** Description: Callback function for 'alias' ** ** ** ** First Edition: 1995/12/28 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: aliaslist List containing all alises ** ** g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdModuleAlias( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { ModName *tmp, *ptr; char *version, *module; ModName *trg_alias; ModModule *modptr; #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdModuleAlias, NULL); #endif /** ** Parameter check **/ if( argc != 3) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], " aliasname ", "modulename", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Whatis mode? **/ if( g_flags & M_WHATIS) return( TCL_OK); /** ------- EXIT PROCEDURE -------> **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s\t %s %s\n", argv[ 0], argv[ 1], argv[ 2]); } /** ** Check if the target is an alias ... ** Conditionally split up the passed / pair. **/ trg_alias = FindName( (char *) argv[ 2], aliaslist, &tmp); if( !trg_alias) { if((char *) NULL == (module = CheckModuleVersion( (char *) argv[2]))) module = (char *) argv[ 2]; if((char *) NULL != (version = strrchr( module, '/'))) *version++ = '\0'; } /** ** Any alias record existing with this name? ** If it does, we're finished ... **/ if( ptr = FindName( (char *) argv[ 1], aliaslist, &tmp)) { if( !ptr->ptr || !ptr->ptr->name || !trg_alias && (!ptr->ptr->module || !ptr->ptr->module->module) ) { ErrorLogger( ERR_INTERAL, LOC, NULL); return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } if( trg_alias && !strcmp( ptr->ptr->name, argv[ 2]) || !trg_alias && !strcmp( ptr->ptr->name, version) && !strcmp( ptr->ptr->module->module, module)) return( TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ if( OK != ErrorLogger( ERR_DUP_ALIAS, LOC, argv[1], NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } else { /** ** We have to allocate a new alias entry **/ if((ModName *) NULL == (ptr = AddName((char *) argv[ 1], &aliaslist,NULL))) { ErrorLogger( ERR_INTERAL, LOC, NULL); return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } } /** ** Now ptr points to the affected module alias record ... ** Conditionally we have to create the module and the version record now. **/ if( trg_alias) { ptr->ptr = trg_alias; } else { if((ModModule *) NULL == (modptr = AddModule( module))) { ErrorLogger( ERR_BADMODNAM, LOC, argv[2], NULL); ptr->ptr = (ModName *) NULL; return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } ptr->ptr = AddName( (version ? version : _default), &modptr->version, modptr); } #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdModuleAlias, NULL); #endif return( TCL_OK); } /** End of 'cmdModuleAlias' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: AliasLookup ** ** ** ** Description: Resolves a given alias to a module/version string ** ** ** ** First Edition: 1995/12/28 ** ** ** ** Parameters: char *alias Name of the alias to be re- ** ** solved ** ** char **module Buffer for the module name ** ** char **version Buffer for the module version** ** ** ** Result: int 1 Success, value in the buffer ** ** is valid ** ** 0 Any error, or not found ** ** ** ** Attached Globals: aliaslist List containing all alises ** ** ** ** ************************************************************************ ** ++++*/ int AliasLookup( char *alias, char **module, char **version) { ModName *ptr, *tmp, *oldptr = NULL; while( 1) { /** ** Lokate the alias entry and check intergrity **/ if((ModName *) NULL == (ptr = FindName( alias, aliaslist, &tmp))) return( 0); /** ------- EXIT (not found) ------> **/ if( ptr == oldptr || !ptr->ptr || !ptr->ptr->name ) { ErrorLogger( ERR_INTERAL, LOC, NULL); return( 0); /** -------- EXIT (FAILURE) -------> **/ } /** ** Do we have to loop? Another alias has no module reference ... **/ if( !ptr->ptr->module) { alias = ptr->ptr->name; oldptr = ptr; continue; } /** ** Got it. Get the module name and the version from the found ** entry. ** Dereference symbolic module versions **/ *module = ptr->ptr->module->module; *version = ptr->ptr->name; if((ModName *) NULL != (ptr = FindName( *version, ptr->ptr->module->name, &tmp))) { if( !ptr->version || !ptr->version->name) { if( OK != ErrorLogger( ERR_INTERAL, LOC, NULL)) return( 0); } else *version = ptr->version->name; } break; } /** while **/ return( 1); } /** End of 'AliasLookup' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: VersionLookup ** ** ** ** Description: Resolves a given alias to a module/version string ** ** ** ** First Edition: 1995/12/28 ** ** ** ** Parameters: char *alias Name of the alias to be re- ** ** solved ** ** char **module Buffer for the module name ** ** char **version Buffer for the module version** ** ** ** Result: int 1 Success, value in the buffer ** ** is valid ** ** 0 Any error, or not found ** ** Attached Globals: g_current_module The module which is handled ** ** by the current command ** ** ** ** ************************************************************************ ** ++++*/ int VersionLookup( char *name, char **module, char **version) { static char buffer[ BUFSIZ]; ModModule *mptr, *mtmp; ModName *vptr, *vtmp; ModName **history; char *s, *t; int histsize = 0, histndx = 0, i; /** ** Check whether this is an alias ... ** BTW: Alias lookups return the FQMN (full qualifed module name ;-) **/ if( '/' == *name) { strcpy( buffer, g_current_module); if( s = strrchr( buffer, '/')) *s = '\0'; *module = buffer; *version = name + 1; } else { strcpy( buffer, name); *module = buffer; if((char *) NULL == (*version = strrchr( buffer, '/'))) { if( AliasLookup( buffer, &s, &t)) { *module = s; *version = t; } else *version = _default; } else *(*version)++ = '\0'; } /** ** Look up modulename ... ** We call it success, if we do not find a registered name. ** In this case / will be returned as passed. **/ if((ModModule *) NULL == (mptr = FindModule( *module, &mtmp))) { return( 1); /** -------- EXIT (SUCCESS) -------> **/ } /** ** This is for preventing from endless loops **/ histsize = HISTTAB; histndx = 0; if((ModName **) NULL == (history = (ModName **) module_malloc( histsize * sizeof( ModName *)))) { ErrorLogger( ERR_ALLOC, LOC, NULL); return( 0); /** -------- EXIT (FAILURE) -------> **/ } /** ** Now look up the version name. Check symbolic names first. If some- ** thing is found, check if the related version record itself relates ** to a name record ... **/ while( 1) { /** ** Check the symbolic names ... **/ if((ModName *) NULL != (vptr = FindName( *version, mptr->name, &vtmp))){ if( !vptr->version || !vptr->version->name) { if( OK != ErrorLogger( ERR_INTERAL, LOC, NULL)) *version = (char *) NULL; break; } *version = vptr->version->name; /** ** Prevent from looping ... **/ for( i=0; i= histsize) { histsize += HISTTAB; if(!(history = (ModName **) module_realloc( history, histsize * sizeof( ModName *)))) { ErrorLogger( ERR_ALLOC, LOC, NULL); return( 0); /** -------- EXIT (FAILURE) -------> **/ } } history[ histndx++] = vptr; } else { break; } /** if( FindName) **/ } /** while( 1) **/ /** ** Free the loop preventing list ** If version is NULL now, something went wrong in the lookup loop above **/ null_free((void *) &history); return((char *) NULL != *version); } /** End of 'VersionLookup' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: CleanupVersion ** ** ** ** Description: Cleanup the version structure ** ** ** ** First Edition: 1995/12/28 ** ** ** ** Parameters: - ** ** ** ** Result: - ** ** ** ** Attached Globals: modlist List containing all version names ** ** aliaslist List containing all alises ** ** ** ** ************************************************************************ ** ++++*/ void CleanupVersion(ModModule *ptr) { #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_CleanupVersion, NULL); #endif CleanupVersionSub( modlist); modlist = (ModModule *) NULL; CleanupName( aliaslist); aliaslist = (ModName *) NULL; } /** End of 'CleanupVersion' **/ static void CleanupVersionSub( ModModule *ptr) { /** ** Recursion **/ if( !ptr) return; CleanupVersion( ptr->next); /** ** Cleanup everything that relates to this record **/ CleanupName( ptr->version); CleanupName( ptr->name); null_free((void *) &(ptr->module)); } /** End of 'CleanupVersionSub' **/ static void CleanupName( ModName *ptr) { /** ** Recursion **/ if( !ptr) return; CleanupName( ptr->next); /** ** Cleanup everything that relates to this record **/ null_free((void *) &(ptr->name)); } /** End of 'CleanupName' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: AddModule ** ** ** ** Description: Add a new entry to the modules queue ** ** ** ** First Edition: 1995/12/28 ** ** ** ** Parameters: char *name Name of the new module ** ** ** ** Result: ModModule* NULL Any error ** ** Else Pointer to the new record ** ** ** ** Attached Globals: modlist List containing all version names ** ** ** ** ************************************************************************ ** ++++*/ static ModModule *AddModule( char *name) { ModModule *app_ptr, *ptr; #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_AddModule, NULL); #endif /** ** We do not trust in NULL module names **/ if( !name || !*name) return((ModModule *) NULL); /** ** Check if the module name already exists and save the 'prev' pointer ** for appending the new one. **/ if( ptr = FindModule( name, &app_ptr)) return( ptr); /** ** Allocate a new guy **/ if((ModModule *) NULL == (ptr = (ModModule *) module_malloc( sizeof(ModModule)))) { ErrorLogger( ERR_ALLOC, LOC, NULL); return((ModModule *) NULL); } /** ** Fill the name in and put it in the queue **/ if((char *) NULL == (ptr->module = strdup( name))) { ErrorLogger( ERR_ALLOC, LOC, NULL); null_free((void *) &ptr); return((ModModule *) NULL); } if( app_ptr) { ptr->next = app_ptr->next; app_ptr->next = ptr; } else { ptr->next = modlist; modlist = ptr; } ptr->version = (ModName *) NULL; ptr->name = (ModName *) NULL; /** ** Pass back the pointer to the new entry **/ #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_END, LOC, _proc_AddModule, NULL); #endif return( ptr); } /** End of 'AddModule' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: FindModule ** ** ** ** Description: Find a new entry in the modules queue ** ** ** ** First Edition: 1995/12/28 ** ** ** ** Parameters: char *name Name of be found ** ** ModModule **prev Buffer for the 'previous' ** ** pointer ** ** ** ** Result: ModModule* NULL Any error or not found ** ** Else Pointer to the record ** ** ** ** Attached Globals: modlist List containing all version names ** ** ** ** ************************************************************************ ** ++++*/ static ModModule *FindModule( char *name, ModModule **prev) { ModModule *ptr = modlist; int cmp = 1; #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_FindModule, NULL); #endif *prev = (ModModule *) NULL; while( ptr && 0 < (cmp = strcmp( name, ptr->module))) { *prev = ptr; ptr = ptr->next; } #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_END, LOC, _proc_FindModule, NULL); #endif return( cmp ? (ModModule *) NULL : ptr); } /** End of 'FindModule' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: AddName ** ** ** ** Description: Add a new entry to the name queue ** ** ** ** First Edition: 1995/12/28 ** ** ** ** Parameters: char *name Name of the new entry ** ** ModName **start Start of the queue ** ** ModModule *module Parent module record pointer ** ** ** ** Result: ModName* NULL Any error ** ** Else Pointer to the new record ** ** ** ** ************************************************************************ ** ++++*/ static ModName *AddName( char *name, ModName **start, ModModule *module) { ModName *app_ptr, *ptr; #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_AddName, NULL); #endif /** ** Check if the name already exists and save the 'prev' pointer ** for appending the new one. **/ if( ptr = FindName( name, *start, &app_ptr)) return( ptr); /** ** Allocate a new guy **/ if((ModName *) NULL == (ptr = (ModName *) module_malloc(sizeof(ModName)))) { ErrorLogger( ERR_ALLOC, LOC, NULL); return((ModName *) NULL); } /** ** Fill the name in and put it in the queue **/ if((char *) NULL == (ptr->name = strdup( name))) { ErrorLogger( ERR_ALLOC, LOC, NULL); null_free((void *) &ptr); return((ModName *) NULL); } if( app_ptr) { ptr->next = app_ptr->next; app_ptr->next = ptr; } else { ptr->next = *start; *start = ptr; } ptr->module = module; ptr->version = ptr->ptr = (ModName *) NULL; /** ** Pass back the pointer to the new entry **/ #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_END, LOC, _proc_AddName, NULL); #endif return( ptr); } /** End of 'AddName' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: FindName ** ** ** ** Description: Find a new entry in the modules queue ** ** ** ** First Edition: 1995/12/28 ** ** ** ** Parameters: char *name Name of be found ** ** ModName *start Start of the name queue ** ** ModName **prev Buffer for the 'previous' ** ** pointer ** ** ** ** Result: ModName* NULL Any error or not found ** ** Else Pointer to the record ** ** ** ** ************************************************************************ ** ++++*/ static ModName *FindName( char *name, ModName *start, ModName **prev) { ModName *ptr = start; int cmp = 1; #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_FindName, NULL); #endif *prev = (ModName *) NULL; while( ptr && 0 < (cmp = strcmp( name, ptr->name))) { *prev = ptr; ptr = ptr->next; } #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_END, LOC, _proc_FindName, NULL); #endif return( cmp ? (ModName *) NULL : ptr); } /** End of 'FindName' **/ modules-3.2.10/cmdWhatis.c000066400000000000000000000155261210077407400153470ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdWhatis.c ** ** First Edition: 1995/12/31 ** ** ** ** Authors: Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: The Tcl module-verbose routine allows switchin ver- ** ** bosity on and off during module file execution ** ** ** ** Exports: cmdModuleWhatis ** ** cmdModuleWhatisInit ** ** cmdModuleWhatisShut ** ** ** ** Notes: ** ** ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: 5baa4abe56ea1394baa1a5b33b827f517148b14c $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ #define WHATIS_FRAG 100 /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ /** not applicable **/ /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "cmdWhatis.c"; /** File name of this module **/ #if WITH_DEBUGGING_CALLBACK static char _proc_cmdModuleWhatis[] = "cmdModuleWhatis"; #endif /** ** The whatis array ... **/ char **whatis = (char **) NULL; static int whatis_size = 0, whatis_ndx = 0; /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ /** not applicable **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdModuleWhatis ** ** ** ** Description: Callback function for 'verbose' ** ** ** ** First Edition: 1995/12/31 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: sw_verbose The verbose level selector ** ** g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdModuleWhatis( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { int i = 1; #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdModuleWhatis, NULL); #endif /** ** Help mode **/ if( g_flags & M_HELP) return( TCL_OK); /** -------- EXIT (SUCCESS) -------> **/ /** ** Parameter check **/ if( argc < 2) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], " string", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** If we don't have any whatis list buffer until now, we will create one **/ if( !whatis) { whatis_size = WHATIS_FRAG; if((char **) NULL == (whatis = module_malloc(whatis_size * sizeof(char *)))){ ErrorLogger( ERR_ALLOC, LOC, NULL); return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } } /** ** Display mode? **/ if( g_flags & M_DISPLAY) { fprintf( stderr, "%s\t ", argv[ 0]); for( i=1; i **/ } /** ** Check if printing is requested **/ if( g_flags & M_WHATIS ) { while( i < argc) { /** ** Conditionally we have to enlarge our buffer **/ while( whatis_ndx + 2 >= whatis_size) { whatis_size += WHATIS_FRAG; if(!(whatis = module_realloc( whatis, whatis_size * sizeof( char *)))) { ErrorLogger( ERR_ALLOC, LOC, NULL); return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } } /** ** Put the string on the buffer **/ if((char *) NULL == (whatis[ whatis_ndx++] = strdup( argv[ i++]))) { if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) return( TCL_ERROR); whatis_ndx--; } } /** while **/ } /** if **/ /** ** Put a trailing terminator on the buffer **/ whatis[ whatis_ndx] = (char *) NULL; #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_END, LOC, _proc_cmdModuleWhatis, NULL); #endif return( TCL_OK); } /** End of 'cmdModuleWhatis' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdModuleWhatisInit ** ** cmdModuleWhatisShut ** ** ** ** Description: Initialization of internat data structures for the ** ** Module whatis command ** ** ** ** First Edition: 1995/12/31 ** ** ** ** Parameters: - ** ** ** ** Result: - ** ** ** ** ************************************************************************ ** ++++*/ void cmdModuleWhatisInit() { whatis_ndx = 0; } /** End of 'cmdModuleWhatisInit' **/ void cmdModuleWhatisShut() { char **ptr = whatis; if( whatis) { while( *ptr) { /** go until NULL token **/ free( *ptr); *ptr = (char *) NULL; ptr++; } whatis_ndx = 0; } } /** End of 'cmdModuleWhatisShut' **/ modules-3.2.10/cmdXResource.c000066400000000000000000000715701210077407400160300ustar00rootroot00000000000000/***** ** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdXResource.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Leif Hedstrom ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: Module command to merge/remove resources from the X11** ** resource manager. The database is update internally, ** ** ie. its not done at evaluation of string modulecmd ** ** returns. It will do something like "xrdb -merge" ** ** using the default display ($DISPLAY). ** ** ** ** Exports: xresourceFinish ** ** cmdXResource ** ** ** ** Notes: Fragments of this code are from the original xrdb ** ** source, Copyright 1987 & 1991 by DIGITAL EQUIPMENT ** ** CORPORATION. Xrdb was written and modified by: ** ** ** ** Jim Gettys, August 28, 1987 ** ** Phil Karlton, January 5, 1987 ** ** Bob Scheifler, February, 1991 ** ** ** ** ToDo/Bugs: + The command only handles screen independant re- ** ** sources. ** ** ************************************************************************ ** ****/ /** ** Copyright *********************************************************** ** ** ** ** Copyright 1991-1994 by John L. Furlan. ** ** see LICENSE.GPL, which must be provided, for details ** ** ** ** ************************************************************************ **/ static char Id[] = "@(#)$Id: e6fc28fce15ed84f961b4e38341d9212cf285c25 $"; static void *UseId[] = { &UseId, Id }; /** ************************************************************************ **/ /** HEADERS **/ /** ************************************************************************ **/ #include "modules_def.h" #ifdef HAS_X11LIBS #include #include #endif /** ************************************************************************ **/ /** LOCAL DATATYPES **/ /** ************************************************************************ **/ #ifdef HAS_X11LIBS typedef struct _ResourceDB { Tcl_HashTable *data; Window root; Atom prop; } ResourceDB; #endif /** ************************************************************************ **/ /** CONSTANTS **/ /** ************************************************************************ **/ #ifndef R_OK #define F_OK 0 /** does file exist **/ #define X_OK 1 /** is it executable by caller **/ #define W_OK 2 /** is it writable by caller **/ #define R_OK 4 /** is it readable by caller **/ #endif /** ************************************************************************ **/ /** MACROS **/ /** ************************************************************************ **/ #ifdef HAS_X11LIBS #define MAXHOSTNAME 255 #define Resolution( pixels, mm) (((pixels * 100000 / mm) + 50) / 100) #endif /** ************************************************************************ **/ /** LOCAL DATA **/ /** ************************************************************************ **/ static char module_name[] = "cmdXResource.c"; /** File name of this module **/ #if WITH_DEBUGGING_UTIL_2 static char _proc_addDef[] = "addDef"; static char _proc_addNum[] = "addNum"; #endif #if WITH_DEBUGGING_UTIL_1 static char _proc_doDisplayDefines[] = "doDisplayDefines"; static char _proc_doScreenDefines[] = "doScreenDefines"; static char _proc_readFile[] = "readFile"; static char _proc_getEntries[] = "getEntries"; static char _proc_storeResProp[] = "storeResProp"; static char _proc_getOld[] = "getOld"; static char _proc_initBuffers[] = "initBuffers"; static char _proc_xresourceFinish[] = "xresourceFinish"; #endif #if WITH_DEBUGGING_CALLBACK static char _proc_cmdXResource[] = "cmdXResource"; #endif #ifdef HAS_X11LIBS static Display *dpy = (Display *) NULL; static char *defines = (char *) NULL; static int def_base = 0; static Tcl_DString *buffer = (Tcl_DString *) NULL; static ResourceDB resDB = { NULL, (Window) 0, (Atom) 0 }; #endif /** ************************************************************************ **/ /** PROTOTYPES **/ /** ************************************************************************ **/ static void addDef( char*, char*); static void addNum( char*, int); static void doDisplayDefines(void); static void doScreenDefines( int); static int readFile( register FILE *, int); static ErrType getEntries(Tcl_Interp*, Tcl_HashTable*, register char*, int); #ifdef HAS_X11LIBS static void storeResProp( register ResourceDB* ); #endif static ErrType getOld( register char**); static ErrType initBuffers(Tcl_Interp*, register int ); #ifdef HAS_X11LIBS /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: addDef, addNum ** ** ** ** Description: Adds DEFINES to the define buffer. This code is main-** ** ly the same as in the original xrdb.c ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: char *title Name of the resource ** ** char *value and its value ** ** ** ** Result: - ** ** ** ** Attached Globals: defines Buffer for all DEFINES which will be ** ** written here in command lien syntax: ** ** -D = ** ** ** ** ************************************************************************ ** ++++*/ static void addDef( char *title, char *value) { register int quote; #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_addDef, NULL); #endif /** ** Add '-D title' at first **/ if( title && *title) { strcat( defines, " -D"); strcat( defines, title); /** ** Add the value if there is one **/ if( value && *value) { quote = (value && strchr( value, ' ')); strcat( defines, (quote ? "=\"" : "=")); strcat( defines, value); if( quote) strcat( defines,"\""); } /** if( value) **/ } /** if( title) **/ } /** End of 'addDef' **/ static void addNum( char *title, int value) { char num[ 20]; #if WITH_DEBUGGING_UTIL_2 ErrorLogger( NO_ERR_START, LOC, _proc_addNum, NULL); #endif sprintf( num, "%d", value); addDef( title, num); } /** End of 'addNum' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: doDisplayDefines ** ** ** ** Description: Put the client and server specific defines on the ** ** define buffer ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: - ** ** ** ** Result: - ** ** ** ** Attached Globals: dpy For seeking the name of the display ** ** defines (via addDef and addNum) ** ** ** ** ************************************************************************ ** ++++*/ static void doDisplayDefines() { char client[ MAXHOSTNAME], /** X client name buffer **/ server[ MAXHOSTNAME], /** X server name buffer **/ *colon; /** Pointer for seeking the **/ /** colon in the server name **/ #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_doDisplayDefines, NULL); #endif /** ** Get client and server hostname. Remove everything after the ':' from ** the server name. If there's no server name available, the server de- ** faults to the client. **/ gethostname(client,MAXHOSTNAME); strcpy( server, XDisplayName( NULL)); if( colon = strchr( server, ':')) *colon = '\0'; if( !*server) strcpy( server, client); /** ** Add the standard defines now ... **/ addDef( "HOST", server); addDef( "SERVERHOST", server); addDef( "CLIENTHOST", client); addNum( "VERSION", ProtocolVersion( dpy)); addNum( "REVISION", ProtocolRevision( dpy)); addDef( "VENDOR", ServerVendor( dpy)); addNum( "RELEASE", VendorRelease( dpy)); } /** End of 'doDisplayDefines' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: doScreenDefines ** ** ** ** Description: Put the screen specific defines on the define buffer ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: int scrno Screen number ** ** ** ** Result: - ** ** ** ** Attached Globals: dpy For seeking the name of the display ** ** defines (via addDef and addNum) ** ** ** ** ************************************************************************ ** ++++*/ static void doScreenDefines( int scrno) { register Screen *screen; register Visual *visual; #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_doScreenDefines, NULL); #endif /** ** Get screen data at first **/ screen = ScreenOfDisplay( dpy, scrno); visual = DefaultVisualOfScreen( screen); /** ** Put screen data on the defines buffer **/ addNum( "WIDTH", screen->width); addNum( "HEIGHT", screen->height); addNum( "X_RESOLUTION", Resolution( screen->width, screen->mwidth)); addNum( "Y_RESOLUTION", Resolution( screen->height, screen->mheight)); addNum( "PLANES", DisplayPlanes( dpy, scrno)); addNum( "BITS_PER_RGB", visual->bits_per_rgb); /** ** The CLASS and COLOR do depend on the screen class **/ switch(visual->class) { case StaticGray: addDef( "CLASS", "StaticGray"); break; case GrayScale: addDef( "CLASS", "GrayScale"); break; case StaticColor: addDef( "CLASS", "StaticColor"); addDef( "COLOR", NULL); break; case PseudoColor: addDef( "CLASS", "PseudoColor"); addDef( "COLOR", NULL); break; case TrueColor: addDef( "CLASS", "TrueColor"); addDef( "COLOR", NULL); break; case DirectColor: addDef( "CLASS", "DirectColor"); addDef( "COLOR", NULL); break; } /** switch **/ } /** End of 'doScreenDefines' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: readFile ** ** ** ** Description: Read resource from a file, which normally is a pipe ** ** opened with popen. ** ** The file will be closed, when reading is finished ** ** ** ** Note: This routine uses the global variable 'line', declar-** ** ed in another file!!! ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: register FILE *input The stream to be read from ** ** int do_cpp Differs betweem a pipe or a ** ** file being assigned to input ** ** ** ** Result: - ** ** ** ** Attached Globals: line Buffer for a line to be read ** ** buffer Buffer for the whole resource file ** ** image ** ** ** ** ************************************************************************ ** ++++*/ static int readFile( register FILE *input, int do_cpp) { register int bytes; #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_readFile, NULL); #endif while( !feof( input) && (bytes = fread( line, 1, LINELENGTH, input))) Tcl_DStringAppend( buffer, line, bytes); if( do_cpp) { if( -1 == pclose( input)) if( OK != ErrorLogger( ERR_PCLOSE, LOC, NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } else { if( EOF == fclose( input)) if( OK != ErrorLogger( ERR_CLOSE, LOC, NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } return( TCL_OK); } /** End of 'readFile' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: getEntries ** ** ** ** Description: Updates the resources database (which is a Tcl hash ** ** table) with the resources passed in the buffer. The ** ** buffer contains a X resource lookalike text image. ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp According Tcl interp.** ** Tcl_HashTable *data The hash tables holding the ** ** resource data ** ** register char *buf The buffer containing the ** ** resources to be modified in ** ** X resource syntax ** ** int remove Remove or add resources ** ** ** ** Result: ErrType NO_ERR Success ** ** ERR_PARSE Parse error ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ static ErrType getEntries( Tcl_Interp *interp, Tcl_HashTable *data, register char *buf, int remove) { register Tcl_HashEntry *entry; char *end, Res="^[ \t]*([^ \t]*)[ \t]*:[ \t]*(.*)[ \t]*$"; static Tcl_Obj *res_obj = (Tcl_Obj *) NULL; static Tcl_RegExp res_exp = (Tcl_RegExp) NULL; int new_res; #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_getEntries, NULL); #endif /** ** The following regular expression matches pattern like ** ** : ** ** The resource will be returned as \1 and the value as \2 ** Set the regexp pointer only, if it hasn't already been set. This ** is a constant regexp! **/ if(!res_obj) res_obj = Tcl_NewStringObj(Res,strlen(Res)); if(!res_exp) res_exp = Tcl_GetRegExpFromObj(interp, res_obj,TCL_REG_ADVANCED); /** ** Seek for the lines (buffers) end. Put a terminator there. Take care of ** escaped newlines! **/ for( end = buf; *end; end++) if( *end == '\\' && *(end+1) == '\n') end++; else if( *end == '\n') *end = '\0'; /** ** Now read the whole buffer. ** At first, we have to ignore comments **/ while( buf <= end) { if( *buf == '#' || *buf == '!' || !*buf) { while( *buf++) ; /** ** Otherwise we're seeking for a syntacticl correct X resource entry **/ } else if( !Tcl_RegExpExec(interp, res_exp, buf, buf)) { if( OK != ErrorLogger( ERR_PARSE, LOC, NULL)) { return( ERR_PARSE); /** ------ EXIT (PARSE ERROR) -----> **/ } } else { /** ** Valid entry found. Set up buf pointing behind the pattern ** that has matched and put a terminator at the end of either the ** resource name and its value. **/ char *startp, *endp; Tcl_RegExpRange(res_exp, 0, (CONST84 char **) &startp, (CONST84 char **) &endp); buf = endp + 1; Tcl_RegExpRange(res_exp, 1, (CONST84 char **) &startp, (CONST84 char **) &endp); *endp = '\0'; Tcl_RegExpRange(res_exp, 2, (CONST84 char **) &startp, (CONST84 char **) &endp); *endp = '\0'; /** ** Now create (or remove) a hash entry for the parsed resource **/ if( remove) { Tcl_RegExpRange(res_exp, 1, (CONST84 char **) &startp, (CONST84 char **) &endp); if( entry = Tcl_FindHashEntry( data, startp)) { null_free((void *) &( Tcl_GetHashValue( entry))); Tcl_DeleteHashEntry( entry); } } else { Tcl_RegExpRange(res_exp, 1, (CONST84 char **) &startp, (CONST84 char **) &endp); entry = Tcl_CreateHashEntry( data, startp, &new_res); if( !new_res) null_free((void *) &( Tcl_GetHashValue( entry))); Tcl_RegExpRange(res_exp, 2, (CONST84 char **) &startp, (CONST84 char **) &endp); Tcl_SetHashValue( entry, strdup( startp)); } } /** if( reg exp matched) **/ } /** while **/ /** ** Return on success **/ return( NO_ERR); } /** end of 'getEntries' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: storeResProp ** ** ** ** Description: Update the X11 resource property, adding new resour- ** ** ces. ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: register ResourceDB *rdb Resource database ** ** ** ** Result: - ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ #ifdef HAS_X11LIBS static void storeResProp( register ResourceDB *rdb) { Tcl_HashSearch search; register int mode = PropModeReplace; register int max = (XMaxRequestSize( dpy) << 2) - 28; register int left; register Tcl_HashEntry *entry = Tcl_FirstHashEntry( rdb->data, &search); unsigned char *buf; #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_storeResProp, NULL); #endif /** ** Write all attached resources into the buffer. Follow the X ** resource syntax: ** ** : **/ Tcl_DStringTrunc( buffer, 0); while( entry) { Tcl_DStringAppend( buffer, Tcl_GetHashKey(rdb->data, entry), -1); Tcl_DStringAppend( buffer, ":\t", 2); Tcl_DStringAppend( buffer, (char *)Tcl_GetHashValue( entry), -1); Tcl_DStringAppend( buffer, "\n", 1); entry = Tcl_NextHashEntry( &search); } /** ** In case of the request being larger than the largest request the X ** server may handle, spool it block by block until the final one. **/ buf = (unsigned char *) Tcl_DStringValue( buffer); if( max < (left = Tcl_DStringLength( buffer))) { XGrabServer( dpy); mode = PropModeAppend; do { XChangeProperty( dpy, rdb->root, rdb->prop, XA_STRING, 8, mode, buf, max); buf += max; } while( max < (left -= max)); } /** ** Put the final request block (which may be the only one, if the if- ** statement above doesn't match) to the X server **/ XChangeProperty( dpy, rdb->root, rdb->prop, XA_STRING, 8, mode, buf, left); if( mode != PropModeReplace) XUngrabServer( dpy); } /** End of 'storeResProp' **/ #endif /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: getOld ** ** ** ** Description: First, we have to find the resources already loaded ** ** into the X11 resource property. This routine current-** ** ly only handles one screen, the default screen for ** ** the DISPLAY. This routine should only be called if ** ** resDB.data is NULL. ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: register char **buf Buffer for the old resource ** ** database ** ** ** ** Result: ErrType ERR_PARAM resDB.data != NULL ** ** ERR_ALLOC out of memory ** ** NO_ERR Success ** ** ** ** Attached Globals: resDB The data area will be installed as a ** ** Tcl hash table ** ** dpy The current display ** ** ** ** ************************************************************************ ** ++++*/ static ErrType getOld( register char **buf) { #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_getOld, NULL); #endif /** ** Allocate memory for the hash table **/ if( resDB.data) if( OK != ErrorLogger( ERR_PARAM, LOC, "Resource database", NULL)) return( ERR_PARAM); /** ------- EXIT (PARAMETER) -----> **/ if( !(resDB.data = (Tcl_HashTable *) module_malloc(sizeof(Tcl_HashTable)))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) return( ERR_ALLOC); /** ----- EXIT (OUT OF MEMORY) ----> **/ /** ** Initialize the hash table and read in the old resources **/ Tcl_InitHashTable( resDB.data, TCL_STRING_KEYS); resDB.root = RootWindow( dpy, 0); resDB.prop = XA_RESOURCE_MANAGER; *buf = XResourceManagerString( dpy); /** ** Success **/ return( NO_ERR); } /** End of 'getOld' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: initBuffers ** ** ** ** Description: Initilize buffers if not already done, or reinitia- ** ** lize some variables if buffers already exists. ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp According Tcl interp.** ** register int is_file Differs between a single X ** ** resource to be modified or ** ** a resource file to be merged** ** ** ** Result: ErrType ERR_DISPLAY Cannot open DISPLAY ** ** ERR_ALLOC ALLOC failure ** ** ERR_EXTRACT ** ** NO_ERR Success ** ** ** ** Attached Globals: dpy Display will be openend ** ** resDB Resource database will be filled up ** ** with the current setup ** ** defines ** ** ** ** ************************************************************************ ** ++++*/ static ErrType initBuffers( Tcl_Interp *interp, register int is_file) { char *tmpbuf; #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_initBuffers, NULL); #endif /** ** Open the display **/ if( !dpy && !(dpy = XOpenDisplay( NULL))) if( OK != ErrorLogger( ERR_DISPLAY, LOC, NULL)) return( ERR_DISPLAY); /** -------- EXIT (FAILURE) -------> **/ /** ** Read in the old setup at first and put it into the resource database **/ if( !resDB.data) { if( getOld( &tmpbuf) != NO_ERR) /** NULL if no resources exists **/ if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) return( ERR_ALLOC); /** ----- EXIT (OUT OF MEMORY) ----> **/ if( tmpbuf && (getEntries(interp, resDB.data, tmpbuf, 0) != NO_ERR)) if( OK != ErrorLogger( ERR_EXTRACT, LOC, NULL)) return( ERR_EXTRACT); } /** ** Conditionally allocate a buffer and initialize this guy **/ if( !buffer) { if( !(buffer = (Tcl_DString *) module_malloc(sizeof(Tcl_DString)))) { if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) return( ERR_ALLOC); /** ----- EXIT (OUT OF MEMORY) ----> **/ } else Tcl_DStringInit( buffer); } else Tcl_DStringTrunc( buffer, 0); /** ** Set up all the defines according display and screen **/ if( defines) defines[ def_base] = '\0'; else if( is_file) { if( !(defines = (char *) module_malloc(BUFSIZ * sizeof( char)))) if( OK != ErrorLogger( ERR_ALLOC, LOC, NULL)) return( ERR_ALLOC); /** ----- EXIT (OUT OF MEMORY) ----> **/ /* sprintf( defines, "%s %s ", CPPSTDIN, CPPMINUS); */ strcpy( defines, CPPSTDIN); strcat( defines, " "); strcat( defines, CPPMINUS); strcat( defines, " "); doDisplayDefines(); doScreenDefines( DefaultScreen( dpy)); def_base = strlen( strcat( defines, " ")); } /** ** Return on success **/ return( NO_ERR); } /** End of 'initBuffers' **/ #endif /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: xresourceFinish ** ** ** ** Description: Update the resource property if everything is ok. ** ** This routine should be called when all properies have** ** been defines or updated. Remember that this routine ** ** always will be called, even if there was no ** ** "x-resource" command in the module! ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ** ** ** ** Result: ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ ** ++++*/ void xresourceFinish(register int no_errors) { #if WITH_DEBUGGING_UTIL_1 ErrorLogger( NO_ERR_START, LOC, _proc_xresourceFinish, NULL); #endif #ifdef HAS_X11LIBS /** ** If there is data stored in the resource database, spool it to the ** according X server **/ if( resDB.data && no_errors) storeResProp( &resDB); /** ** Close the display and free what has been used **/ if( dpy) XCloseDisplay( dpy); if( buffer) Tcl_DStringFree( buffer); #endif } /** End of 'xresourceFinish' **/ /*++++ ** ** Function-Header ***************************************************** ** ** ** ** Function: cmdXResource ** ** ** ** Description: Callback function for 'x-resource'. The function ** ** sets up a hash table containing all resources to be ** ** passed to the X server. This hash table will be ** ** flushed whenever the function xresourceFinish is cal-** ** led. ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successful completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** ** ** ************************************************************************ ** ++++*/ int cmdXResource( ClientData client_data, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { register FILE *inp; int is_file, i, do_cpp = 1, opt_ind = 1; #if WITH_DEBUGGING_CALLBACK ErrorLogger( NO_ERR_START, LOC, _proc_cmdXResource, NULL); #endif /** ** Whatis mode? **/ if( g_flags & (M_WHATIS | M_HELP)) return( TCL_OK); /** ------- EXIT PROCEDURE -------> **/ if( !getenv("DISPLAY")) { /* don't bother trying to set display variables, if there is no display */ return(TCL_OK); } /** ** Parameter check **/ if( argc > 1 && !strcmp( argv[1], "-nocpp")) { do_cpp = 0; opt_ind++; } if( argc <= opt_ind) { if( OK != ErrorLogger( ERR_USAGE, LOC, argv[0], "[ -nocpp ] strings", NULL)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** Ok, now let's treat all remaining arguments as X resources or ** X resource files. At first let's check if it is a file ... **/ while( opt_ind < argc) { is_file = (access( argv[ opt_ind], R_OK & F_OK) == 0); #ifdef HAS_X11LIBS if( g_flags & M_DISPLAY) { fprintf( stderr, "xrdb -merge\t "); for( i=1; i **/ /** ** This puts all required resources into a text image buffer ... **/ if( !is_file) { Tcl_DStringAppend( buffer, argv[ opt_ind], -1); } else { if( NULL == (inp = (do_cpp ? popen( strcat( defines, argv[ opt_ind]), "r") : fopen( argv[ opt_ind], "r")) ) ) if( OK != ErrorLogger( (do_cpp ? ERR_POPEN : ERR_OPEN), LOC, "argv[ opt_ind]", "reading" )) return( TCL_ERROR); /** ---- EXIT (FAILURE) ---> **/ if( TCL_ERROR == readFile( inp, do_cpp)) return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } /** ** ... and this transforms the text image buffer into a Tcl hash ** table **/ if( NO_ERR != getEntries(interp, resDB.data, Tcl_DStringValue( buffer), g_flags & M_REMOVE)) { return( TCL_ERROR); /** -------- EXIT (FAILURE) -------> **/ } } #else if( g_flags & M_DISPLAY) { fprintf( stderr, "xrdb -merge\t "); for( i=1; i header file. */ #undef HAVE_ASSERT_H /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the `dup2' function. */ #undef HAVE_DUP2 /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `getdomainname' function. */ #undef HAVE_GETDOMAINNAME /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the `X11' library (-lX11). */ #undef HAVE_LIBX11 /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mktemp' function. */ #undef HAVE_MKTEMP /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcoll' function and it is properly defined. */ #undef HAVE_STRCOLL /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `syslog' function. */ #undef HAVE_SYSLOG /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MODE_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TERMIOS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the `tempnam' function. */ #undef HAVE_TEMPNAM /* Define to 1 if you have the header file. */ #undef HAVE_TERMIO_H /* Define to 1 if you have the `tmpnam' function. */ #undef HAVE_TMPNAM /* Define to 1 if you have the `uname' function. */ #undef HAVE_UNAME /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_VARARGS_H /* LMSPLIT_SIZE: This symbol, if defined, will force the environment variable _LM_FILES_ to be split into smaller "chunks". */ #undef LMSPLIT_SIZE /* MODULEPATH: Directory that contains all the system module files */ #undef MODULEPATH /* MODULES_INIT_DIR: Directory that contains the modules init files. */ #undef MODULES_INIT_DIR /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* PHOSTNAME: Last resort to get the hostname, if uname() and gethostname() are not available. */ #undef PHOSTNAME /* PREFIX: Usually equivalent to /usr/local/Modules[/version_number] */ #undef PREFIX /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* TMP_DIR: tmp directory name */ #undef TMP_DIR /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* USE_FREE: By default, Modules will not call free() for any dynamic data. This define enables these calls. */ #undef USE_FREE /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* VERSIONPATH: Directory that contains the env.modules version files. */ #undef VERSIONPATH /* VERSION_MAGIC: By default, .version files will be required to have the modulefile magic cookie to be valid, else an error message will be printed out. */ #undef VERSION_MAGIC /* WANTS_VERSIONING Does the system want to use modules versions */ #undef WANTS_VERSIONING /* WITH_DEBUG_INFO: Debug info level if defined */ #undef WITH_DEBUG_INFO /* WITH_LOGGING: Syslog logging and facilities */ #undef WITH_LOGGING /* */ #undef WITH_LOG_DIR /* */ #undef WITH_LOG_FACILITY_DEBUG /* */ #undef WITH_LOG_FACILITY_ERROR /* */ #undef WITH_LOG_FACILITY_FATAL /* */ #undef WITH_LOG_FACILITY_INFO /* */ #undef WITH_LOG_FACILITY_PANIC /* */ #undef WITH_LOG_FACILITY_PROB /* */ #undef WITH_LOG_FACILITY_TRACE /* */ #undef WITH_LOG_FACILITY_VERBOSE /* */ #undef WITH_LOG_FACILITY_WARN /* */ #undef WITH_TRACE_APROPOS /* */ #undef WITH_TRACE_AVAIL /* */ #undef WITH_TRACE_CLEAR /* */ #undef WITH_TRACE_DISP /* */ #undef WITH_TRACE_HELP /* */ #undef WITH_TRACE_INIT /* */ #undef WITH_TRACE_LIST /* Tracking */ #undef WITH_TRACE_LOAD /* */ #undef WITH_TRACE_PURGE /* */ #undef WITH_TRACE_SWITCH /* */ #undef WITH_TRACE_UNLOAD /* */ #undef WITH_TRACE_UNUSE /* */ #undef WITH_TRACE_UPDATE /* */ #undef WITH_TRACE_USE /* */ #undef WITH_TRACE_WHATIS /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if doesn't define. */ #undef gid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if doesn't define. */ #undef uid_t modules-3.2.10/config/000077500000000000000000000000001210077407400145145ustar00rootroot00000000000000modules-3.2.10/config/compile000077500000000000000000000153371210077407400161030ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-01-04.17; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free # Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l*) lib=${1#-l} found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes set x "$@" "$dir/$lib.dll.lib" break fi if test -f "$dir/$lib.lib"; then found=yes set x "$@" "$dir/$lib.lib" break fi done IFS=$save_IFS test "$found" != yes && set x "$@" "$lib.lib" shift ;; -L*) func_file_conv "${1#-L}" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: modules-3.2.10/config/depcomp000077500000000000000000000475561210077407400161120ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2011-12-04.11; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, # 2011 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/ \1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/ / G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: modules-3.2.10/config/emtcl.m4000066400000000000000000000212431210077407400160640ustar00rootroot00000000000000# Created by # R.K.Owen # for the environment modules project and is covered by the same license. #------------------------------------------------------------------------ # EM_SET_TCL -- # # Allow an alternative to the tclConfig.sh ... adds several # configure options for fine tuning # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tcl-ver=... # --with-tcl-lib=... # --with-tcl-inc=... # # Defines the following vars: # TCL_VERSION Tcl version (X.Y) # TCL_LIB_SPEC Full path to the Tcl library directory # TCL_INCLUDE_SPEC Full path to the Tcl include directory #------------------------------------------------------------------------ AC_DEFUN([EM_SET_TCL], [ AC_ARG_WITH(tcl-ver, AC_HELP_STRING([--with-tcl-ver=X.Y], [Tcl version to use [[search]]]), with_tclver=${withval}, ) AC_MSG_CHECKING([for Tcl version]) AC_CACHE_VAL(em_cv_tclver,[ # First check to see if --with-tcl-ver was specified. if test x"${with_tclver}" = x ; then #{{ em_cv_tclver=`echo 'puts [[info tclversion]]' | tclsh 2>/dev/null` else #}{ em_cv_tclver=${with_tclver} fi #}} tclver=`echo $em_cv_tclver | sed -n -e '/[[0-9]]\.[[0-9]]/p'` if test x"$tclver" = x ; then #{ AC_MSG_ERROR([Must specify version (X.Y) if using this option]) fi #} AC_MSG_RESULT([${em_cv_tclver}]) ]) TCL_VERSION="${em_cv_tclver}" AC_ARG_WITH(tcl-lib, AC_HELP_STRING([--with-tcl-lib=], [directory containing tcl libraries (libtclX.Y) [[none]]]), [if test "$withval" = "no" || test "$withval" = "yes"; then #{{ AC_MSG_ERROR([must give a value if using --with-tcl-lib]) else #}{ with_tcllib=${withval} fi #}}], [with_tcllib=not_given]) if test x"$with_tcllib" != x"not_given" ; then #{ AC_MSG_CHECKING([for Tcl lib directory]) AC_CACHE_VAL(em_cv_tcllib,[ # First check to see if --with-tcl-lib was specified. if test x"${with_tcllib}" = x ; then #{{ AC_MSG_ERROR([Must specify directory if using this option]) else #}{ if test -d "${with_tcllib}" ; then #{{ em_cv_tcllib=`(cd ${with_tcllib}; pwd)` AC_MSG_RESULT([${with_tcllib}]) else #}{ AC_MSG_ERROR([${with_tcllib} directory not found]) fi #}} fi #}} ]) TCL_LIB_SPEC="-L${em_cv_tcllib} -ltcl${em_cv_tclver}" fi #} AC_ARG_WITH(tcl-inc, AC_HELP_STRING([--with-tcl-inc=], [directory containing tcl include files (tclDecls.h,...) [[none]]]), [if test "$withval" = "no" || test "$withval" = "yes"; then #{{ AC_MSG_ERROR([must give a value if using --with-tcl-inc]) else #}{ with_tclinc=${withval} fi #}}], [with_tclinc=not_given]) if test x"$with_tclinc" != x"not_given" ; then AC_MSG_CHECKING([for Tcl include directory]) AC_CACHE_VAL(em_cv_tclinc,[ # First check to see if --with-tcl-inc was specified. if test x"${with_tclinc}" = x ; then #{{ AC_MSG_ERROR([Must specify directory if using this option]) else #}{ if test -d "${with_tclinc}" ; then #{{ em_cv_tclinc=`(cd ${with_tclinc}; pwd)` AC_MSG_RESULT([${with_tclinc}]) else #}{ AC_MSG_ERROR([${with_tclinc} directory not found]) fi #}} fi #}} ]) TCL_INCLUDE_SPEC="-I${em_cv_tclinc}" fi ]) #------------------------------------------------------------------------ # EM_CHECK_TCL -- # # Make sure we have all the necessary bits # # Arguments: # none # # Results: # Either stops the script or outputs the found bits # TCL_VERSION Tcl version (X.Y) # TCL_LIB_SPEC Full path to the Tcl library directory # TCL_INCLUDE_SPEC Full path to the Tcl include directory #------------------------------------------------------------------------ AC_DEFUN([EM_CHECK_TCL], [ AC_MSG_CHECKING([TCL_VERSION]) if test x"$TCL_VERSION" = x ; then #{{ AC_MSG_ERROR( [TCL_VERSION not found, need to use --with-tcl-ver]) else #}{ AC_MSG_RESULT([$TCL_VERSION]) fi #}} AC_SUBST(TCL_VERSION) AC_MSG_CHECKING([TCL_LIB_SPEC]) if test x"$TCL_LIB_SPEC" = x ; then #{{ AC_MSG_ERROR( [TCL_LIB_SPEC not found, need to use --with-tcl-lib]) else #}{ AC_MSG_RESULT([$TCL_LIB_SPEC]) fi #}} AC_SUBST(TCL_LIB_SPEC) AC_MSG_CHECKING([TCL_INCLUDE_SPEC]) if test x"$TCL_INCLUDE_SPEC" = x ; then #{{ AC_MSG_ERROR( [TCL_INCLUDE_SPEC not found, need to use --with-tcl-inc]) else #}{ AC_MSG_RESULT([$TCL_INCLUDE_SPEC]) fi #}} AC_SUBST(TCL_INCLUDE_SPEC) ]) #------------------------------------------------------------------------ # EM_SET_TCLX -- # # Allow an alternative to the tclxConfig.sh ... adds several # configure options for fine tuning # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tclx-ver=... # --with-tclx-lib=... # --with-tclx-inc=... # # Defines the following vars: # TCLX_VERSION TclX version (X.Y) # TCLX_LIB_SPEC Full path to the TclX library directory # TCLX_INCLUDE_SPEC Full path to the TclX include directory #------------------------------------------------------------------------ AC_DEFUN([EM_SET_TCLX], [ AC_ARG_WITH(tclx-ver, AC_HELP_STRING([--with-tclx-ver=X.Y], [TclX version to use [[search]]]), with_tclxver=${withval}, ) AC_MSG_CHECKING([for TclX version]) AC_CACHE_VAL(em_cv_tclxver,[ # First check to see if --with-tclx-ver was specified. if test x"${with_tclxver}" = x ; then #{{ em_cv_tclxver=`echo 'puts [[info tclversion]]' | tclsh 2>/dev/null` else #}{ em_cv_tclxver=${with_tclxver} fi #}} tclxver=`echo $em_cv_tclxver | sed -n -e '/[[0-9]]\.[[0-9]]/p'` if test x"$tclxver" = x ; then #{ AC_MSG_ERROR([Must specify version (X.Y) if using this option]) fi #} AC_MSG_RESULT([using ${em_cv_tclxver}]) ]) TCLX_VERSION="${em_cv_tclxver}" AC_ARG_WITH(tclx-lib, AC_HELP_STRING([--with-tclx-lib=], [directory containing tclx libraries (libtclxX.Y) [[none]]]), [if test "$withval" = "no" || test "$withval" = "yes"; then #{{ AC_MSG_ERROR([must give a value if using --with-tclx-lib]) else #}{ with_tclxlib=${withval} fi #}}], [with_tclxlib=not_given]) if test x"$with_tclxlib" != x"not_given" ; then #{ AC_MSG_CHECKING([for Tclx lib directory]) AC_CACHE_VAL(em_cv_tclxlib,[ # First check to see if --with-tclx-lib was specified. if test x"${with_tclxlib}" = x ; then #{{ AC_MSG_ERROR([Must specify directory if using this option]) else #}{ if test -d "${with_tclxlib}" ; then #{{ em_cv_tclxlib=`(cd ${with_tclxlib}; pwd)` AC_MSG_RESULT([${with_tclxlib}]) else #}{ AC_MSG_ERROR([${with_tclxlib} directory not found]) fi #}} fi #}} ]) TCLX_LIB_SPEC="-L${em_cv_tclxlib} -ltclx${em_cv_tclxver}" fi #} AC_ARG_WITH(tclx-inc, AC_HELP_STRING([--with-tclx-inc=], [directory containing tclx include files (tclExtend.h,...) [[none]]]), [if test "$withval" = "no" || test "$withval" = "yes"; then #{{ AC_MSG_ERROR([must give a value if using --with-tclx-inc]) else #}{ with_tclxinc=${withval} fi #}}], [with_tclxinc=not_given]) if test x"$with_tclxinc" != x"not_given" ; then #{ AC_MSG_CHECKING([for TclX include directory]) AC_CACHE_VAL(em_cv_tclxinc,[ # First check to see if --with-tclx-inc was specified. if test x"${with_tclxinc}" = x ; then #{{ AC_MSG_ERROR([Must specify directory if using this option]) else #}{ if test -d "${with_tclxinc}" ; then #{{ em_cv_tclxinc=`(cd ${with_tclxinc}; pwd)` AC_MSG_RESULT([${with_tclxinc}]) else #}{ AC_MSG_ERROR([${with_tclxinc} directory not found]) fi #}} fi #}} ]) TCLX_INCLUDE_SPEC="-I${em_cv_tclxinc}" fi #} ]) #------------------------------------------------------------------------ # EM_CHECK_TCLX -- # # Make sure we have all the necessary bits # # Arguments: # none # # Results: # Either stops the script or outputs the found bits # TCLX_VERSION TclX version (X.Y) # TCLX_LIB_SPEC Full path to the TclX library directory # TCLX_INCLUDE_SPEC Full path to the TclX include directory #------------------------------------------------------------------------ AC_DEFUN([EM_CHECK_TCLX], [ AC_MSG_CHECKING([TCLX_VERSION]) if test x"$TCLX_VERSION" = x ; then #{{ AC_MSG_ERROR( [TCLX_VERSION not found, need to use --with-tclx-ver]) else #}{ AC_MSG_RESULT([$TCLX_VERSION]) fi #}} AC_SUBST(TCLX_VERSION) AC_MSG_CHECKING([TCLX_LIB_SPEC]) if test x"$TCLX_LIB_SPEC" = x ; then #{{ no_tclx=true no_tclx_lib=true AC_MSG_RESULT( [TCLX_LIB_SPEC not found, need to use --with-tclx-lib]) else #}{ no_tclx= no_tclx_lib= AC_MSG_RESULT([$TCLX_LIB_SPEC]) fi #}} AC_SUBST(TCLX_LIB_SPEC) AC_MSG_CHECKING([TCLX_INCLUDE_SPEC]) if test x"$TCLX_INCLUDE_SPEC" = x ; then #{{ no_tclx=true AC_MSG_RESULT( [TCLX_INCLUDE_SPEC not found, need to use --with-tclx-inc]) else #}{ test x"$no_tclx_lib" = x && no_tclx= AC_MSG_RESULT([$TCLX_INCLUDE_SPEC]) fi #}} AC_SUBST(TCLX_INCLUDE_SPEC) ]) modules-3.2.10/config/install-sh000077500000000000000000000332561210077407400165310ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for `test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: modules-3.2.10/config/missing000077500000000000000000000241521210077407400161170ustar00rootroot00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: modules-3.2.10/config/tcl.m4000066400000000000000000000307511210077407400155460ustar00rootroot00000000000000# This software is copyrighted by the Regents of the University of # California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState # Corporation and other parties. The following terms apply to all files # associated with the software unless explicitly disclaimed in # individual files. # # The authors hereby grant permission to use, copy, modify, distribute, # and license this software and its documentation for any purpose, provided # that existing copyright notices are retained in all copies and that this # notice is included verbatim in any distributions. No written agreement, # license, or royalty fee is required for any of the authorized uses. # Modifications to this software may be copyrighted by their authors # and need not follow the licensing terms described here, provided that # the new terms are clearly indicated on the first page of each file where # they apply. # # IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES # ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY # DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE # IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE # NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR # MODIFICATIONS. # # GOVERNMENT USE: If you are acquiring this software on behalf of the # U.S. government, the Government shall have only "Restricted Rights" # in the software and related documentation as defined in the Federal # Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you # are acquiring the software on behalf of the Department of Defense, the # software shall be classified as "Commercial Computer Software" and the # Government shall have only "Restricted Rights" as defined in Clause # 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the # authors grant the U.S. Government and others acting in its behalf # permission to use and distribute the software in accordance with the # terms specified in this license. #------------------------------------------------------------------------ # License file provided with the Tcl8.4 source distribution # # parts have been removed or edited by # R.K.Owen # for the environment modules project #------------------------------------------------------------------------ # SC_PATH_TCLCONFIG -- # # Locate the tclConfig.sh file and perform a sanity check on # the Tcl compile flags # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tcl=... # # Defines the following vars: # TCL_BIN_DIR Full path to the directory containing # the tclConfig.sh file #------------------------------------------------------------------------ AC_DEFUN([SC_PATH_TCLCONFIG], [ # # Ok, lets find the tcl configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tcl # if test x"${no_tcl}" = x ; then #{ # we reset no_tcl in case something fails here no_tcl=true AC_ARG_WITH(tcl, [AC_HELP_STRING([--with-tcl=], [directory containing tcl configuration (tclConfig.sh) [[searches]]])], [with_tclconfig=${withval}], [with_tclconfig=search] ) AC_MSG_CHECKING([for Tcl configuration (tclConfig.sh)]) if test x"$with_tclconfig" = x"no" ; then #{{ AC_MSG_RESULT([disabled]) else #}{ AC_CACHE_VAL(em_cv_tclconfig,[ # First check to see if --with-tcl was specified. if test x"${with_tclconfig}" != xsearch ; then #{ if test -f "${with_tclconfig}/tclConfig.sh" ; then #{{ em_cv_tclconfig=`(cd ${with_tclconfig}; pwd)` else #}{ AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) fi #}} fi #} # then check for a private Tcl installation if test x"${em_cv_tclconfig}" = x ; then #{ for i in \ ../tcl \ `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tcl \ `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tcl \ `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ; do if test -f "$i/unix/tclConfig.sh" ; then #{ em_cv_tclconfig=`(cd $i/unix; pwd)` break fi #} done fi #} # check in a few common install locations if test x"${em_cv_tclconfig}" = x ; then #{ for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/local/lib/tcl[[8-9]].[[0-9]]* 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/contrib/lib/tcl[[8-9]].[[0-9]]* 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib32 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ `ls -d /usr/lib/tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then #{ em_cv_tclconfig=`(cd $i; pwd)` break fi #} done fi #} # check in a few other private locations if test x"${em_cv_tclconfig}" = x ; then #{ for i in \ ${srcdir}/../tcl \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then #{ em_cv_tclconfig=`(cd $i/unix; pwd)` break fi #} done fi #} ]) if test x"${em_cv_tclconfig}" = x ; then #{{ TCL_BIN_DIR="# no Tcl configs found" AC_MSG_RESULT([not found]) else #}{ no_tcl= TCL_BIN_DIR=${em_cv_tclconfig} AC_MSG_RESULT([found $TCL_BIN_DIR/tclConfig.sh]) fi #}} fi #}} fi #} ]) #------------------------------------------------------------------------ # SC_LOAD_TCLCONFIG -- # # Load the tclConfig.sh file # # Arguments: # # Requires the following vars to be set: # TCL_BIN_DIR # # Results: # # Subst the following vars: # TCL_BIN_DIR # TCL_SRC_DIR # TCL_LIB_FILE # #------------------------------------------------------------------------ AC_DEFUN([SC_LOAD_TCLCONFIG], [ if test x"$no_tcl" != x"true" ; then #{ AC_MSG_CHECKING([for existence of tclConfig.sh]) if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then #{{ AC_MSG_RESULT([loading]) . "$TCL_BIN_DIR"/tclConfig.sh else #}{ AC_MSG_RESULT([file not found]) fi #}} # # If the TCL_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TCL_LIB_SPEC will be set to the value # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC # instead of TCL_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. # if test -f "$TCL_BIN_DIR/Makefile" ; then #{ TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} fi #} # # eval is required to do the TCL_DBGX substitution # eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" # AC_SUBST(TCL_VERSION) # AC_SUBST(TCL_BIN_DIR) # AC_SUBST(TCL_SRC_DIR) # AC_SUBST(TCL_LIB_FILE) # AC_SUBST(TCL_LIB_FLAG) # AC_SUBST(TCL_LIB_SPEC) # AC_SUBST(TCL_STUB_LIB_FILE) # AC_SUBST(TCL_STUB_LIB_FLAG) # AC_SUBST(TCL_STUB_LIB_SPEC) # AC_SUBST(TCL_INCLUDE_SPEC) fi #} ]) #------------------------------------------------------------------------ # EM_PATH_TCLXCONFIG -- # # Locate the tclxConfig.sh file and perform a sanity check on # the TclX compile flags # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tclx=... # # Defines the following vars: # TCLX_BIN_DIR Full path to the directory containing # the tclxConfig.sh file #------------------------------------------------------------------------ AC_DEFUN([EM_PATH_TCLXCONFIG], [ # # Ok, lets find the TclX configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tcl # if test x"${no_tclx}" = x ; then #{ # we reset no_tclx in case something fails here no_tclx=true AC_ARG_WITH(tclx, AC_HELP_STRING([--with-tclx=], [directory containing TclX configuration (tclxConfig.sh) [[searches]]]), [with_tclxconfig=${withval}], [with_tclxconfig=search] ) if test x"$with_tclxconfig" = x"no" ; then #{{ AC_MSG_NOTICE([Skipping TclX configuration]) no_tclx=true else #}{ AC_MSG_CHECKING([for TclX configuration (tclxConfig.sh)]) AC_CACHE_VAL(em_cv_tclxconfig,[ # First check to see if --with-tclx was specified. if test x"${with_tclxconfig}" != xsearch ; then #{ if test -f "${with_tclxconfig}/tclxConfig.sh" ; then #{{ em_cv_tclxconfig=`(cd ${with_tclxconfig}; pwd)` else #}{ AC_MSG_ERROR([${with_tclxconfig} directory does not contain tclxConfig.sh]) fi #}} fi #} # then check for a private Tclx installation if test x"${em_cv_tclxconfig}" = x ; then #{ for i in \ ../tclx \ `ls -dr ../tclx[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../tclx[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../tclx[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tclx \ `ls -dr ../../tclx[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../tclx[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../tclx[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tclx \ `ls -dr ../../../tclx[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../../tclx[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../tclx[[8-9]].[[0-9]]* 2>/dev/null` \ ; do if test -f "$i/unix/tclxConfig.sh" ; then #{ em_cv_tclxconfig=`(cd $i/unix; pwd)` break fi #} done fi #} # check in a few common install locations if test x"${em_cv_tclxconfig}" = x ; then #{ for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/local/lib/tclx[[8-9]].[[0-9]]* 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/contrib/lib/tclx[[8-9]].[[0-9]]* 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib/tclx[[8-9]].[[0-9]]* 2>/dev/null` \ ; do if test -f "$i/tclxConfig.sh" ; then #{ em_cv_tclxconfig=`(cd $i; pwd)` break fi #} done fi #} # check in a few other private locations if test x"${em_cv_tclxconfig}" = x ; then #{ for i in \ ${srcdir}/../tclx \ `ls -dr ${srcdir}/../tclx[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ${srcdir}/../tclx[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../tclx[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tclxConfig.sh" ; then em_cv_tclxconfig=`(cd $i/unix; pwd)` break fi done fi #} ]) if test x"${em_cv_tclxconfig}" = x ; then #{{ TCLX_BIN_DIR="# no TclX configs found" AC_MSG_RESULT([not found]) else #}{ no_tclx= TCLX_BIN_DIR=${em_cv_tclxconfig} AC_MSG_RESULT([found $TCLX_BIN_DIR/tclxConfig.sh]) fi #}} fi #}} fi #} ]) #------------------------------------------------------------------------ # EM_LOAD_TCLXCONFIG -- # # Load the tclxConfig.sh file # # Arguments: # # Requires the following vars to be set: # TCLX_BIN_DIR # # Results: # # Subst the following vars: # TCLX_BIN_DIR # TCLX_SRC_DIR # TCLX_LIB_FILE # #------------------------------------------------------------------------ AC_DEFUN([EM_LOAD_TCLXCONFIG], [ if test x"$no_tclx" = x"true" ; then #{{ AC_SUBST(TCLX_LIB_SPEC,"") else #}{ AC_MSG_CHECKING([for existence of tclxConfig.sh]) if test -f "$TCLX_BIN_DIR/tclxConfig.sh" ; then #{{ AC_MSG_RESULT([loading]) . $TCLX_BIN_DIR/tclxConfig.sh else #}{ AC_MSG_RESULT([file not found]) fi #}} # AC_SUBST(TCLX_FULL_VERSION) AC_SUBST(TCLX_VERSION) # AC_SUBST(TCLX_DEFS) # AC_SUBST(TCLX_LIBS) # AC_SUBST(TCLX_BUILD_LIB_SPEC) AC_SUBST(TCLX_LIB_SPEC) # AC_SUBST(TCLX_LD_SEARCH_FLAGS) fi #}} ]) #------------------------------------------------------------------------ modules-3.2.10/configure000077500000000000000000010130751210077407400151650ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for modules 3.2. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='modules' PACKAGE_TARNAME='modules' PACKAGE_VERSION='3.2' PACKAGE_STRING='modules 3.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="version.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS EXTDIR DOT_EXT SKELPATH ETCPATH AUTOLOADPATH VERSIONPATH MODULEPATH TCLX_INCLUDE_SPEC TCLX_VERSION TCLX_LIB_SPEC TCL_INCLUDE_SPEC TCL_LIB_SPEC TCL_VERSION WITH_LOGGING STATIC RUNTEST _PHOST _CPPSTDIN X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF UNAME EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC BASEPREFIX DEFAULTPATH DATE NOTVERSIONING VERSIONING WANTS_VERSIONING am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_versioning enable_use_default enable_dependency_tracking with_x with_split_size with_static enable_shell_funcs enable_shell_alias enable_shell_eval enable_free enable_cache with_cache_umask with_debug enable_version_magic enable_beginenv enable_logging with_log_dir with_log_facility_verbose with_log_facility_info with_log_facility_debug with_log_facility_trace with_log_facility_warn with_log_facility_problem with_log_facility_error with_log_facility_fatal with_log_facility_panic with_trace_load with_trace_unload with_trace_switch with_trace_disp with_trace_list with_trace_avail with_trace_help with_trace_init with_trace_use with_trace_unuse with_trace_update with_trace_purge with_trace_clear with_trace_whatis with_trace_apropos with_tcl with_tcl_ver with_tcl_lib with_tcl_inc with_tclx with_tclx_ver with_tclx_lib with_tclx_inc with_module_path with_version_path with_tmp_dir with_man_path with_autoload_path with_etc_path with_skel_path with_dot_ext ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP XMKMF' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures modules 3.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/modules] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of modules 3.2:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-versioning use modules versioning [[yes]] --enable-use-default use DEFAULTPATH in init scripts [[yes]] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shell-funcs use sh functions [[test]] --enable-shell-alias use sh aliases [[test]] --enable-shell-eval use shell alias eval [[yes]] --enable-free use free() calls [[no]] --enable-cache use directory cache [[no]] --enable-version-magic set .version magic requirement [[yes]] --enable-beginenv use .modulesbeginenv for initial env [[test]] --enable-logging turn logging on [[no]] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-x use the X Window System --with-split-size= use split size= [[test]] --with-static=