From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?G=C3=B6ktu=C4=9F_Kayaalp?= Newsgroups: gmane.emacs.devel Subject: Re: How to ship native modules? Date: Tue, 21 Feb 2017 20:49:49 +0300 Message-ID: <86h93nzb5u.fsf@xi.bootis> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1487699371 3695 195.159.176.226 (21 Feb 2017 17:49:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 21 Feb 2017 17:49:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: monnier@iro.umontreal.ca Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 21 18:49:27 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgEZ1-0000Ab-IP for ged-emacs-devel@m.gmane.org; Tue, 21 Feb 2017 18:49:23 +0100 Original-Received: from localhost ([::1]:47440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgEZ5-0001oc-JB for ged-emacs-devel@m.gmane.org; Tue, 21 Feb 2017 12:49:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgEY3-0001my-9r for emacs-devel@gnu.org; Tue, 21 Feb 2017 12:48:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgEXy-0003nf-E2 for emacs-devel@gnu.org; Tue, 21 Feb 2017 12:48:23 -0500 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:32958) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgEXy-0003mM-6s for emacs-devel@gnu.org; Tue, 21 Feb 2017 12:48:18 -0500 Original-Received: from mfilter34-d.gandi.net (mfilter34-d.gandi.net [217.70.178.165]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 25D6FFB8C9; Tue, 21 Feb 2017 18:48:15 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter34-d.gandi.net Original-Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter34-d.gandi.net (mfilter34-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id Yd7uJxQcqrKl; Tue, 21 Feb 2017 18:48:13 +0100 (CET) X-Originating-IP: 46.2.18.159 Original-Received: from xi.bootis.xi.bootis (unknown [46.2.18.159]) (Authenticated sender: self@gkayaalp.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 33732FB8B3; Tue, 21 Feb 2017 18:48:13 +0100 (CET) In-Reply-To: jwv37f7oba2.fsf-monnier+gmane.emacs.devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.198 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212528 Archived-At: > (eval-when-compile (shell-command "make")) Mind that this can cause problems in a system where =E2=80=98make=E2=80=99 = points to sth. else than GNU Make, e.g. on BSDs it's bmake. I'd rather have (defconst my-module-C-extensions-compiled-p (=3D 0 (eval-when-compile (shell-command (or (executable-find "gmake") "make"))))) but maybe it would be better to introduce some standard machinery for native modules (at least for those in C) early on that later the community won't have to deal with fragmentation over different ad-hoc systems. At least a standard way to define how to build the module would be nice: (define-dynamic-module example :path "/path/to/module" :compile-method gnu-make) ;; (build-dynamic-module 'example) That can be included in NAME-pkg.el for packaging and distributing modules (or maybe define-package may be extended for building dynamic modules of a package). Certain make recipes like =E2=80=98all=E2=80=99 and= =E2=80=98test=E2=80=99 may be required. Regards, -gk.