Thanks for the idea, had never heard of amalgamation... just reading about,
seems like this could be very useful :D

Antonio Prates


On Mon, 5 Oct 2020 at 23:55, Christian Jullien <eli...@orange.fr> wrote:

> Why don’t you use mod surrounded by amalgamation technic?
>
> I doubt someone protest if you ad few TCC_AMALGATION feature test to not
> include files you’re already manually include.
>
>
>
> #if !defined(TCC_AMALGATION)
>
> #include “…”
>
> #endif
>
>
>
> My OpenLisp has such target which looks like:
>
>
>
> AMALGAMATION=amalgamation
>
> AMALTERM=term.$(O)
>
>
>
> $(AMALGAMATION).c:
>
>         @echo Making temporary $(AMALGAMATION).c
>
>         @rm -f $(AMALGAMATION).c
>
>         @cat $(SOURCES) main.c > $(AMALGAMATION).c
>
>
>
> $(AMALGAMATION)$(EXE): $(AMALGAMATION).c
>
>         @echo Making $(AMALGAMATION)$(EXE) from temporary $(AMALGAMATION).c
>
>         @cp $(AMALGAMATION).c /tmp
>
>         @(cd /tmp; $(CC) -DOL_AMALGAMATION $(CFLAGS) \
>
>                $(AMALGAMATION).c -o $@ $(LIBS) $(LIBRARIES) $(LDFLAGS))
>
>         @echo Deleting temporary $(AMALGAMATION).c
>
>         @rm $(AMALGAMATION).c
>
>
>
> As you can see, temporary /tmp/amalgamation.c (2.5 Mbytes) is sufficient
> to compile OpenLisp and no .h is required.
>
>
>
> *From:* Tinycc-devel [mailto:tinycc-devel-bounces+eligis=
> orange...@nongnu.org] *On Behalf Of *Antonio Prates
> *Sent:* Monday, October 05, 2020 16:25
> *To:* tinycc-devel@nongnu.org
> *Subject:* [Tinycc-devel] sugar fork
>
>
>
> Hi,
>
> I was very happy to find out that the mob branch of tcc is being updated
> and seems to be working fine across linux and mac (where I tried so far).
>
>
>
> I am just passing by to let you know I have forked tcc (mostly for fun),
> but also to make changes in the direction of my own interest, which is
> having a all in one include H file with a few additional helper functions
> to ease out using C as a scripting language mostly to be used together with
> bash scripts.
>
>
>
> It's still in an early stage, but I was able to change the behaviour of
> tinyC to make it run in memory as default behaviour instead of outputting
> to a file, even without the '-run' directive. And also added a few other
> cosmetic and usability driven minor improvements mostly on the basic help
> section and options.
>
> Also did add a script that helps me patch my fork with changes from this
> repo, (or could be adapted to do it backwards).
>
>
>
> I am not sure if any of these changes would be of any interest to the
> general mob team/community. But I can help adding any of those changes to
> the main project, if it sounds useful.
>
>
>
> Anyway, if anyone interested in my updates it's on
> https://github.com/antonioprates/sugar
>
>
>
> Best regards and great thanks for keeping TinyC alive!
>
> Antonio Prates
> _______________________________________________
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to