about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-05-03 20:35:11 -0400
committerRich Felker <dalias@aerifal.cx>2012-05-03 20:35:11 -0400
commite765239f334d670e1b68289a2fcaa6b82a3b9666 (patch)
tree42fbc8655000f1607af1d6e143538f73c327eb34
parent2be87702b79c02b1acf68d6159a4fb399d2c9a57 (diff)
downloadmusl-e765239f334d670e1b68289a2fcaa6b82a3b9666.tar.gz
musl-e765239f334d670e1b68289a2fcaa6b82a3b9666.tar.xz
musl-e765239f334d670e1b68289a2fcaa6b82a3b9666.zip
make all .o files depend on *_impl.h and libc.h
hopefully the annoyance of this will be minimal. these files all
define internal interfaces which can change at any time; if different
modules are using different versions of the interfaces, the library
will badly break. ideally we would scan and add the dependency only
for C files that actually reference the affected interfaces, but for
now, err on the side of caution and force a rebuild of everything if
any of them have changed.

this commit is in preparation for the upcoming ssp overhaul commit,
which will change internals of the pthread struct.
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1b9e2436..4f930492 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,7 @@ SRCS = $(sort $(wildcard src/*/*.c))
 OBJS = $(SRCS:.c=.o)
 LOBJS = $(OBJS:.o=.lo)
 GENH = include/bits/alltypes.h
+IMPH = src/internal/stdio_impl.h src/internal/pthread_impl.h src/internal/libc.h
 
 LDFLAGS = 
 CPPFLAGS =
@@ -78,13 +79,13 @@ include/bits/alltypes.h: include/bits/alltypes.h.sh
 %.o: $(ARCH)/%.s
 	$(CC) $(CFLAGS_ALL_STATIC) -c -o $@ $<
 
-%.o: %.c $(GENH)
+%.o: %.c $(GENH) $(IMPH)
 	$(CC) $(CFLAGS_ALL_STATIC) -c -o $@ $<
 
 %.lo: $(ARCH)/%.s
 	$(CC) $(CFLAGS_ALL_SHARED) -c -o $@ $<
 
-%.lo: %.c $(GENH)
+%.lo: %.c $(GENH) $(IMPH)
 	$(CC) $(CFLAGS_ALL_SHARED) -c -o $@ $<
 
 lib/libc.so: $(LOBJS)