From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27222 invoked by alias); 6 Mar 2011 19:05:56 -0000 Received: (qmail 27213 invoked by uid 22791); 6 Mar 2011 19:05:55 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 06 Mar 2011 19:05:44 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p26J5Ld4031795 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 6 Mar 2011 14:05:21 -0500 Received: from host1.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p26J5J6k006384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 6 Mar 2011 14:05:21 -0500 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p26J5JE1023727; Sun, 6 Mar 2011 20:05:19 +0100 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p26J5FcW023718; Sun, 6 Mar 2011 20:05:15 +0100 Date: Sun, 06 Mar 2011 22:44:00 -0000 From: Jan Kratochvil To: Andreas Schwab Cc: Mark Kettenis , brobecker@adacore.com, tromey@redhat.com, yao@codesourcery.com, gdb-patches@sourceware.org Subject: [patch] Fix Solaris make gdb/data-directory/ compat. [Re: [rfa/rfc] Build libcommon.a for gdb and gdbserver] Message-ID: <20110306190515.GC22789@host1.jankratochvil.net> References: <4D34C9DE.3040603@codesourcery.com> <4D375F44.70504@codesourcery.com> <20110219121448.GA17297@adacore.com> <201102191318.p1JDIQE6005275@glazunov.sibelius.xs4all.nl> <20110306161631.GA15735@host1.jankratochvil.net> <201103061658.p26Gwvni017860@glazunov.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00407.txt.bz2 On Sun, 06 Mar 2011 18:23:00 +0100, Andreas Schwab wrote: > The problem here is that $(PYTHON_FILES) appears as prerequisite of the > rule and the files are found via VPATH, so Solaris make modified the > expansion of $(PYTHON_FILES) to prefix it with the VPATH, causing > PYTHON_SRCDIR to appear twice. (*Note (autoconf) Automatic Rule Rewriting::) * Automatic Rule Rewriting:: `VPATH' goes wild on Solaris Thanks for the explanatory documentation reference. Fixed it on OpenSolaris with /usr/bin/make and checked it is still compatible with GNU/Linux. Checked both the in-tree and out-of-tree compilation and installation. Checked out-of-tree build directory in a different number of subdirectories than the srcdir. I will even check it in with no comments in some time but a review would be better. Thanks, Jan gdb/ 2011-03-06 Jan Kratochvil Fix Solaris make compatibility. * data-directory/Makefile.in (stamp-syscalls): Copy the files unconditionally. Drop variable files. Use $^, skip Makefile. (install-syscalls): Copy the files unconditionally. (stamp-python): Use $^, skip Makefile. New variable file_pure. @@ -98,12 +98,9 @@ all: stamp-syscalls stamp-python stamp-syscalls: Makefile $(SYSCALLS_FILES) rm -rf ./$(SYSCALLS_DIR) mkdir ./$(SYSCALLS_DIR) - files='$(SYSCALLS_FILES)' ; \ - for file in $$files ; do \ - f=$(SYSCALLS_SRCDIR)/$$file ; \ - if test -f $$f ; then \ - $(INSTALL_DATA) $$f ./$(SYSCALLS_DIR) ; \ - fi ; \ + for f in $^ ; do \ + if test "$$f" = Makefile; then continue; fi; \ + $(INSTALL_DATA) $$f ./$(SYSCALLS_DIR) ; \ done touch $@ @@ -120,9 +117,7 @@ install-syscalls: files='$(SYSCALLS_FILES)' ; \ for file in $$files; do \ f=$(SYSCALLS_SRCDIR)/$$file ; \ - if test -f $$f ; then \ - $(INSTALL_DATA) $$f $(SYSCALLS_INSTALL_DIR) ; \ - fi ; \ + $(INSTALL_DATA) $$f $(SYSCALLS_INSTALL_DIR) ; \ done .PHONY: uninstall-syscalls @@ -140,11 +135,13 @@ uninstall-syscalls: stamp-python: Makefile $(PYTHON_FILES) rm -rf ./$(PYTHON_DIR) - files='$(PYTHON_FILES)' ; \ + files='$^' ; \ for file in $$files ; do \ - dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \ + if test "$$file" = Makefile; then continue; fi; \ + file_pure=`echo "$$file" | sed 's,^$(PYTHON_SRCDIR)/*,,'` ; \ + dir=`echo "$$file_pure" | sed 's,/[^/]*$$,,'` ; \ $(INSTALL_DIR) ./$(PYTHON_DIR)/$$dir ; \ - $(INSTALL_DATA) $(PYTHON_SRCDIR)/$$file ./$(PYTHON_DIR)/$$dir ; \ + $(INSTALL_DATA) $$file ./$(PYTHON_DIR)/$$dir ; \ done touch $@