The platform /usr/bin/sed does this:
/usr/bin/sed -e "/#/D" -e "/ \//s/ \/.*\.h//" -e "/ \\\/D" -i Depend$PPID.tmp
sed: -I or -i may not be used with stdin
But a filename was specified, so the error should be file does not exist
Example build issue using SunOS Solaris solaris 5.11 11.4.42.111.0 i86pc i386
with gcc version 5.5.0 (GCC).
It turns out the definition is not used by the magic codebase. So only the
macro name is changed by this commit.
This platform also has a definition for FREAD but the MacOS patch can be used
to rename that.
In file included from DBio.c:51:0:
../utils/magic.h:141:0: warning: "FOPEN" redefined
#define FOPEN gzopen
^
In file included from DBio.c:30:0:
/usr/include/sys/file.h:74:0: note: this is the location of the previous definition
#define FOPEN 0xffffffff
^
In file included from DBio.c:51:0:
../utils/magic.h:144:0: warning: "FREAD" redefined
#define FREAD(a,b,c,d) gzread(d,a,b*c)
^
In file included from DBio.c:30:0:
/usr/include/sys/file.h:75:0: note: this is the location of the previous definition
#define FREAD 0x01 /* <sys/aiocb.h> LIO_READ must be identical */
^
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.
Previously it would only build the 'scmos' subdir when the
'make install' target is running, which is done sudo. This
would result in a number of files in scmos/cif_template/objs
to be owned by 'root'.
Renamed TECH to TECHS which is inline with the other caregories
MODULES and LIBS.
Remove limited use HAVE_ZLIB wrapper API into separate header as
utils.h is used in many places and most source files don't need
to drag in the header file from this external dependency.
Copyright date(s) taken from original source file / git blame.
This is a low level thing that other lowlevel API (platform shims for
strlen_s() and ctime_r() want to make use of, without any application
global pollution).
Copyright date(s) taken from git blame information for moved lines.
The ../database/database.h dependency is already described (only when
necessary) inside the Depend file for the specific complication unit.
Not all objects are affected by database.h changes, so it doesn't need
to be forced as a dependency for all OBJS.
Depend itself was never rebuilt when a source file changed. This now
happens, however technically the superior MAKE process needs to restart
so it includes the new updated copy of Depend file we just updated.
However in practice when developing, modifying #include directives does
not happen often and doing 'make; make' will fix the issue performing
an incremental build both times. So a minor caveat.
Previously when a single source file was changed the entire module was
recompiled, but we have a Depends file to manage the incremental build
problem and we are not really using it (if we always recompile the entire
module due to any one file change, there would be no need for Depends).
Now when developing, a single *.c file change results in the Depends
being rebuilt, then the single file compiled, then the module relinked.
This is exactly the kind of incremental build speedup having a Depends
file is designed to achieve.
Additionally the use of a direct pipeline to create the file does not
manage error scenarios. MAKE itself is driven by file existance and
their timestamps for targets, so even if 'make depend' failed, it
would still create an output file that MAKE can not distunguish
between a well formed (possibly empty) Depend file and an incorrectly
created partial. So building in a *.tmp file first and only if all the
commands are successful then rename to target filename. This has the
effect of making 'make depend' able to fail now.
This was more a clarity matter as relocatable autoconf makes all
references to the path look longer and more unweildly making it
a variable makes shorter and easier to read work through.
Especially when related to risks with RM arguments using the output
of a shell call in the argument list. What could go wrong ?
This target consumes ~50% of the total build time due to the
serialization of the shell for loop method.
Also the removal of the */Depend is deferred to the subdir
Makefile's responsibility.
rename symlink(s) use phony targets, delegate the symlink creation
management command sequence to a single point in the project inside
the readline/Makefile
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.
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.