URL: <http://savannah.gnu.org/bugs/?36542>
Summary: make -j interacts badly with pattern rules, .SECONDARY: Project: make Submitted by: davidwarme Submitted on: Sat 26 May 2012 01:39:40 AM GMT Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 3.82 Operating System: POSIX-Based Fixed Release: None Triage Status: None _______________________________________________________ Details: The attached Makefile demonstrates a bug in make-3.82 that is apparently an improper interaction between "make -j", pattern rules and ".SECONDARY:". This example works on Linux, and requires a working make-3.82, gcc, and binutils (objcopy). 1. Create an empty directory. 2. cd to that directory. 3. Place the attached Makefile in that directory. 4. Do "make -j 20". Notice that the make fails because it attempts to make a .dbg file before the corresponding .exe file has been built. 5. Comment out the ".SECONDARY:" line in the Makefile. 6. Do "make clean". 7. Do "make -j 20". Notice that the make succeeds (but it deletes all of the .c and .o files because the ".SECONDARY" declaration is not present. David Warme Group W, Inc. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Sat 26 May 2012 01:39:40 AM GMT Name: Makefile Size: 965B By: davidwarme Makefile demonstrating the bug. Do "make -j 20". <http://savannah.gnu.org/bugs/download.php?file_id=25922> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?36542> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make