[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Adding date/version information to project??
From: |
Dave Hylands |
Subject: |
Re: [avr-gcc-list] Adding date/version information to project?? |
Date: |
Wed, 30 Nov 2005 00:02:37 -0800 |
Hi Matt,
> I wonder if it can be a part of the script itself, and then have the
> script edit itself in place (using sed -i)?? Hrm, something to try...
Well, you could have the makefile increment the buildnumber:
include buildnum
NEW_BUILDNUMBER = $(shell echo $$(( $(BUILDNUMBER) + 1 )))
This takes advantage of the shell's capability to evaluate expressions
using the
$(( expression ))
syntax, The double $ gets converted to a single $ by the time the
shell is invoked.
Add the following two lines to your linker recipie after a successful link:
@echo "# Automatically generated file - do not edit" > buildnum
@echo "BUILDNUMBER=$(NEW_BUILDNUMBER)" >> buildnum
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
- Re: [avr-gcc-list] Adding date/version information to project??, (continued)
- Re: [avr-gcc-list] Adding date/version information to project??, Anton Erasmus, 2005/11/29
- Re: [avr-gcc-list] Adding date/version information to project??, Bruce D. Lightner, 2005/11/29
- Re: [avr-gcc-list] Adding date/version information to project??, Bruce D. Lightner, 2005/11/29
- RE: [avr-gcc-list] Adding date/version information to project??, Matt.VanDeWerken, 2005/11/29
- RE: [avr-gcc-list] Adding date/version information to project??, Matt.VanDeWerken, 2005/11/29
- RE: [avr-gcc-list] Adding date/version information to project??, Matt.VanDeWerken, 2005/11/29
- RE: [avr-gcc-list] Adding date/version information to project??, Matt.VanDeWerken, 2005/11/29
- RE: [avr-gcc-list] Adding date/version information to project??, Matt.VanDeWerken, 2005/11/30
- Re: [avr-gcc-list] Adding date/version information to project??,
Dave Hylands <=