avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] How can I "#define" a string in the Makefile?


From: Raphael Assenat
Subject: Re: [avr-gcc-list] How can I "#define" a string in the Makefile?
Date: Fri, 31 Oct 2003 11:45:05 -0500
User-agent: KMail/1.5.4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 31 October 2003 11:32 am, Russell Shaw wrote:
> Russell Shaw wrote:
> > Bob Paddock wrote:
> >
> > Maybe the quotes are being stripped by the shell so that
> >
> >   -DFIRMWARE_REV_STR="1.23"

You can also protect the quotes like this:

- -DFIRMWARE_REV_STR=\"1.23\"

I remember doing this in one of my projects.

> >
> > gives 1.23 instead of "1.23". Try:
> >
> >   #define VERSION  FIRMWARE_REV_STR
> >   static CONST char FLASH Firmware_Prj_str[] PROGMEM = VERSION;
>
> Correction:
>
>    static CONST char FLASH Firmware_Prj_str[] PROGMEM = #FIRMWARE_REV_STR;
>
>
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/opGRu3aLmFcr6L0RApvXAKDP3tYtlqNhUztLnjkLyiRC5iPgmQCeLXe3
d2EbIi5/n+AfKlNasNWyrtw=
=rvhX
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]