Build process cleanup

20 views
Skip to first unread message

Aleksej Saushev

unread,
Nov 29, 2010, 7:39:04 PM11/29/10
to pfor...@googlegroups.com
Hello!

Currently, it isn't much convenient to build pForth with non-gcc
compiler (e.g. Clang/LLVM or OpenWatcom) because of gcc-specific flags
and gcc-specific behaviour regarding unknown flags. I reworked handling
of CPPFLAGS, CFLAGS, LDFLAGS once more to allow easy resetting of
non-essential "extra" flags like warnings, optimisations and
configurational definitions. All of them are assigned as default values
of XCPPFLAGS, XCFLAGS, XLDFLAGS now. Now CPPFLAGS, CFLAGS, and LDFLAGS
are used in completely traditional way, like it is done in BSD and GNU
systems (e.g. setting CPPFLAGS overrides everything including essential
"-I." flag).

In addition, there's no convenient access to building of dictionary
image alone, make doesn't handle many-to-many relations well, which
isn't needed here, there's almost direct way to convert binary image to
C source for inlining.
I've separated building of "pforth.dic" image and "pfdicdat.h" image.

At last, I've removed references to variables which were never assigned,
declared phony targets as such, and did other minor cleanup work.


Summary:

Separate building of binary dictionary image
and C source (inlined) dictionary image.

Make CPPFLAGS, CFLAGS, LDFLAGS semantics more traditional.
XCPPFLAGS, XCFLAGS, XLDFLAGS contain "extension" flags now,
resetting them to empty values effects in building of bare pForth
without FPN support, optimisations and other features.

Declare phony (non-material) targets as suggested by standards.

Use parameters where names were hardcoded.

image-decoupling.diff

Phil Burk

unread,
Nov 29, 2010, 10:15:48 PM11/29/10
to pfor...@googlegroups.com
Hello Aleksej,

Great work on the Makefile. I also like the mods you made for SDAD.

I checked in your patch as rev 50.

Thank you,
Phil Burk

Reply all
Reply to author
Forward
0 new messages