| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 
 | From: Ximin Luo <infinity0@debian.org>
Date: Thu, 5 Sep 2024 15:14:01 +0200
Subject: Prevent spurious rebuilds
Forwarded: not-needed
---
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/Makefile b/Makefile
index 26bdcfa..0847a0b 100644
--- a/Makefile
+++ b/Makefile
@@ -812,6 +812,7 @@ $(STARTUP_FILES): $(INCLUDE_DIRS) $(LIBC_BOTTOM_HALF_CRT_OBJS)
 	#
 	mkdir -p "$(SYSROOT_LIB)"
 	cp $(LIBC_BOTTOM_HALF_CRT_OBJS) "$(SYSROOT_LIB)"
+	touch $@
 
 	# Stamp the startup file installation.
 	@mkdir -p $(@D)
@@ -835,6 +836,7 @@ endif
 endif
 
 libc_so: $(INCLUDE_DIRS) $(LIBC_SO)
+	touch $@
 
 STATIC_LIBS = \
     $(SYSROOT_LIB)/libc.a \
@@ -851,6 +853,7 @@ STATIC_LIBS += \
 endif
 
 libc: $(INCLUDE_DIRS) $(STATIC_LIBS)
+	touch $@
 
 DUMMY := m rt pthread crypt util xnet resolv
 DUMMY_LIBS := $(patsubst %,$(SYSROOT_LIB)/lib%.a,$(DUMMY))
@@ -867,6 +870,7 @@ no-check-symbols: $(STARTUP_FILES) libc $(DUMMY_LIBS)
 	#
 	# The build succeeded! The generated sysroot is in $(SYSROOT).
 	#
+	touch $@
 
 finish: no-check-symbols
 
@@ -1089,5 +1093,6 @@ clean:
 	$(RM) -r "$(BINDING_WORK_DIR)"
 	$(RM) -r "$(OBJDIR)"
 	$(RM) -r "$(SYSROOT)"
+	$(RM) -f include_dirs startup_files libc finish
 
 .PHONY: default libc libc_so finish install clean check-symbols no-check-symbols bindings
 |