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