Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

sync: the tests/Makefile patcher's rule/recipe pairing was off by one line

LNPANDYe14d38472ccb
diff --git a/scripts/sync_upstream.py b/scripts/sync_upstream.py
index 0d66e1ff..893559f3 100644
--- a/scripts/sync_upstream.py
+++ b/scripts/sync_upstream.py
@@ -358,12 +358,16 @@ def patch_tests_makefile(t):
out, need = [], False
for ln in lines:
if ln.startswith('$(B)/'):
- need = 'hle_profile.c' not in ln and any(u in ln for u in USERS)
- out.append(ln); continue
- if need and ln.startswith('\t') and ln.lstrip().startswith('clang') and 'hle_profile.c' not in ln:
- ln = ln.rstrip('\n') + ' ../hle_profile.c\n'
- elif not (ln.startswith('\t') or not ln.strip()):
- need = False
+ # a rule header: does its prerequisite list reach a dm_profile() caller?
+ need = any(u in ln for u in USERS)
+ out.append(ln)
+ continue
+ if need:
+ # the recipe line of that rule: append the accessor's object if absent
+ if ln.startswith('\t') and ln.lstrip().startswith('clang') and 'hle_profile.c' not in ln:
+ ln = ln.rstrip('\n') + ' ../hle_profile.c\n'
+ elif not ln.startswith('\t') and ln.strip():
+ need = False # a non-recipe line ends the rule
out.append(ln)
t = ''.join(out)
# the memory block compiles ../hle_svc.c from MEM_DEPS