This is a series of updates to make building magic far less of a headache:
* Drop `csh`/`tcsh` dependency and detection from `./configure`.
* Rewrite makedbh in Python.
* Rewrite printmans in POSIX sh.
* Stop deleting Depend before every compile (which causes some files to recompile and thus increases recompile times significantly)
* Add Depend to CLEANS in scripts/defs.mak.in
* Turn POSIX suffix rule in magic/rules.mak to a pattern rule with proper prerequisites
linking it to Tk or X11 graphics. Added new command "display" which
returns the display type, which is good for finding out if the
display is "NULL". Added code to allow the wrapper to be defined
for NULL graphics with the Tk console, the main necessities of which
are to remove the "openwrapper" command, and to return immediately
from a number of tag callback functions.
number from the git repository, which is overall more reliable than
the version number, but mainly to support a common method across the
open source tools for providing information to builds like open_pdks
that may need to know what version of every tool was used for the
build.
tech file format "version" section. This can be used to specify the
version of magic that must be used to be compatible with the tech file.
This effectively supercedes the technology version number. (2) Changed
the behavior of "make" to set the version and revision numbers on doing
"make" instead of "configure". This allows the version to update
correctly after doing a "git pull" followed by "make" without doing
"configure" in between. (3) Fixed a couple of issues that were flagged
as compile-time warnings.
preproc.py script from another project. Had to further develop it to
get around the amazingly complicated preprocessor usage in the scmos
subdirectory. Needed to add handling of parameterized definitions;
could not figure out how to align the syntax used in scmos/extract_template
with any consistent syntax. Gave up and rewrote some of the contents of
extract_template to avoid the more ambiguous usage. All of this is to
support a completely deprecated scmos.tech. However, it does avoid both
the M4 and cpp preprocessors altogether. Also did auto-detection of
python3 in the configure script for use of the preproc.py preprocessor,
and applied the same preprocessor to the macro definitions.
distributed installations, where the immediate installation location
is different from the final installation location, but in the case
where it is not desirable to put the entire install hierarchy as a
subdirectory of DESTDIR.
the python preprocessor version, the techfiles and .magicrc file
will get the correct arguments, without affecting the use of CPP
in the configure script.
python3 preprocessor is captured in the variable MCPP, not CPP,
since CPP is meaningful to the make process. Also, the
MAGICDIR variable in the name needed to be escaped so that the
variable is not evaluated within the configure script.