[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #35493] Provide access to existing platform type data via a builtin
From: |
David Boyce |
Subject: |
[bug #35493] Provide access to existing platform type data via a builtin variable |
Date: |
Thu, 09 Feb 2012 17:08:58 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.46 Safari/535.11 |
URL:
<http://savannah.gnu.org/bugs/?35493>
Summary: Provide access to existing platform type data via a
builtin variable
Project: make
Submitted by: boyski
Submitted on: Thu 09 Feb 2012 05:08:57 PM GMT
Severity: 3 - Normal
Item Group: Enhancement
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: CVS
Operating System: None
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
There are thousands of makefiles containing logic like this
uname := $(shell uname -s) # or worse, "="
ifneq (,$(filter Linux,$(uname)))
LINUX_HOST := 1
else ifneq (,$(filter CYGWIN%,$(uname)))
CYGWIN_HOST := 1
else ...
endif
This is complicated, duplicative, hard to read, has portability issues due to
relying on a Unix utility, etc. Meanwhile make already contains a variable
"make_host" describing the platform it was built for, and a one-line patch can
make it available within makefiles:
define_variable_cname ("MAKE_HOST_TYPE", make_host, o_default, 0);
The attached patch also includes documentation.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 09 Feb 2012 05:08:57 PM GMT Name: make_host.diff Size: 2kB By:
boyski
<http://savannah.gnu.org/bugs/download.php?file_id=25038>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?35493>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #35493] Provide access to existing platform type data via a builtin variable,
David Boyce <=