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

Re: [MiNT] missing xversion.h



Am 16.05.2010, 21:33 Uhr, schrieb Vincent Rivière <vincent.riviere@freesbee.fr>:

Helmut Karlowski wrote:
man test states the same as bash, as is ksh btw. So dash is wrong.

The -nt test is not even in POSIX:
http://www.opengroup.org/onlinepubs/009695399/utilities/test.html

"because they have not been included in the test utility built into historical implementations of the sh utility"

I love it!

Sure, but it is slow because it tests all files first (on first make).

Really too slow ? That would be surprising.

Not really. But the created xversion.h will have a wrong date. It's now:


HFILE=xversion.h
N=$HFILE

#some shells have broken test
if [ ! -f $HFILE ]
then
  touch -t 0001010001 $HFILE
fi


Anyway, I see a well-know pattern: if a file does not exist or is older than another, do something. Isn't it the basic job for a makefile rule ? So you may make a rule where xversion.h depends on all the sources, and the job is done.

Tell me the rule, please!

--
Helmut Karlowski