[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] mintlib Makefile requires bash as shell



Eero Tamminen wrote:
But I don't actually have MiNTlib sources here so I might have misunderstood
the problem.  You said that the issue was that the value is set only on
second time?
Here is the base problem.
The MiNTLib wants to be compiled with -nostdinc to avoid conflicts with the already installed libc headers. But it still needs the headers provided by the compiler itself (like stdddef.h, float.h...). So it uses gcc --print-search-dirs to get the gcc include directories. This process is slow, so the result needs to be cached somewhere; actually in the file includepath.
Then that cached value has to be used when compiling the sources. Currently 
the file includepath is read for each C source, the fastest method being the 
bashism $(<file}
Of course the best method would be to cache the includepath value in a make 
variable. But it is not possible, because the first time make is run, the 
includepath is determined, unfortunately (if I understood well) the make 
variables are read only.
In traditional packages, there is a configure script which gathers all that 
kind of system parameters that will be used by the Makefiles. But in case on 
the MiNTLib, the makefiles want to be standalone and configure themselves, 
that leads to these kinds of difficulties.
--
Vincent Rivière