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 - NormalItem Group: Enhancement
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 4.0Operating System: Any
Fixed Release: 4.0Triage Status: None

Add a New Comment (Rich MarkupRich 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 File(s):
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 15 Sep 2013 12:22:50 AM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Operating SystemNone=>Any
      Fixed ReleaseNone=>4.0
    Thu 09 Feb 2012 05:08:57 PM UTCboyskiAttached File-=>Added make_host.diff, #25038

    Back to the top


    Powered by Savane 3.1-cleanup