From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Not overwriting unchanged source code files when tangling Date: Fri, 18 Nov 2011 18:02:12 +0100 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRSA2-00018c-Al for emacs-orgmode@gnu.org; Fri, 18 Nov 2011 12:23:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RRS9y-0003wS-5J for emacs-orgmode@gnu.org; Fri, 18 Nov 2011 12:23:34 -0500 Received: from mail-ey0-f169.google.com ([209.85.215.169]:52066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRS9y-0003wF-0l for emacs-orgmode@gnu.org; Fri, 18 Nov 2011 12:23:30 -0500 Received: by eye4 with SMTP id 4so4190921eye.0 for ; Fri, 18 Nov 2011 09:23:28 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Holger Hoefling Cc: emacs-orgmode@gnu.org On 18.11.2011, at 14:17, Holger Hoefling wrote: > Hi, >=20 > I have a problem/request for org-mode and was looking for help. I am = using org-mode to write source code files and tangle them out. I want to = compile them using make. My problem now is that org-mode overwrites the = old files every time I tangle them out, therefore also updating the time = stamp - even if nothing has changed. Subsequently, when I run make, = everything gets recompiled, not just the changed source code files as = all time stamps have changed. >=20 > Is there an option for org-mode to only overwrite source code files = that get tangled out if they have truly changed? How about changing the make file so that the dependence is on the Org = file, not on the source file? You could then arrange for make to call emacs in batch-mode to tangle = the source file and then compile it? Something along the lines of.... (untested, and probably wrong in this = way...) file.o: somefile.org emacs -batch --eval '(org-babel-tangle-file "somefile.org")' cc file.o .... - Carsten=