Author: Ximin Luo Description: Prevent spurious rebuilds Forwarded: not-needed Index: wasi-libc/Makefile =================================================================== --- wasi-libc.orig/Makefile +++ wasi-libc/Makefile @@ -577,6 +577,8 @@ include_dirs: # Remove selected header files. $(RM) $(patsubst %,$(SYSROOT_INC)/%,$(MUSL_OMIT_HEADERS)) + touch $@ + startup_files: include_dirs # # Build the startup files. @@ -587,6 +589,8 @@ startup_files: include_dirs mkdir -p "$(SYSROOT_LIB)" && \ mv *.o "$(SYSROOT_LIB)" + touch $@ + libc: include_dirs \ $(SYSROOT_LIB)/libc.a \ $(SYSROOT_LIB)/libc-printscan-long-double.a \ @@ -596,6 +600,8 @@ libc: include_dirs \ $(SYSROOT_LIB)/libwasi-emulated-getpid.a \ $(SYSROOT_LIB)/libwasi-emulated-signal.a + touch $@ + finish: startup_files libc # # Create empty placeholder libraries. @@ -607,6 +613,7 @@ finish: startup_files libc # # The build succeeded! The generated sysroot is in $(SYSROOT). # + touch $@ # The check for defined and undefined symbols expects there to be a heap # alloctor (providing malloc, calloc, free, etc). Skip this step if the build @@ -712,5 +719,6 @@ install: finish clean: $(RM) -r "$(OBJDIR)" $(RM) -r "$(SYSROOT)" + $(RM) -f include_dirs startup_files libc finish .PHONY: default startup_files libc finish install include_dirs clean