mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 09:23:44 +00:00
Mmake.common.in:
Before this diff, there were a whole bunch of definitions between
the inclusion of Mmake.workspace and the inclusion of Mmake.params.
Move all those definitions elsewhere. Specifically, move the definitions
whose right hand sides are autoconfigured values, and which are NOT
also set by Mmake.workspace, to before both inclusions, moving related
non-autoconfigure variable definitions with them, while moving
other definitions to after both inclusions.
Document the cause of the "phasing problem" that kept the inclusion
of Mmake.params after the inclusion of Mmake.workspace (the definition
of MC), and a possible solution.
tools/stdlines_for_sh:
Add a version of stdlines for sh scripts.
16 lines
781 B
Bash
Executable File
16 lines
781 B
Bash
Executable File
#!/bin/sh
|
|
# vim: ts=4 sw=4 wm=0
|
|
# Ensure that all divider lines (lines that match the regular expression #--*#)
|
|
# in shell scripts are of two standard lengths, one short, one long.
|
|
# The long lines are intended to separate major sections of a file, while
|
|
# the short ones separate just the different parts of a section.
|
|
|
|
for f in "$@"
|
|
do
|
|
echo "${f}"
|
|
tmpf="${f}.tmp"
|
|
sed -e '/^#------------------------*#$/s//#===========================================================================#/' -e '/^#--*#$/s//#---------------------#/' < "${f}" > "${tmpf}"
|
|
sed -e 's/#===========================================================================#/#---------------------------------------------------------------------------#/' < "${tmpf}" > "${f}"
|
|
/bin/rm ${tmpf}
|
|
done
|