Commit Graph

73 Commits

Author SHA1 Message Date
Ryan Carsten Schmidt 8a93d6136b
Use raw strings in preproc.py
Avoids "SyntaxWarning: invalid escape sequence" with Python 3.12.
2024-01-23 09:38:23 -06:00
Tim Edwards df6333bb7b Modified the "makedbh.in" script ("makedbh", after running
configure) so that it does not use python-3.6-style f-strings,
and so is backwardly compatible with any python-3 revision.
2023-10-28 12:14:26 -04:00
Donn 86630fcc02 Allow Python 3 to not be in PATH, Fix `clean` re-building dependencies
* Adds Python 3 to macOS requirements
* Gate include of `DEPEND_FILE` in `rules.mak` on whether the target is `clean` or not (the include isn't pre-processed; it will attempt to build everything in the include otherwise)
* Make `makedbh` a configurable file- the shebang now uses the discovered path for Python3
2023-08-29 22:43:11 +03:00
Tim Edwards 8e25303db4 Corrected what looks like a very long-standing error in the DRC
engine.  Rule checks of triggering rules are not subject to
clipping to the clip area.  However, they *must* be clipped to
the (larger) overall DRC check area, because no layout is valid
outside of that area.  This clipping was missed, allowing
triggering rules to trigger on areas outside the valid layout,
resulting in mysterious false-positive DRC errors.  This has
been fixed.
2023-08-27 14:21:02 -04:00
Donn 02e16b8bce Build Updates
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
2023-08-25 12:24:14 -04:00
Johan Euphrosine e249e7a0e3 configure: cleanup diff 2023-07-12 05:04:18 +09:00
Johan Euphrosine f5793bbefb configure: add asmjs-unknown-emscripten target 2023-07-12 04:44:37 +09:00
Johan Euphrosine 96eb275622 quick and dirty emscripten port 2023-07-12 00:31:37 +09:00
Tim Edwards 5aee1dcb5a Added "-Werror=implicit-function-declaration" to CFLAGS in the
configure script, now that Alessandro De Laurenzis has cleaned
up the code so that it will compile with the setting (now, just
need to do the same thing for "implicit-int"!).
2022-10-29 10:04:18 -04:00
Alessandro De Laurenzis b306a39560 Compatibility with C99 standard
This commit makes the code (mostly) C99-compatible, enabling to compile
it without the -Wno-error=implicit-function-declaration flag. This
way, Magic becomes usable on arm64 architectures, specifically on Apple
computers with M1/M2 SoC.
2022-10-29 06:07:46 +02:00
Brad Smith 0bfb7c80d3 Simplify OpenBSD shared lib handling 2022-08-22 12:19:42 -04:00
Tim Edwards bbcc05c004 Corrected a (very bad) accidental deletion in the last commit that
causes the compile to fail.
2022-05-29 21:20:32 -04:00
Tim Edwards c997f4cccf Modified the configure script and Makefiles so that systems that do
not include zlib by default will pick it up from the compile line.
2022-05-28 17:51:20 -04:00
Tim Edwards b643f44659 Modified the configure script to allow zlib compression to be
disabled from the configure command line.  Corrected an error with
the non-zlib-enabled compile.
2022-05-12 09:27:32 -04:00
Tim Edwards 250d811fc5 Removed the unused former checks for system "gzip" and "gunzip" from
the configuration script.
2022-05-10 09:24:46 -04:00
Tim Edwards 371018ae4b Implemented native gzip compression/decompression using zlib routines.
Compression levels of the output can be controlled with the "gds
compress [<value>]" command, where <value> 0 (default) is uncompressed
output, 6 is "normal" gzip compression, and 9 is maximum compression.
2022-05-10 09:19:39 -04:00
Tim Edwards 85d8ad6622 Added the capability to handle compressed GDS files through the use
of systems calls to "gzip" and "gunzip".  A compressed GDS file can
be made simply by doing "gds write <name>.gds.gz", and can be read
simply by doing "gds read <name>.gds.gz".  Names of compressed files
can be put in the GDS_FILE property of a cell.
2022-05-05 17:40:56 -04:00
Mohamed Gaber 9bf3d76260 Mac Build Fixes
+ Add "smoke test" build CI to Github Actions
+ Added a configure_mac script (requires brew)
~ caddr_t -> void* (was never a part of any UNIX standard)
2022-05-03 08:30:39 -04:00
Ryan Schmidt 874209b884 Fix inadequate quoting in MSED variable
Fixes:

sed: 1: "s/\/\\/
": unescaped newline inside substitute pattern
2022-04-13 08:35:14 -04:00
Ryan Schmidt b4d635a3ab Use the python3 that configure found
When running preproc.py, use the python3 that the configure script found
instead of assuming (via preproc.py's #! line) that it is called
"python3" and is located in PATH. This allows the user to specify a
different python3 by running e.g.:

./configure ac_cv_path_PYTHON3=/path/to/python3
2022-04-13 08:32:05 -04:00
Tim Edwards 222639e4c4 Corrected the diagnostic output of "configure" to no longer refer
to the "make.log" and "install.log" files, which no longer exist.
2022-03-30 17:38:40 -04:00
Tim Edwards e675decfc0 Cleaned up a bunch of stuff around "magicdnull", starting with not
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.
2022-03-30 10:55:08 -04:00
Tim Edwards 0c584f9e77 Modified the configure scripts and makefile per Proppy's comments
in github issue #149.  This causes magic to no longer write log files
for "make" and "make install" but will properly exit with a non-zero
return code on any error during compile.

Also:  Corrected the command "tech drc surround <type1> <type2>" so
that it now returns the correct value when <type1> and <type2> are in
the same plane.  Added new command "tech drc directional <type1> <type2>"
which works the same way as "tech drc surround" except for directional
surround rules.  Used this to generate vias from "def write" with the
correct metal surround amounts included in the via definiton.  The
route analysis then ignores tile slivers that make up the surrounding
material around contacts.  Also implemented a method that handles
routes that are made of multiple thin tiles due to the maximum horizontal
stripes rule.  Now magic handles "def write" well except for not dealing
with non-minimum-width routes unless they're specifically called out as
"special" nets.
2022-03-29 16:52:01 -04:00
Tim Edwards 3bc80a9869 Reran autoconf after merging changes from configure.in. 2022-03-28 22:35:49 -04:00
Johan Euphrosine 6947b8c6d7 scripts/configure: enable building without x 2022-03-28 22:35:19 -04:00
Tim Edwards bae5d9cd06 Added a command-line option "magic --commit" which provides the commit
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.
2022-02-25 09:56:22 -05:00
Tim Edwards 6ecd077ab4 Restored compiling of the non-Tcl/Tk version of magic. This has
traditionally been kept for backwards compatibility.  However, the
operation of "ext2spice" and "ext2sim" as separate programs has
become extremely difficult to maintain, and so it has been dropped
in favor of folding both into the program as commands, as was done
a long time ago in the Tcl/Tk version.
2022-02-08 16:12:07 -05:00
Tim Edwards 1bb4cb92ea Played around with the file locking and discovered to my chagrin that
whenever a process writes a cell to disk, it immediately releases the
file lock it had on that cell, which is clearly not the intent of file
locking.  Fixed this issue.  On a related topic, revised the "cellname
writeable" command so that it can make a cell editable even if the cell
has an advisory lock and cannot be made writeable.  Perhaps there should
be a clearer distinction here between "writeable" and "editable".  Also:
Reconsidered the previous commit, which removed the "--disable-locking"
from the configuration options.  Because some operating systems may not
implement fnctl()-based file locking (Cygwin, for one, apparently doesn't),
it is still useful to be able to completely remove the function, in case
the operating system will fail to recognize the fnctl() values in the
code.  Now, file locking behavior can be permanently removed through the
configuration option, or temporarily disabled from the command line.
2022-01-01 16:53:46 -05:00
Tim Edwards e4d1c29112 Reworked the file locking option as a command instead of as a
compile-time option.  The behavior can now be controlled from
within the program with "locking disable" or "locking enable".
2022-01-01 14:28:59 -05:00
Tim Edwards cf28ad6cf9 Removed a bogus setting for freeBSD that was pointed out by Brad
Smith and which had escaped my attention.  The commit from 8/3/2019
fixed an obvious fatal error but just replaced it with something
syntactically clean but nonsensical.  This commit just removes the
questionable line altogether.
2021-12-29 21:14:44 -05:00
Tim Edwards 6adcd2dc74 Updated the version to go along with the merge of pull request
112 from Brad Smith.  Also ran autoconf, since change was made
to configure.in and the standard instructions don't call for
autoconf to be run.
2021-12-29 21:06:48 -05:00
Brad Smith 60b2660b39 Eliminate bogus clearing of CPPFLAGS so the contents of CPPFLAGS
is properly passed down throughout the autoconf script.
2021-12-29 19:03:37 -05:00
Keno Fischer 5b6692a914 Add configure flag for wish binary
At the moment the build system hardcodes the path
to the wish binary as it was found at compile time.
For relocatability add a configure flag that allows
the build driver to specify how to invoke the wish
binary at runtime.
2021-01-04 09:34:31 -05:00
Anton Blanchard a31bd9f003 Update config.guess/config.log
The current version doesn't understand ppc64le Linux.
2020-12-24 21:59:14 -05:00
Tim Edwards ba77257afa Several changes and updates: (1) Added a new keyword "required" to the
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.
2020-12-16 11:49:24 -05:00
Tim Edwards f6de28c760 Corrected defs.mak.in to use @LD@ passed from the configure script
instead of hard-coding "ld" for the LINK variable.
2020-06-29 11:07:43 -04:00
Tim 'mithro' Ansell b28d10f80d Convert $Id$ placeholders to $Header$ placeholders. 2020-05-23 17:00:38 -04:00
Tim 'mithro' Ansell a5f050ce21 Convert expanded $Id:XXXXX$ values back to placeholder $Id$ 2020-05-23 17:00:38 -04:00
Tim Edwards 2db6a6849a Finally rid myself of the C preprocessor. Took a moderately-developed
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.
2020-02-19 14:25:58 -05:00
Tim Edwards da7cc2096d Missed a number of Makefiles in directories two levels down. 2020-01-28 13:10:31 -05:00
Tim Edwards 4c5f027104 Correction to the configuration for distributed install. 2020-01-28 12:29:44 -05:00
Tim Edwards bc00b5578b Implemented a new configuration variable "dist_prefix" for
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.
2020-01-28 10:40:01 -05:00
Roman-Parise 1edccafb2c Removed files in .gitignore from repo 2019-08-03 12:19:38 -04:00
Roman-Parise d235e01b2d Edited configure scripts for FreeBSD installation 2019-08-03 12:19:38 -04:00
Tim Edwards 24786b208a Corrected a badly-implemented search for electrical connectivity
through labels with the same text (particularly necessary for
abstract views, since the real connectivity may not be represented).
The original implementation could generate very deep subroutine call
stacks and lead to stack overflow.  The new implementation performs
the same check but without the deep nesting.
2019-05-22 10:38:00 -04:00
Tim Edwards 4da51bc42a Modified the "makedbh" script to avoid intermixing "printf" and
"echo", because there is at least one OS variant out there where
the two buffer independently and cause the output to have lines
out of order.  The script had previously used "printf" because
"echo -n" is not POSIX-compliant and so not necessarily universally
compatible.  The script was changed to use "printf" throughout.
2018-12-07 10:10:22 -05:00
Tim Edwards 193493a0cc Corrected an error in the DEF file read routine's check on via
DRC rules, which was conflating magic and CIF tile types,
resulting in incorrect reading of via layers.
2018-07-19 10:23:30 -04:00
Tim Edwards 3bf2441818 Last update contained an error in writing database files in which
the path component of the use def was interpreted as being relative
to the parent when reading the cell def but not when writing,
resulting in paths being interpreted incorrectly.
2018-04-06 12:50:37 -04:00
Tim Edwards c97ff198b9 Corrected an extresist error that had an incorrect interpretation
of the return code from reading the sim file and therefore failed
to read the nodes file, causing node information to go missing.
2018-01-02 09:37:44 -05:00
Tim Edwards f4ae5d8789 Corrected extended bounding box for LEF-derived views setting
FIXED_BBOX;  same change made to magic version 8.1.
2017-12-13 11:16:02 -05:00