Makefile a inkrementace cisla buildu

iko iko.ikoon na gmail.com
Pátek Leden 15 09:09:00 CET 2016


mam pocit, ze bash-ove zalezitostui mu na WIN normalne nepojdu

On 01/15/2016 09:05 AM, Petr Simek wrote:
> On Fri, 15 Jan 2016, Pavel Kutina wrote:
>
>> To je zjevne presno, to, co bych potreboval, jen pro Windows. V bashi
>> bych si to naskriptoval taky, na Win se ptam, jestli to uz nekdo nema
>> vytvorene ci nepouziva ono "neco", co to dela. Ne ze bych si to
>> nemohl treba v mem
>
> Tady  -
>
>  
> http://www.avrfreaks.net/forum/automatically-increment-build-version-number-firmware
>
> je priklad na inkrementaci v Makefile , presmerovani stdin/stdout <> na
> soubor counter snad uz win zvladnou :
>
>   #
>   # Increment counter and write buildnum.c
>   # Do not name this rule buildnum.c although it creates buildnum.c
>   # TODO: Add file locking for concurrent builds
>   #
>   buildnum: counter
>         read LASTNUM < counter;         \
>         NEWNUM=$$(($$LASTNUM + 1));             \
>         echo "const int buildnum = $$NEWNUM;" > buildnum.c; \
>         echo "$$NEWNUM" > counter
>
>   buildnum.c: buildnum
>   .PHONY: buildnum
>   clean::
>         -rm -f buildnum.c
>
>
>> Pavel Kutina
>
> *------------------------------------------------------------------------*
>
> |                          Petr Simek   APS
> JU                           |
> |                            
> psimek na jcu.cz                              |
> *------------------------------------------------------------------------*
>
> _______________________________________________
> HW-list mailing list  -  sponsored by www.HW.cz
> Hw-list na list.hw.cz
> http://list.hw.cz/mailman/listinfo/hw-list

-- 
iko

Počítač bez Windows je ako kakao bez kečupu.



Další informace o konferenci Hw-list