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

Re: [MiNT] missing xversion.h



> Helmut Karlowski wrote:
>>
>> What about this:
>>
>>
>> function create_xversion()
>> {
>> echo $2
>> D=`date -r $2 "+%b %e %Y %H:%M"`
>> echo \#define BDATETIME \"$D\" >$1
>> }
>>
>> FILES=`ls -t *.c *.h`
>>
>> create_xversion xversion.h $FILES

I was needing something similar, here's what I use, it seems more
straightforward to me:

real_tos_version_h: $(SOURCES)
	./gen_version.sh $(TOS_VERSION) $(TOS_VERSION_H)
	
$(TOS_VERSION_H):
	if [ ! -f $(TOS_VERSION_H) ]; then touch $(TOS_DIR)/version.S; fi
	make real_tos_version_h

SOURCES contains all *.c and *.S (i.e. excluding $(TOS_VERSION_H))

-- 
MiKRO / Mystic Bytes
http://mikro.atari.org