From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sascha Wilde Newsgroups: gmane.emacs.devel Subject: EDE: make project shared objects Date: Thu, 29 Oct 2009 16:01:00 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1256828627 22922 80.91.229.12 (29 Oct 2009 15:03:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Oct 2009 15:03:47 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 29 16:03:41 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N3WXJ-0003XW-En for ged-emacs-devel@m.gmane.org; Thu, 29 Oct 2009 16:03:38 +0100 Original-Received: from localhost ([127.0.0.1]:40844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3WXI-0000Rj-Od for ged-emacs-devel@m.gmane.org; Thu, 29 Oct 2009 11:03:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3WV5-0007kd-Ea for emacs-devel@gnu.org; Thu, 29 Oct 2009 11:01:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3WV3-0007k3-DS for emacs-devel@gnu.org; Thu, 29 Oct 2009 11:01:18 -0400 Original-Received: from [199.232.76.173] (port=56819 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3WV2-0007jr-Sv for emacs-devel@gnu.org; Thu, 29 Oct 2009 11:01:17 -0400 Original-Received: from mail2.sha-bang.de ([78.47.120.114]:60616 helo=mail.sha-bang.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N3WV2-0002pB-Ah for emacs-devel@gnu.org; Thu, 29 Oct 2009 11:01:16 -0400 Original-Received: from kenny.sha-bang.local (xdsldf110.osnanet.de [89.166.159.110]) by mail.sha-bang.de (Postfix) with ESMTPSA id AB4A254E for ; Thu, 29 Oct 2009 16:01:11 +0100 (CET) Original-Received: from wilde by kenny.sha-bang.local with local (Sha Bang MUA v.0711184.68) ID 1N3WUm-0002VY-Uf for emacs-devel@gnu.org; Thu, 29 Oct 2009 16:01:00 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116451 Archived-At: --=-=-= The following patch addresses a bunch of issues: - Some incarnations of libtool (namely the one in Debian Lenny) need --tag even in this simple case - We use the libtool .lo object extension, so we no longer interfere with the default rules for non shared objects - Added missing -c for object generation - Removed LTLINK var definition from compiler, this belongs only to the linker definition. - Fixed the linker definition: there was CPP used, but linking is not done by the preprocessor... :) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=ede-make-shared.diff diff -r 95a232c6691b lisp/cedet/ede/proj-shared.el --- a/lisp/cedet/ede/proj-shared.el Wed Oct 28 17:41:17 2009 +0100 +++ b/lisp/cedet/ede/proj-shared.el Thu Oct 29 15:48:38 2009 +0100 @@ -71,18 +71,19 @@ "ede-c-shared-compiler-libtool" :name "libtool" :variables '(("LIBTOOL" . "libtool") - ("LTCOMPILE" . "$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)") - ("LTLINK" . "$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -L. -o $@") + ("LTCOMPILE" . + "$(LIBTOOL) --tag=CC --mode=compile $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)") ) :rules (list (ede-makefile-rule "cc-inference-rule-libtool" - :target "%.o" + :target "%.lo" :dependencies "%.c" :rules '("@echo '$(LTCOMPILE) -o $@ $<'; \\" "$(LTCOMPILE) -o $@ $<" ) )) :autoconf '("AC_PROG_LIBTOOL") + :objectextention ".lo" ) "Compiler for C sourcecode.") @@ -94,7 +95,7 @@ :sourcetype '(ede-source-c++) :variables '( ("LIBTOOL" . "libtool") - ("LTLINK" . "$(LIBTOOL) --tag=CPP --mode=link $(CPP) $(CFLAGS) $(LDFLAGS) -L. -o $@") + ("LTLINK" . "$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -L.") ) :commands '("$(LTLINK) -o $@ $^") :autoconf '("AC_PROG_LIBTOOL") --=-=-= It should be transferred to the libtool based c++ compiler/linker definitipon, too -- but I'm no c++ guy, so I would like to leave this to someone who is willing/able to test it... ;-) FWIW: Linking against libs in make projects still doesn't work. I'll have a look t this next... cheers sascha -- Sascha Wilde : "There are 10 types of people in the world. : Those who understand binary and those who don't." --=-=-=--