$(addprefix $(sysdep_dir)/,$(sysdirs)) \
$(..)))
-ifeq ($(wildcard $(+sysdir_pfx)sysd-Makefile),)
-# Don't do deps until this exists, because it might change the sources list.
-no_deps=t
-endif
-
# Some sysdep makefiles use this to distinguish being included here from
# being included individually by a subdir makefile (hurd/Makefile needs this).
in-Makerules := yes
mv -f $@T $@
endif
+ifndef sysd-Makefile-done
+# Don't do deps until this exists, because it might change the sources list.
+no_deps=t
+endif
+
+
# Reorder before-compile so that mach things come first, and hurd things
# second, before all else. The mach and hurd subdirectories have many
# generated header files which the much of rest of the library depends on,
$(close-check-inhibit-asm) \
echo "\$$(objpfx)%.d: $$dir/%.c \$$(before-compile); \
\$$(+make-deps)"; \
- done) > $@T
+ done; \
+ echo 'sysd-rules-done = t') > $@T
mv -f $@T $@
+ifndef sysd-rules-done
+# Don't do deps until this exists, because it provides rules to make the deps.
+no_deps=t
+endif
+
+
ifndef compile-command.S
compile-command.S = $(compile.S) $(OUTPUT_OPTION)
endif