W1086 Merlin Build System
A Brief History of the Make Utility
Make originated with a visit from Steve Johnson (author of yacc, etc.), storming into my office, cursing the Fates that had caused him to waste a morning debugging a correct program (bug had been fixed, file hadn't been compiled, cc *.o was therefore unaffected). As I had spent a part of the previous evening coping with the same disaster on a project I was working on, the idea of a tool to solve it came up. It began with an elaborate idea of a dependency analyzer, boiled down to something much simpler, and turned into Make that weekend. Use of tools that were still wet was part of the culture. Makefiles were text files, not magically encoded binaries, because that was the Unix ethos: printable, debuggable, understandable stuff. - Stuart Feldman, The Art of Unix Programming, Eric S. Raymond 2003
As we begin our journey through Computer Science and, in particular, programming, we'll need to learn how to build our projects. In some cases building a project (in any language) is a trivial process, in other cases it can be quite complex. The Merlin Build System abstracts away these potential complexities through a series of simple commands.
In order to build any Merlin project, ensure that your current directory is either in the project root or some child directory of that root. Then execute the build command:
john-williams@codermerlin:~/Merlin/M1272-10 Comparisons/C101 Is It Greater [Swift]$ build
In order to run any Merlin project, ensure that your current directory is either in the project root or some child directory of that root. Then execute the run command:
john-williams@codermerlin:~/Merlin/M1272-10 Comparisons/C101 Is It Greater [Swift]$ run
In some cases you'll need to use dynamic libraries. The Merlin Build System will manage the configuration settings to make this happen, but you'll need to edit a simple text file first. The file needs to be located in the same directory as make.sh and must be called dylib.manifest.
File Format of dylib.manifest
There are two line formats. The first is for system-versioned libraries:
The second format facilitates simple development of libraries by easily allowing a local directory as a source.
project LOCAL path
Igis LOCAL /home/john-williams/projects/Igis
An additional available option is to suffix the modifier 'MODULE' after either line format. This has the result of suppressing the suffix of ".build/$configuration" to the libraryPath. This is appropriate for Modules which don't have a build process, such as CNCURSES.
CNCURSES 1.0.0 MODULE
Thus, a complete example would be:
Igis LOCAL /home/john-williams/projects/Igis Scenes 0.9.1 Curses 1.0.0 CNCURSES 1.0.0 MODULE
Listing Dynamic Libraries
In order to list the dynamic libraries used in any Merlin project, ensure that your current directory is either in the project root or some child directory of that root. Then execute the dylib command:
Note that nothing will be displayed if no error occurs and no dynamic libraries have been used.
If you are using dynamic libraries you may need to generate a configuration file for emacs. In most cases, this won't be necessary, because the Shell repository will include the required configuration files for you. However, if you're building a project on your own or your want to use your own libraries, you'll need to create the configuration file yourself. Be sure that you're in the root of your project, the same location as the make.sh and dylib.manifest files. Then, execute the dylibEmacs command:
- Make Software (Wikipedia)