chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Incremental build, tricks or tips anyone?


From: Felix
Subject: Re: [Chicken-users] Incremental build, tricks or tips anyone?
Date: Mon, 06 Sep 2010 03:54:35 -0400 (EDT)

From: Matthew Welland <address@hidden>
Subject: [Chicken-users] Incremental build, tricks or tips anyone?
Date: Sun, 5 Sep 2010 14:52:24 -0700

> I am updating some old code and the build broke because chicken-config no 
> longer exists.  It took a while but I finally found that all I had to do was 
> replace chicken-config with csc. I.e. "csc -cflags" in place of 
> "chicken-config 
> -cflags".
> 
> My question is, does anyone have a nicer way of doing this? I sometimes work 
> on very weak machines such as single board computers and really appreciate 
> build times of seconds instead of minutes when only one file has changed. 

I think, you could simply use `csc':

> 
> src_code  := laedlib tc_laedlib re-route 
> scm_files := $(addprefix ../scm/,$(addsuffix .scm,$(src_code)))
> c_files   := $(addprefix src/,$(addsuffix .c,$(src_code)))
> o_files   := $(addprefix src/,$(addsuffix .o,$(src_code)))
> 
> $(c_files): src/%.c: ../scm/%.scm ../scm/macros.scm
>       chicken $< -output-file $@
        csc -t $< -o $@

> 
> $(o_files): src/%.o: src/%.c
>       gcc -c $< `chicken-config -cflags` -o $@
        csc -c $< -o $@

> 
> $(src_code): %: src/%.o src/laedlib.o
>       gcc src/$*.o src/laedlib.o -o $* `chicken-config -libs`
        csc src/$*.o src/laedlib.o -o $*

(I have not tested this)


cheers,
felix



reply via email to

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