From patchwork Mon Jul 19 08:40:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [gccgo] Fix libgo clean Date: Sun, 18 Jul 2010 22:40:55 -0000 From: Ian Taylor X-Patchwork-Id: 59182 Message-Id: To: gcc-patches@gcc.gnu.org This patch from Vinu Rajashekhar fixes "make clean" in libgo. Committed to gccgo branch. Ian diff -r e4d613b648f1 libgo/Makefile.am --- a/libgo/Makefile.am Mon Jul 19 01:28:12 2010 -0700 +++ b/libgo/Makefile.am Mon Jul 19 01:39:10 2010 -0700 @@ -1125,7 +1125,7 @@ os/libsignal.la \ rpc/libjsonrpc.la \ runtime/libpprof.la \ - libsyscall.la + syscalls/libsyscall.la libgo_la_SOURCES = $(runtime_files) @@ -2089,14 +2089,14 @@ sysinfo.go: $(srcdir)/mksysinfo.sh config.h $(SHELL) $(srcdir)/mksysinfo.sh -libsyscall.a: $(go_syscall_files) $(go_syscall_c_files) sync.gox - rm -f syscall.gox libsyscall.a +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 files=`echo $^ | sed -e 's/[^ ]*\.gox//g' -e's/[^ ]*\.c//g'`; \ $(LTGOCOMPILE) -c -fgo-prefix="libgo__" -o syscalls/syscall.o $$files $(LTCOMPILE) -c -o syscalls/errno.o $(srcdir)/syscalls/errno.c - $(AR) rc libsyscall.a syscalls/syscall.o syscalls/errno.o -libsyscall.la: libsyscall.a + $(AR) rc syscalls/libsyscall.a syscalls/syscall.o syscalls/errno.o +syscalls/libsyscall.la: syscalls/libsyscall.a $(LINK) syscalls/syscall.lo syscalls/errno.lo # How to build a .gox file from a .a file. @@ -2182,7 +2182,7 @@ $(BUILDGOX) syslog.gox: syslog/libsyslog.a $(BUILDGOX) -syscall.gox: libsyscall.a +syscall.gox: syscalls/libsyscall.a $(BUILDGOX) tabwriter.gox: tabwriter/libtabwriter.a $(BUILDGOX) @@ -2436,3 +2436,13 @@ testing/script/check check-am: $(TEST_PACKAGES) + +mostlyclean-local: + find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f + find . -name '*.o' -print | xargs rm -f + +clean-local: + find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f + find . -name '*.a' -print | xargs rm -f + +CLEANFILES = *.go *.gox goc2c *.c s-version