OSDN Git Service

Don't force rebuild if mksysinfo.sh does not change sysinfo.go.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Jan 2011 23:25:31 +0000 (23:25 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Jan 2011 23:25:31 +0000 (23:25 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169342 138bc75d-0d04-0410-961f-82ee72b054a4

libgo/Makefile.am
libgo/Makefile.in
libgo/mksysinfo.sh

index af67803..dd17fff 100644 (file)
@@ -2464,8 +2464,12 @@ testing/script/check: $(CHECK_DEPS)
        $(CHECK)
 .PHONY: testing/script/check
 
-sysinfo.go: $(srcdir)/mksysinfo.sh config.h
+sysinfo.go: s-sysinfo; @true
+s-sysinfo: $(srcdir)/mksysinfo.sh config.h
        CC="$(CC)" $(SHELL) $(srcdir)/mksysinfo.sh
+       $(SHELL) $(srcdir)/../move-if-change tmp-sysinfo.go sysinfo.go
+       $(STAMP) $@
+
 syscalls/libsyscall.a: $(go_syscall_files) $(go_syscall_c_files) sync.gox
        rm -f syscall.gox syscalls/libsyscall.a
        test -d syscalls || $(MKDIR_P) syscalls
index af123ad..238d0d3 100644 (file)
@@ -4863,8 +4863,12 @@ testing/script/check: $(CHECK_DEPS)
        $(CHECK)
 .PHONY: testing/script/check
 
-sysinfo.go: $(srcdir)/mksysinfo.sh config.h
+sysinfo.go: s-sysinfo; @true
+s-sysinfo: $(srcdir)/mksysinfo.sh config.h
        CC="$(CC)" $(SHELL) $(srcdir)/mksysinfo.sh
+       $(SHELL) $(srcdir)/../move-if-change tmp-sysinfo.go sysinfo.go
+       $(STAMP) $@
+
 syscalls/libsyscall.a: $(go_syscall_files) $(go_syscall_c_files) sync.gox
        rm -f syscall.gox syscalls/libsyscall.a
        test -d syscalls || $(MKDIR_P) syscalls
index 20eae79..321b432 100755 (executable)
@@ -21,8 +21,6 @@ OUT=tmp-sysinfo.go
 
 set -e
 
-rm -f sysinfo.go
-
 rm -f sysinfo.c
 cat > sysinfo.c <<EOF
 #include "config.h"
@@ -388,5 +386,4 @@ echo $msghdr | \
       -e 's/msg_flags/Flags/' \
     >> ${OUT}
 
-mv -f ${OUT} sysinfo.go
 exit $?