[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] __DATE__ constant, any way to format it differently ?
From: |
Vincent Trouilliez |
Subject: |
Re: [avr-gcc-list] __DATE__ constant, any way to format it differently ? |
Date: |
Thu, 29 Jan 2009 01:41:38 +0100 |
Steven Michalske <address@hidden> wrote:
> CFLAGS+=" -DMY_DATE=`date +%y%m%d` "
>
> and in your code
>
> #ifndef MY_DATE
> #error "MY_DATE not defined."
> #endif
>
> now use MY_DATE instead of __DATE__
Wow, now that looks cool ;-)
I added your line to my makefile:
...
CFLAGS= -Os -g -Wall -ffreestanding -mmcu=$(MCU)
CFLAGS+=" -DMY_DATE=`date +%y%m%d` "
...
...but I get a Make error sadly, any idea, maybe a typo in what you posted ?
=========
avr-gcc -Os -g -Wall -ffreestanding -mmcu=atmega32 " -DMY_DATE=`date +%y%m%d` "
-c main.c
avr-gcc: -DMY_DATE=090129 : No such file or directory
make: *** [main.o] Error 1
=========
--
Vince, learning new cool tricks every day..
- RE: [avr-gcc-list] __DATE__ constant, any way to format it differently ?, (continued)
- RE: [avr-gcc-list] __DATE__ constant, any way to format it differently ?, Weddington, Eric, 2009/01/28
- Re: [avr-gcc-list] __DATE__ constant, any way to format it differently ?, Vincent Trouilliez, 2009/01/28
- RE: [avr-gcc-list] __DATE__ constant, any way to format itdifferently ?, Stu Bell, 2009/01/28
- Re: [avr-gcc-list] __DATE__ constant, any way to format itdifferently ?, Vincent Trouilliez, 2009/01/28
- Re: [avr-gcc-list] __DATE__ constant, any way to format itdifferently ?, Torsten Seeboth, 2009/01/28
- Re: [avr-gcc-list] __DATE__ constant, any way to format itdifferently ?, Vincent Trouilliez, 2009/01/28
- Re: [avr-gcc-list] __DATE__ constant, any way to format itdifferently ?, Vincent Trouilliez, 2009/01/28
- Re: [avr-gcc-list] __DATE__ constant, any way to format it differently ?, David Kelly, 2009/01/28
- Re: [avr-gcc-list] __DATE__ constant, any way to format it differently ?, Vincent Trouilliez, 2009/01/28
- Re: [avr-gcc-list] __DATE__ constant, any way to format it differently ?, Steven Michalske, 2009/01/28
- Re: [avr-gcc-list] __DATE__ constant, any way to format it differently ?,
Vincent Trouilliez <=
- Message not available
- Re: [avr-gcc-list] __DATE__ constant, any way to format it differently ?, Vincent Trouilliez, 2009/01/28
- Message not available
- Re: [avr-gcc-list] __DATE__ constant, any way to format it differently ?, Vincent Trouilliez, 2009/01/28
Re: [avr-gcc-list] __DATE__ constant, any way to format it differently ?, Dave Hylands, 2009/01/28
Re: [avr-gcc-list] __DATE__ constant, any way to format it differently ?, Anton James Erasmus, 2009/01/29