New package "m3configvars". This does the same thing as "m3config", but instead of constants for the configuration parameters, it uses variables that are initialized at start up. This makes it much easier to change the Modula-3 installation directory, by simply building a new shared library for "m3configvars". With this approach, there is no need to recompile or even relink applications. Index: m3/m3configvars/src/COPYRIGHT =================================================================== RCS file: /home/jdp/m3-cvs/m3/m3configvars/src/COPYRIGHT,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 COPYRIGHT --- COPYRIGHT 1996/09/24 05:21:56 1.1.1.1 +++ COPYRIGHT 1996/09/24 05:32:39 @@ -0,0 +1,93 @@ + + Digital License Agreement + + SRC Modula-3 + + 1. Grant Of License. Digital Equipment Corporation, having a principal + office at 146 Main Street, Maynard, MA 01754 ("DIGITAL") grants to + you ("LICENSEE") the non-exclusive, non-transferable, royalty free + right to use, modify, reproduce and distribute SRC Modula-3 ("SOFTWARE") + subject to the terms set forth herein. Any distribution of SOFTWARE + shall include this Digital License Agreement in human readable form. + + 2. Title to Intellectual Property and Software. Subject to the limited + rights and licenses granted under this License Agreement, all rights, + title and interests including patent, copyright, and trademark rights + in SOFTWARE are and shall remain vested in DIGITAL to the exclusion + of LICENSEE. DIGITAL represents and warrants that DIGITAL has the + legal right to grant such licenses as are expressly granted under + this Agreement. + + 3. Copyright. The SOFTWARE is owned by DIGITAL or its suppliers and is + protected by United States copyright laws and international treaty + provisions. Therefore, you must treat the SOFTWARE like any other + copyrighted material (e.g., a book or musical recording) except + that you may use the SOFTWARE as provided in this Digital License + Agreement. + + 4. Improvements. LICENSEE hereby grants to DIGITAL a non-exclusive, + non-transferable, royalty free right to use, modify, reproduce + and distribute with the right to sublicense at any tier, any + improvements, enhancements, extensions, or modifications that + LICENSEE make to SOFTWARE, provided such are returned to DIGITAL + by LICENSEE. + + 5. DISCLAIMER OF WARRANTY. Because the SOFTWARE is a research work and + not a released product, it is provided "AS IS" WITHOUT WARRANTY OF ANY + KIND AND WITHOUT ANY SUPPORT SERVICES. EXCEPT AS SPECIFICALLY PROVIDED + ABOVE IN SECTION 2, DIGITAL FURTHER DISCLAIMS ALL OTHER EXPRESS OR + IMPLIED WARRANTIES OF MERCHANTABILITY OR OF FITNESS FOR A PARTICULAR + PURPOSE. THE ENTIRE RISK ARISING OUT OF THE USE OR PERFORMANCE OF + THE SOFTWARE REMAINS WITH YOU. + + 6. Limitation of Liability. IN NO EVENT SHALL DIGITAL OR ITS SUPPLIERS BE + LIABLE IN AN AMOUNT THAT EXCEEDS THE LICENSE FEE PAID BY LICENSEE FOR + ANY DAMAGES (INCLUDING, WITH LIMITATION, DAMAGES FOR LOSS OF BUSINESS + PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER + PECUNIARY LOSS), REGARDLESS OF THE FORM OF CLAIM OR ACTIONS, ARISING + OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE OR DOCUMENTATION, + EVEN IF DIGITAL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + BECAUSE SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY + FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT + APPLY TO YOU. + + 7. Acknowledgement of Allocation of Risk. LICENSEE acknowledges and agrees + that the fees charged by DIGITAL in this Agreement reflect the allocation + of risks provided by the foregoing limitation of liability. LICENSEE + acknowledges and represents that it has read and understands these + allocations of risk limiting the liability of DIGITAL and that it + understands that a modification of the allocation of risks set forth + in this agreement would affect the fees charged by DIGITAL, and that + LICENSEE, in consideration of such fees, agrees to such allocations + of risk. + + 8. LICENSEE INDEMNIFICATION. LICENSEE SHALL INDEMNIFY DIGITAL AGAINST + ALL COSTS AND DAMAGE JUDGEMENTS, INCLUDING ATTORNEY'S FEES AND COSTS + OF DEFENSE, INCURRED BECAUSE OF CLAIMS OF DAMAGE ARISING FROM LICENSEE'S + POSSESSION OR USE OR INABILITY TO USE SOFTWARE. + + 9. GOVERNMENT RESTRICTED RIGHTS. The SOFTWARE and documentation are provided + with RESTRICTED RIGHTS. Use duplication, or disclosure by the Government + is subject restrictions as set forth in subparagraph (c)(1)(ii) of The + Rights in Technical Data and Computer Software clause in DFARS + 252.227-7013, or subparagraphs (c)(i) and (2) of the Commercial Computer + Software -- Restricted Rights at 48 CFR 52.227-19, as applicable. + Manufacturer is Digital Equipment Corporation, 130 Lytton Avenue, + Palo Alto, CA 94301-1044. + +10. Severability. If any provision of the Agreement is held illegal or + unenforceable by any court of competent jurisdiction, such provision + shall be deemed separable from the remaining provisions of this Agreement + and shall not affect or impair the validity or enforceability of the + remaining provisions of this Agreement. + +11. Governing Law. This Agreement is governed by the laws of the + Commonwealth of Massachusetts. + +12. Publicity. You my not use the name of DIGITAL in any advertisement, + press release or other publicity with reference to SRC Modula-3 + without prior written consent of DIGITAL. + +13. Should you have any questions concerning this Agreement, or if you + desire to contact Digital for any reason, please do so via E-mail: + M3-REQUEST@SRC.DEC.COM. Index: m3/m3configvars/src/M3ConfigVars.i3 =================================================================== RCS file: /home/jdp/m3-cvs/m3/m3configvars/src/M3ConfigVars.i3,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 M3ConfigVars.i3 --- M3ConfigVars.i3 1996/09/24 05:21:56 1.1.1.1 +++ M3ConfigVars.i3 1996/09/24 05:32:39 @@ -0,0 +1,41 @@ +(* Copyright (C) 1994, Digital Equipment Corporation *) +(* All rights reserved. *) +(* See the file COPYRIGHT for a full description. *) + +(* This interface exports the configuration information + used by m3build and quake. These constants were defined + when Modula-3 was installed. *) + +INTERFACE M3ConfigVars; + +VAR (* CONST *) (* misc. configuration *) + TARGET: TEXT; + OS_TYPE: TEXT; + WORD_SIZE: TEXT; + BUILD_DIR: TEXT; + PATH_SEP: TEXT; + M3: TEXT; + +VAR (* CONST *) (* installation directories *) + BIN_INSTALL: TEXT; + LIB_INSTALL: TEXT; + DOC_INSTALL: TEXT; + PKG_INSTALL: TEXT; + MAN_INSTALL: TEXT; + EMACS_INSTALL: TEXT; + HTML_INSTALL: TEXT; + +(* On some systems (e.g. AFS) you must install public files + in a different place from where you use them. The paths + below specify where to find the installed files. *) + +VAR (* CONST *) + BIN_USE: TEXT; + LIB_USE: TEXT; + DOC_USE: TEXT; + PKG_USE: TEXT; + MAN_USE: TEXT; + EMACS_USE: TEXT; + HTML_USE: TEXT; + +END M3ConfigVars. Index: m3/m3configvars/src/m3makefile =================================================================== RCS file: /home/jdp/m3-cvs/m3/m3configvars/src/m3makefile,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 m3makefile --- m3makefile 1996/09/24 05:21:56 1.1.1.1 +++ m3makefile 1996/09/24 05:32:39 @@ -0,0 +1,57 @@ +% Copyright (C) 1994, Digital Equipment Corporation +% All rights reserved. +% See the file COPYRIGHT for a full description. +% +% Last modified on Wed Jan 31 15:10:00 PST 1996 by jdp@polstra.com +% modified on Thu Dec 1 09:52:35 PST 1994 by kalsow +% modified on Mon Jan 18 11:50:18 PST 1993 by muller + +readonly M3ConfigVars_body = [ + "(* Copyright (C) 1994, Digital Equipment Corporation *)", + "(* All rights reserved. *)", + "(* See the file COPYRIGHT for a full description. *)", + "", + "MODULE M3ConfigVars;", + "", + "BEGIN", + " (* misc. configuration *)", + " TARGET := \"" & escape(TARGET) & "\";", + " OS_TYPE := \"" & escape(OS_TYPE) & "\";", + " WORD_SIZE := \"" & escape(WORD_SIZE) & "\";", + " BUILD_DIR := \"" & escape(DEFAULT_BUILD_DIR) & "\";", + " PATH_SEP := \"" & escape(SL) & "\";", + " M3 := \"" & escape(M3) & "\";", + "", + " (* installation directories *)", + " BIN_INSTALL := \"" & escape(BIN_INSTALL) & "\";", + " LIB_INSTALL := \"" & escape(LIB_INSTALL) & "\";", + " DOC_INSTALL := \"" & escape(DOC_INSTALL) & "\";", + " PKG_INSTALL := \"" & escape(PKG_INSTALL) & "\";", + " MAN_INSTALL := \"" & escape(MAN_INSTALL) & "\";", + " EMACS_INSTALL := \"" & escape(EMACS_INSTALL) & "\";", + " HTML_INSTALL := \"" & escape(HTML_INSTALL) & "\";", + "", + " BIN_USE := \"" & escape(BIN_USE) & "\";", + " LIB_USE := \"" & escape(LIB_USE) & "\";", + " DOC_USE := \"" & escape(DOC_INSTALL) & "\";", + " PKG_USE := \"" & escape(PKG_USE) & "\";", + " MAN_USE := \"" & escape(MAN_INSTALL) & "\";", + " EMACS_USE := \"" & escape(EMACS_INSTALL) & "\";", + " HTML_USE := \"" & escape(HTML_INSTALL) & "\";", + "END M3ConfigVars." +] + +if defined("_all") + > ".M3ConfigVars.m3" in + foreach line in M3ConfigVars_body + write (line, CR) + end + end + cp_if (".M3ConfigVars.m3", "M3ConfigVars.m3") +end + +import ("m3core") +interface ("M3ConfigVars") +derived_implementation ("M3ConfigVars") +export_interface ("M3ConfigVars") +library ("m3configvars")