URL: <https://savannah.gnu.org/bugs/?64472>
Summary: $(CP) is an empty string Group: make Submitter: None Submitted: Wed 26 Jul 2023 02:43:06 AM UTC Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 4.4 Operating System: POSIX-Based Fixed Release: None Triage Status: None _______________________________________________________ Follow-up Comments: ------------------------------------------------------- Date: Wed 26 Jul 2023 02:43:06 AM UTC By: Anonymous The documentation section [https://www.gnu.org/software/make/manual/make.html#Utilities-in-Makefiles 16.2 Utilities in Makefiles] recommends us to use make variables such as $(INSTALL) or $(RM) instead of writing the respective commands (install, rm...), so as to allow users to override them with a suitable replacement. That's what I did, I replaced all instances of "cp" with "$(CP)". I'm using it to copy some file in the first target of a Makefile. But unfortunately it is resolving to an empty string, which I first noticed by looking at the output. expected: cp /currentpath /newpath actual: /currentpath /newpath Then I added a call to $(info $(CP))", which outputs an empty line. I'm attaching the makefile. GNU Make 4.4 Built for x86_64-redhat-linux-gnu I'm on Fedora Workstation 38. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Wed 26 Jul 2023 02:43:06 AM UTC Name: Makefile Size: 630B By: None Makefile. Look at the first target, "all" <http://savannah.gnu.org/bugs/download.php?file_id=54971> _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64472> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/