Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
(See src/cmd/INIT/README-mamake.md for info on *.req files.) I've been noticing a lot of duplicate -l flags to the compiler in the build log, e.g. on macOS, '-last' and '-liconv' repeated three times when linking ksh. This inelegance is due to how the *.req files are generated. Now that the code to do that has been consolidated into a couple of scripts, we can tweak this quite easily and sanitise the *.req files (which are installed and used as arch/*/lib/lib/* files). For example, src/cmd/ksh93/shell.req a.k.a. arch/*/lib/lib/shell, contents before this change (on macOS): -lshell -ldll -last -liconv -lcmd -lutil -last -liconv -last -liconv -lnetwork ...and after: -lshell -last -lcmd -ldll -liconv -lnetwork -lutil src/cmd/INIT/mkreq-maplib.sh: - At the end, do not insert an extra space before the '-l' output; a leading space is already present. src/cmd/INIT/mkreq.sh: - Instead of 'case' and 'echo', use 'grep' to look for lines that start with a space and '-l' (the dependencies of the current library). This keeps the results on one line each. - Pipe the resulting lines through 'sort -u' to remove duplicates.
- Loading branch information