chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] Re: separate build directory support for Chicken


From: Elf
Subject: Re: [Chicken-hackers] Re: separate build directory support for Chicken
Date: Sun, 13 Jan 2008 02:59:59 -0800 (PST)


we could just dispense with make altogether and set the ordering manually...
it shouldnt need to change all that frequently.

then its just a matter of defining a small number of variables for the differences between platforms (cygwin needing lots of extra flags, for example, when doing shared lined), and portable shellscripts/batch files
that can check timestamps.


re: build system preferences, i am a fan of a single config setting file with options grouped together and mostly commented out, as in:

## Some option that does something or another
#
## Uncomment the following line if building for linux:
# OPTION_VALUE=linuxsetting
## Uncomment the following line if building for macos:
# OPTION_VALUE=macossetting
## Uncomment the following line if building for mingw:
# OPTION_VALUE=mingwsetting

etc.  its easy to see what to do and where, reduces needless duplication,
and is easily maintainable.

for cross compilation issues, simply have BOOTSTRAP_<blah> settings as well
as regular settings, when applicable.



-elf

On Sun, 13 Jan 2008, Ivan Shmakov wrote:

Ivan Shmakov <address@hidden> writes:
felix winkelmann <address@hidden> writes:

[...]

>>> Actually, I'm planning a build system rewrite which, by utilising
>>> some of the GNU Make features, will make the build system /much
>>> more/ manageable.  I've already reduced rules.make down to 38 KiB
>>> (i. e., by 40%) and it doesn't look that I'm going to stop just
>>> yet.

>> Reducing size isn't everything. I'd rather have simple makefiles
>> than complex ones, even if their bigger.

> My point is that the code duplication increases complexity.

        And, well, I have some trouble understanding the manageability
        or even readability of the Makefile fragments like the
        following:

--cut--
FOO-1$(O): FOO-1.c
        COMPILE-IT
FOO-2$(O): FOO-2.c
        COMPILE-IT
[ ... 74 lines skipped... ]
FOO-40$(O): FOO-40.c
        COMPILE-IT
--cut--

        Rather, I'd have:

--cut--
FOO_SOURCES = FOO-1.c FOO-2.c ... FOO-40.c
FOO_OBJECTS = $(FOO_SOURCES:.c=$(O))

$(FOO_OBJECTS) : %$(O) : %.c
        COMPILE-IT
--cut--

        Would there be more dependencies for FOO-N objects, I'd add them
        as follows:

$(FOO_OBJECTS)          : GENERIC-FOO-DEPENDENCIES
FOO-X$(O) FOO-Y$(O)     : SPECIFIC-FOO-X-Y-DEPENDENCIES
FOO-Z$(O)               : SPECIFIC-FOO-Z-DEPENDENCIES

        Furthermore, I'd suggest using the C compiler to compute
        dependencies, and not to hardcode them in the makefile.



_______________________________________________
Chicken-hackers mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-hackers





reply via email to

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