-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race condition in automatic zend_vm_gen.php invocation
As previously written, this was treated as two independent targets having the same recipe. GNU Make 4.3 has a new "grouped targets" feature that allows specifying that these are actually both outputs of a single recipe, but that's very recent. Work around this by using an intermediate target.
- Loading branch information
Showing
1 changed file
with
7 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,13 @@ $(srcdir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y | |
$(srcdir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l | ||
@(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --no-generation-date --case-inverted -cbdFt Zend/zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c Zend/zend_ini_scanner.l) | ||
|
||
$(srcdir)/zend_vm_execute.h $(srcdir)/zend_vm_opcodes.c: $(srcdir)/zend_vm_def.h $(srcdir)/zend_vm_execute.skl $(srcdir)/zend_vm_gen.php | ||
# Use an intermediate target to indicate that zend_vm_gen.php produces both files | ||
# at the same time, rather than the same recipe applying for two different targets. | ||
# The "grouped targets" feature, which would solve this directly, is only available | ||
# since GNU Make 4.3. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
cmb69
Contributor
|
||
$(srcdir)/zend_vm_execute.h $(srcdir)/zend_vm_opcodes.c: vm.gen.intermediate ; | ||
.INTERMEDIATE: vm.gen.intermediate | ||
vm.gen.intermediate: $(srcdir)/zend_vm_def.h $(srcdir)/zend_vm_execute.skl $(srcdir)/zend_vm_gen.php | ||
@if test ! -z "$(PHP)"; then \ | ||
$(PHP) $(srcdir)/zend_vm_gen.php; \ | ||
fi; | ||
|
Just an FYI that macs are bundled with an archaic version of make (~ 3.8).