chicken-hackers
[Top][All Lists]
Advanced

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

[Chicken-hackers] [PATCH] Small improvements of the Makefiles


From: Peter Bex
Subject: [Chicken-hackers] [PATCH] Small improvements of the Makefiles
Date: Sun, 18 May 2014 20:36:38 +0200
User-agent: Mutt/1.4.2.3i

Hi all,

Attached are two small simplifications of the Makefiles.  The first
changes the way the platform Makefile is invoked; instead of performing
a recursive Make invocation, it simply includes the platform makefile.
This allows the user to call arbitrary targets within the platform
Makefile, so you can build specific files more easily.  Before, it would
only allow invocation of a fixed set of phony targets.

To get around inclusion of the CONFIG on building boot-chicken, I added
a check for MAKECMDGOALS.  Finally, I removed the inclusion of CONFIG
from all the platform Makefiles and made them set SRCDIR in the same
way, so it won't override it if it was set in the user-supplied config.

The second patch simplifies the WINDOWS_SHELL stuff: we often pass
paths to programs, which are then used in system calls.  If these paths
contain backslashes, that becomes painful as we'd have to escape them.
If we used slashes everywhere, that wouldn't work as windows shell
programs like DEL and COPY expect slashes to be commandline option
switches, so these must use backslashes.

Instead of defining everything twice and having a big IF check for
the second set of definitions, we simply take a list of variables
to process, then define each of these variables with a prefix,
where the slash is replaced by $(SEP), which holds the directory
separator for the platform.

I also removed the HEAD variable, which was used in the past for the
'buildhead' target which no longer exists.

I have tested this on Linux and the three flavors of Windows.

Cheers,
Peter
-- 
http://www.more-magic.net

Attachment: 0001-Instead-of-calling-Make-recursively-include-the-plat.patch
Description: Text document

Attachment: 0002-Shorten-defaults.make-by-automating-the-replacement-.patch
Description: Text document


reply via email to

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