bugmake - Bugs: bug #42260, posixpath, hostpath, commasp,...

 
 

bug #42260: posixpath, hostpath, commasp, spcomma needed for non-Unix OS

Submitter:  John Malmberg <wb8tyw>
Submitted:  Thu 01 May 2014 10:32:57 PM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  4.0 Operating System:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 01 May 2014 10:32:57 PM UTC, original submission:  

Most platforms that do not natively use a posix path syntax still support a Posix syntax inside the C library for operating on path names.

As such for those platforms there is usually well known conventions for converting paths between Posix and the host native syntax.

The file operations in the C library will typically work on both
Posix and Native paths.

This results in GNU make on those platforms being able to process dependency patterns with either Posix path names and in the host native pathnames.

The action part of the recipes may require a specific pathname syntax depending on if they are implemented as internal commands, ported Posix commands or native commands.

If the built in rules and user written rules for a non-Posix platform could have functions to do the conversions needed from Posix to or from Native, it would allow Unix makefiles, which is the mainstream to be used with either no or ideally less platform specific customization.

$(posixpath, hint, path) would force a list of paths to be in posix syntax.  The delimiters between files can be host dependent on input and a space on output.

$(hostpath, hint, path) would force a list of paths to be in
the host native syntax.  The delimiters between files can be a space on input and host specific on output.

For platforms that use posix paths, these functions will just return the input.

The hint parameter is host specific and provides guidance where needed on the translation.  For example VMS has a different syntax when a directory is referenced as a directory than when it is referenced as a file, which the recipe needing the translation can pass as a hint.

These functions can not be considered to reverse each other as there are some host to native translations that can not be reversed and some native to host translations that can not be reversed.

To go along with these functions would be two functions that would respectively replace spaces with commas and commas with spaces to allow easier conversions than what can be done with the current subst function.

VMS currently modifies some of the make variables to use a comma instead of spaces as a convenience for writing rules.  Running the GNU make test suite on VMS shows that causes problems with using other make functions that are require a space delimiter.

With the above functions added, that VMS specific hack can be marked for depreciation and eventually phased out.

I considered setting these functions up as VMS specific.  However other non-posix platforms could probably benefit from them.

John Malmberg <wb8tyw>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wb8tyw (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-8eb0.
    Corresponding source code