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: Yuriy Khokhulya
Subject: [bug #56764] Different behavior of printf command executed from Makefile and from shell.
Date: Fri, 16 Aug 2019 16:47:46 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36

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

                 Summary: Different behavior of printf command executed from
Makefile and from shell.
                 Project: make
            Submitted by: yutik_05
            Submitted on: Пт. 16 авг. 2019 20:47:45
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.1
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

I need to put in Makefile printf command to write 4 special bytes to the
file.


printf '\x00\x00\x8f\x60' > generated_file.bin


But I've met with a problem. This command works as expected if run it from the
command line. But, in Makefile, it produces the wrong result.

MakeFile content (simplified to demonstrate the issue):

generated_file:
        printf '\x00\x00\x8f\x60' > generated_file.bin


Steps of how to run and get result:

$ make
printf '\x00\x00\x8f\x60' > generated_file.bin
$ hexdump generated_file.bin
0000000 785c 3030 785c 3030 785c 6638 785c 3036
0000010
$ cat generated_file.bin
\x00\x00\x8f\x60


The expected result is:

$ printf '\x00\x00\x8f\x60' > generated_file.bin
$ hexdump generated_file.bin
0000000 0000 608f                              
0000004


The version of used make tool is 4.1.





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Сообщение отправлено по Savannah
  https://savannah.gnu.org/




reply via email to

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