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

Re: [MiNT] Fwd: MiNTLib sh-compliant includepath



Miro Kropacek wrote:
there's patch following Andreas' hint, i.e. not to use bash specific $(< ...) but $(cat ...) instead. Tested and works.

You're right, $(cat should be preferred to $(<

While speaking about that...
I have always been annoyed to not see the full expanded command line when compiling the MiNTLib. It can be achieved by using the $(shell function of make.

So instead of using:
	-I$$(<$(top_srcdir)/includepath)
use:
	-I$(shell cat $(top_srcdir)/includepath)

Pros:
- Full commandline is expanded by make while compiling each file. It is easier to understand what happens.

Cons:
- The command line for each C file is longer (personnally, I dont't care).
- The $(shell function may not be compatible with "make" programs other than GNU make (not sure of this, and other parts of the MiNTLib Makefile may be specific to GNU make, too).

--
Vincent Rivière