tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Portable Makefiles (was: I need support with a planned POSIX make extension)
Edgar Fuß <ef%math.uni-bonn.de@localhost> wrote:
> > In other words: := cannot appear in portable makefiles.
> As someone writing a lot of (private) stuff in bmake, I'm wondering what
> a portable makefile in this context is.
> Apart from auto-generated stuff, my impression is you can't write anything
> non-trivial in portable make languge as it lacks most basic things like
> conditionals or loops (not to speak of bmake's wonderful world of stackable
> variable modifiers).
> So there must be some application of the operators discussed in auto-generated
> makefiles that I'm missing.
Auto generated Makefiles are based on techniques from the 1970 and are a
really bad idea. Even worse, the fact that prominent methods like from the
GNU tool that is incorrectly called "automake", are not fully auto-generated,
results in highly non-portable makefiles because the people typically write
input data for the so called "automake" that is full of non-portable GNU make
features/bugs and requires you to first compile/install gmake.
As a result, there is a statement from the GNU camp: write a portable make
program instead of portable makefiles. The problem here: gmake is not portable.
It works correctly only on a very limited number of target platforms.
Because there is no correct testing for gmake, gmake on various platforms only
handles extremely trivial makefiles and fails with a typical real makefile
from today.
What I am doing since 30 years is to write a compilation environment in the
"make" language...
In order to be able to do this, we need "include" and a way to "compute" the
file names for including make rules based on the operating system platform,
the make program and the properties of the compiler.
This development of this method started based on the first modern make
implementation (SunPro Make) and later was adopted to deal with smake and
gmake as well. In 1997, I planned to let smake die after nearly 20 years, but
then discovered that gmake was definitely not as portable as claimed by the
FSF.
Meanwhile, I worked on developing the POSIX standard and was able to add many
features to POSIX make that are required in order to run such a portable make
file system with more make implementations...
The current state with this portable makefile system is:
smake The reference implementation works on the largest number of
target platforms but currently is only a serial make.
New POSIX features are implemented immediately.
SunPro Make Works on more and more platforms. It should run on all recent
platforms and I recently added support for z/OS. It supports
the parallel mode and probably could be enhanced to support
the Sun grid engine in future even though Sun did not publish
the complete source code.
New POSIX features are implemented immediately.
gmake is unmaintained. Bugs reported in 1998 are still not fixed.
Due to conceptional deficits, it is unable to work in
parallel mode with a freshly unpacked source tarball from
the schily tools. This is because dependencies related to the
include directive are handled incorrectly and because there is
no way to tell it to serialize things in a specific way.
bmake currently mainly seems to fail to support that makefile
system because there is no support for pattern matching
default rules and there are significant deviations with
suffix rules that place their results into a directory
that is not the current working directory if make.
bmake could be supported, after it did add support for
pattern matching default rules. A related simplified
proposal exists in the POSIX bug tracking system.
The good news with the above list of make programs is that it is the complete
list of serious make implementations that are candidates for general use.
So the right way is to work on standardizing something that permits to write
portable makefiles.
Jörg
--
EMail:joerg%schily.net@localhost Jörg Schilling D-13353 Berlin
Blog: http://schily.blogspot.com/
URL: http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/
Home |
Main Index |
Thread Index |
Old Index