bugmake - Bugs: bug #35493, Provide access to existing...

 
 

bug #35493: Provide access to existing platform type data via a builtin variable

Submitted by:  David Boyce <boyski>
Submitted on:  Thu 09 Feb 2012 05:08:57 PM UTC  
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  Fixed Privacy:  Public
Assigned to:  Paul D. Smith <psmith> Open/Closed:  Closed
Component Version:  4.0 Operating System:  Any
Fixed Release:  4.0 Triage Status:  None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 15 Sep 2013 12:22:50 AM UTC, comment #1:

A new variable $(MAKE_HOST) is in the next release. Thanks.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Thu 09 Feb 2012 05:08:57 PM UTC, original submission:

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.

David Boyce <boyski>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #25038:  make_host.diff added by boyski (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by boyski (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-15 psmith StatusNone => Fixed
        Assigned toNone => psmith
        Open/ClosedOpen => Closed
        Operating SystemNone => Any
        Fixed ReleaseNone => 4.0
    2012-02-09 boyski Attached File- => Added make_host.diff, #25038

    Back to the top


    Powered by Savane 3.3