Skip to content

Commit

Permalink
make: add missing directories dependency
Browse files Browse the repository at this point in the history
The generated NR.c and NR.list files as well as the intrinsic Linux
lone lisp module did not depend on the directories phony target
which sometimes causes issues in parallel builds because make can
attempt to create files inside the build tree before it exists.
This has been happening in the lone continuous integration builds,
causing them to fail for weird reasons.
  • Loading branch information
matheusmoreira committed Sep 18, 2024
1 parent 3a08bbd commit 3ecaea8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ $(directories.build.tools)/%: $(directories.build.objects.tools)/%.o $(targets.o
$(directories.build.tests)/%: $(directories.build.objects.tests)/%.o $(targets.objects.lone) | directories
$(strip $(CC) $(flags.executable) $(CFLAGS.with_overrides) $(LDFLAGS) -o $@ $^)

$(call source_to_object,source/lone/lisp/modules/intrinsic/linux.c): $(targets.NR.c)
$(call source_to_object,source/lone/lisp/modules/intrinsic/linux.c): $(targets.NR.c) | directories

$(targets.NR.c): $(targets.NR.list) scripts/NR.generate
$(targets.NR.c): $(targets.NR.list) scripts/NR.generate | directories
scripts/NR.generate < $< > $@

$(targets.NR.list): scripts/NR.filter
$(targets.NR.list): scripts/NR.filter | directories
$(CC) -E -dM -include linux/unistd.h - < /dev/null | scripts/NR.filter > $@

targets.phony += lone
Expand Down

0 comments on commit 3ecaea8

Please sign in to comment.