For most users there is no need to build NEdit from source. You are recommended to use one of the binaries available from the website. However, if no binary is available for your platform, or if you want to patch NEdit, you have no other option other than building from source.
To build NEdit you need:
The two directories called source and util contain the sources for NEdit. Util should be built first, followed by source. The makefile in this directory can be used to build both in sequence if your system is one of the supported machines and no modifications are necessary to the makefiles. To build NEdit from this directory, issue the command:
make <machine-type>
where <machine-type> is one of suffixes of a Makefile in the directory makefiles. For example, to build the Silicon Graphics version, type:
make sgi
If everything works properly, this will produce two executables called nedit and nc in the directory called source.
Since executables are already available for the supported systems, you are probably not just rebuilding an existing configuration, and need to know more about how the directories are organized. The util directory builds a library file called libNUtil.a, which is later linked with the code in the source directory to create the nedit executables.
The makefiles in both directories consist of two parts, a machine dependent part and a machine independent part. The machine dependent makefiles can be found in the directory called makefiles, and contain machine specific header information. They invoke a common machine independent part called Makefile.common. To compile the files in either of these directories, copy or link one of the system-specific makefiles from the directory makefiles into the directory, and issue the command:
make -f Makefile.<machine-type>
where <machine type> is the Makefile suffix. Alternatively, you can name the file Makefile and simply type make. If no makefile exists for your system, check the ftp site for more contributed Makefiles. If you can't find one that's close, start from Makefile.generic. See the comments in this file for more porting information.
Some C preprocessor macros may be used to en/disable certain parts of the code. Usually these concern features of lesser importance being selected or certain workarounds for platform-specifc problems. Those which might be useful on more than one platform are documented in makefiles/Makefile.generic. Note that a special compilation flag, namely REPLACE_SCOPE, is currently available. Its purpose is to allow the evaluation of two alternative (but functionally equivalent) Replace/Find dialog box layouts. By default, NEdit is built with a Replace/Find dialog containing 2 rows of push buttons. Compiling with the REPLACE_SCOPE flag enables an alternative layout with a row of radio buttons for selecting the scope of the replace operations. Eventually, one of these alternatives will probably disappear, but up to now, the NEdit developers have not been able to decide which one to drop. Please give them both a try and let us know which one you prefer (via the discuss mailing list, for instance).
Command files are provided for compiling and linking files in the source and util directories. comutil.com compiles the files in the util directory and produces two library files, vmsutils.olb and libutil.olb. comnedit.com compiles and links the files in the source directory to produce the nedit.exe executable.