-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As I begin to understand this little mamake critter on a deeper level, I'm seeing things that could be done better. src/cmd/INIT/mamake.c: - Remove unused state struct members left from long-removed code. state.peek was still checked but never set as of 2005-01-31 93q. - Make the state.input buffer locally scoped to input(). It returns a pointer to it, so state.input was never addressed directly. - require(): For each library libFOO, don't define an undocumented variable named -lFOO in addition to mam_libFOO. This was for recursion handling, but it's more elegant to use mam_libFOO for that without defining an extra, otherwise unused variable. - require(): Sanitise the probe shell script to check for -lFOO. No need to 'cd /tmp'; we're in our own build directory already. Using ${!-$$} instead of $$ makes no sense (there is no $! here as this script has not launched any background jobs). - make(): case KEY('b','i','n','d'): Do not attempt to bind to files called '-lFOO'. Those values indicate dependencies on system libraries which are dealt with by passing them as compiler flags. Creating a dependency rule only makes sense if the value was resolved to a path to a *.a library archive that we built, whose time stamp can be checked. A simple check for *t == '/' deals with that.
- Loading branch information
Showing
2 changed files
with
40 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters