Copyright (c) 1991, 1993 Peter J. Nicklin. Copyright (c) 1991, 1993 Version Technology. All Rights Reserved. $License: VT.1.1 $ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. (3) All advertising materials mentioning features or use of this software must display the following acknowledgement: ``This product includes software developed by Version Technology.'' Neither the name of Version Technology nor the name of Peter J. Nicklin may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY VERSION TECHNOLOGY ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL VERSION TECHNOLOGY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Report problems and direct questions to nicklin@netcom.com $Header: README,v 4.7 93/05/25 23:02:58 nicklin Exp $ Title: mkmf makefile editor (revision 4.11) Author: Peter J. Nicklin Address: Version Technology 1540 Hilton Court San Jose, California 95130 Telephone: (408) 379-0171 Email: nicklin@netcom.com Description: The mkmf makefile editor creates program and library makefiles for the make(1) command. Mkmf has the following features: - Automatically inserts source and object code file names in makefiles. - Provides standard makefile templates for programs and libraries. - Allows user-defined makefile templates. - Generates included file dependencies for C, C++, Pascal, and Fortran source code - Allows arbitrary editing of makefiles with a regular text editor Installation instructions (portable makefiles): 1. The default location of mkmf is in /usr/contrib. Alter the INSTALLDIR definition in mkmf/Makefile to change this location. 2. Create directories $INSTALLDIR/bin and $INSTALLDIR/lib/mkmf. 3. Choose a directory in which to install the manual page, and edit the DEST macro in mkmf/man/man1/Makefile. The makefile assumes that you want to install the formatted manual page in $INSTALLDIR/man/cat1. Alter the makefile to suit your own system. 4. Change to the mkmf directory and execute "make install". If something goes wrong, don't panic. Just fix the problem and restart "make install". Installation instructions (4.4BSD makefiles): 1. The default location of mkmf is in /usr/contrib. Alter the INSTALLDIR definition in mkmf/src/Makefile and mkmf/templates/Makefile to change this location. 2. Create directories $INSTALLDIR/bin and $INSTALLDIR/lib/mkmf. 3. Change to the mkmf directory and execute "make install". If something goes wrong, don't panic. Just fix the problem and restart "make install". Testing: 1. A number of tests have been included with this version of the makefile editor. To test mkmf, carry out the following steps: 2. Set the PROJECT environment variable to correspond to the pathname of the topmost directory in the mkmf directory hierarchy (i.e. the pathname of the directory in which you are reading this README file). 3. Change to the tmp directory and execute the ptest shell command. Porting Hints: 1. Examine the config.h file in the src directory. Several definitions control the conditional compilation of the mkmf source code for variants of the UNIX operating system. You can build a profile of your operating system environment with these definitions and include it in this file. You may wish to send this profile to the address above so that it can be supported in future versions of mkmf. 2. Examine the Makefile in the src directory. If your C preprocessor does not support a system-specific definition, you will need to add a -D definition to CFLAGS corresponding to the profile that you have created in config.h. Use the Apollo SYSV or Cray UNICOS5 definitions as examples. 3. The default location for the standard makefile templates is /usr/contrib/lib/mkmf which is defined in Mkmf.h. You can specify a different location via the INSTALLDIR definition which you can set via a -D option in the CFLAGS makefile macro. 4. The standard makefile templates use the cp(1) command to install files. You may want to redefine the INSTALL macro to use a different command such as /etc/install. Licensing and Support: Revision 4.11 of mkmf has been contributed to the 4.4BSD Berkeley Software Distribution by Version Technology subject to the conditions included at the top of this file. Alternative licensing and support arrangements are also available. Contact Version Technology for details. Bugfixes/Changes for 4.4BSD: 1. Mkmf ports more readily to both 4BSD and System V UNIX systems. In particular, mkmf has been ported to Hewlett-Packard HP-UX 7.0 on the HP9000 Series 300 and and 800 systems, HP-UX 8.0 on the HP9000 Series 300 and 700 systems, Apollo Domain/OS 10.2 and 10.3 on a DN4500, Sun OS 4.1 on a 4/110, IBM AIX 3.1 on an RS/6000, Apple Macintosh A/UX 2.0.1 on a Macintosh IIfx, Cray UNICOS 5.0 and 6.0 on a Cray Y/MP, Xenix, and 4.4BSD. 2. Mkmf searches for C++ header files in /usr/include/CC. 3. Mkmf recognizes C++ source files with suffixes such as .cc, .cxx, .cpp, and .C, and C++ header files with suffixes such as .hxx, .hpp, and .H. 4. Mkmf recognizes C++ -I options in CXXFLAGS, CCFLAGS, and C++FLAGS. 5. Mkmf supports the VPATH source directory path mechanism of make(1). For versions of make(1) that don't recognize VPATH, the -S option symbolically links files from directories in VPATH into the current directory. 6. Mkmf optionally generates dependencies for /usr/include files if the SYSHDRS macro is specified in the makefile. 7. Mkmf reads the environment and recognizes all variables as macro definitions. The -e option allows the environment variables to override the macro definitions in the makefile. 8. Mkmf supports alternate archive libraries via the LPATH macro and the -L linker option. 9. Mkmf supports language-dependent templates via the -M option. The templates now reside in /usr/contrib/lib/mkmf. The location of this directory may be specified via the INSTALLDIR compile- time option in the source makefile. 10. Mkmf generate library makefiles with target or dependency names as archive library members if the -L option is specified. 11. Mkmf avoids adding source files to the SRCS macro definition if they can be generated by source transformation rules. 12. Mkmf looks for #include references in directories specified by -I preprocessor flags. 13. Mkmf accepts macro names which include underscores. 14. Mkmf ignores SCCS files and files beginning with #. 15. Mkmf allows Apollo Domain/OS pathnames beginning with //. 16. Mkmf uses the cp(1) command to install programs and libraries instead of /etc/install. Bugfixes/Changes for 4.3BSD: 1. Mkmf was previously part of the SPMS Software Project Management System. It is now completely independent. 2. Mkmf now searches for include files in the directory containing the file currently being processed, rather than the current working directory. This only affects nested include files which are external to the current working directory. 3. Mkmf now reads multiple -I options in CFLAGS and FFLAGS correctly. 4. Mkmf can now process the example presented by Kim Walden in Software-Practice and Experience, vol. 14, no. 6, pp. 575-585, June 1984.