瀏覽代碼

I think this fixes the dependancy problems. Manuel, can you
double check that this is what you intended?
-Erik

Eric Andersen 23 年之前
父節點
當前提交
9f1c86779c
共有 1 個文件被更改,包括 12 次插入4 次删除
  1. 12 4
      libc/unistd/Makefile

+ 12 - 4
libc/unistd/Makefile

@@ -59,9 +59,15 @@ sysconf_$(TARGET_ARCH).c: sysconf.c
 	cp -f sysconf.c sysconf_$(TARGET_ARCH).c
 
 # We are compiling for the native platform, so build an optimized sysconf.c.
-sysconf_native: sysconf.c
-	$(CC) $(CFLAGS) -D_UCLIBC_GENERATE_SYSCONF_ARCH -c sysconf.c -o sysconf_tester.o
-	$(CC) $(CFLAGS) -D_UCLIBC_GENERATE_SYSCONF_ARCH -c ../sysdeps/linux/common/getpagesize.c -o getpagesize_tester.o
+getpagesize_tester.o:
+	$(CC) $(CFLAGS) -D_UCLIBC_GENERATE_SYSCONF_ARCH \
+	    -c ../sysdeps/linux/common/getpagesize.c -o getpagesize_tester.o
+
+sysconf_tester.o:
+	$(CC) $(CFLAGS) -D_UCLIBC_GENERATE_SYSCONF_ARCH -c sysconf.c \
+	    -o sysconf_tester.o
+
+gen_sysconf_tester.o: sysconf_tester.o getpagesize_tester.o
 	@ld -r -o gen_sysconf_tester.o sysconf_tester.o getpagesize_tester.o
 	@if nm -s gen_sysconf_tester.o | grep -v "U errno" | grep " U " ;\
 	then \
@@ -78,6 +84,8 @@ sysconf_native: sysconf.c
 		fi ;\
 	fi
 
+sysconf_native: gen_sysconf_tester.o
+
 sysconf_src.c: sysconf_$(TARGET_ARCH).c
 	cp -f sysconf_$(TARGET_ARCH).c sysconf_src.c
 
@@ -101,7 +109,7 @@ $(patsubst %, _dir_%, $(DIRS)) : dummy
 $(patsubst %, _dirclean_%, $(DIRS)) : dummy
 	$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
 
-.PHONY: dummy
+.PHONY: dummy sysconf_native
 dummy:
 
 clean: