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/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make