bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #56764] Different behavior of printf command executed from Makefile


From: Paul D. Smith
Subject: [bug #56764] Different behavior of printf command executed from Makefile and from shell.
Date: Sat, 17 Aug 2019 14:46:55 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36

Update of bug #56764 (project make):

                  Status:                    None => Not A Bug              
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #2:

The problem is you're using a non-standard argument to the printf function.

When you run it from your command line, you're using the printf "utility"
which is a built-in of the bash shell.  That version of printf supports the
non-standard enhancement of \xHH where HH are hexadecimal digits.

When make invokes printf it's assuming a POSIX shell, and running the
/usr/bin/printf executable not the bash builtin.

That utility apparently doesn't provide this extension and only supports the
standard POSIX printf definition, which you can find here:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html

If you want to print binary values, you should use the standard octal format
\OOO where O are octal digits.  That will work in both situations.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56764>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]