Commit Graph

28 Commits

Author SHA1 Message Date
Darryl L. Miles a8f5291bd7 defs.mak.in: restore autoconf LIBS functionality
This is a standard autoconf variable, it was probably disabled due to
how the graphics/Makefile works and the more complex detection taking
place there.

Needed to use it to add -lpthread to some platforms (freebsd/openbsd)
to make it build out the box.
2025-07-29 10:50:32 -04:00
Darryl L. Miles ec7d0fc79a configure.in: AC_PROG_PERL 2025-07-29 10:50:32 -04:00
Darryl L. Miles e51189911b configure.in: AC_PROG_SED (looking for GNU sed) 2025-07-29 10:50:32 -04:00
Darryl L. Miles 49caa3267b configure: --enable-debug make this a user accessible config
This should help with automated CI testing as well, where a suite
can be run and debug enabled and checked, just via a specific
CI setup.
2025-07-29 10:50:32 -04:00
Darryl L. Miles dd49ca21d2 configure: --enable-assertions make this a user accessible config
This should help with automated CI testing as well, where a suite
can be run and assertions enabled and checked, just via a specific
CI setup.
2025-07-29 10:50:32 -04:00
Darryl L. Miles 2a78de8cb9 magic/Makefile: MAGIC_BUILDDATE and inherit values when possible
Went the whole way and make it inherit from toplevel Makefile.
2025-07-29 10:50:32 -04:00
Darryl L. Miles d13fa6872e MAKE_xxxxx: to skip building OBJs part of configure 2025-07-29 10:50:32 -04:00
Darryl L. Miles ebf2db91b1 defs.mak.in: DFLAGS_MAGICVERSION
This seems needed in multiple places so made a variable on its own.
2025-07-29 10:50:31 -04:00
Darryl L. Miles 4b094e4632 defs.mak.in: OBJS split into C_OBJS CXX_OBJS
This split has the effect (with modified .o.c Makefile rule of
correctly using the $CC for .c files and not try to build .cpp
with C compiler, which fails in oa/** for example.
2025-07-29 10:50:31 -04:00
Darryl L. Miles 73a6ac1650 defs.mak.in: Remove -I. from default compiler options
This can only cause trouble being a global default setting.

All project include files are qualified with a path prefix to help
disambiguate duplication of header file names to effectively provide
a namespace.

When removing it nothing seemed break.  Maybe more configurations
should be tested.  They were all ok.
2025-07-29 10:50:31 -04:00
Darryl L. Miles 271aef82bd defs.mak.in: replace backtick with $(shell ...)
Previously the variable resolution was passed to compiler command line
when ideally this only needs to be resolved once per build and the
entrie build uses the same value.

Compiler command line is computed at least once per file (plus Depends
pass), so this is forking at least 5 extra times during the build.

This improves things somewhat so resolution is performed less.

This may have the effect of making the build appear faster when
ccache is working.  As the command line options maybe seen as a
constant.
2025-07-29 10:50:31 -04:00
Darryl L. Miles 0dccf5826d defs.mak.in: ARFLAGS = cr (removed 'v') 2025-07-29 10:50:31 -04:00
Darryl L. Miles f15e7675cd defs.mak.in: Add RMDIR MKDIR MV LN SED common tools 2025-07-29 10:50:31 -04:00
Darryl L. Miles e54111cf6f configure.in: X11 detection and option order
The -L option needs to be placed before the -l it needs to affect.
This maybe important on MacOSX where a nonstandard/optional package
provides X11 support so the locations are not in system locations.
2024-12-26 12:52:25 -05: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
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 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 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 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 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 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
Tim Edwards cfccdb84c1 Rewrote the configuration scripts, makefiles, and some initialization
routines to use the Tcl and Tk stubs libraries.
2017-10-13 10:28:07 -04:00
Tim Edwards 21d558c67d Changed the definition of CPP again so that even in the absence of
the python preprocessor version, the techfiles and .magicrc file
will get the correct arguments, without affecting the use of CPP
in the configure script.
2017-09-01 08:40:58 -04:00
Tim Edwards 7aebad285d Corrected the configure.in and defs.mak.in file so that the
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.
2017-08-25 14:13:30 -04:00
Tim Edwards 231a299b16 Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00