From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: How to build a project from org files using ant/make? Date: Fri, 02 Mar 2012 13:54:50 -0700 Message-ID: <877gz2lo4l.fsf@gmx.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3ZVZ-0003bc-Py for emacs-orgmode@gnu.org; Fri, 02 Mar 2012 15:55:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3ZVF-0005Cm-76 for emacs-orgmode@gnu.org; Fri, 02 Mar 2012 15:55:21 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:55005) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1S3ZVF-0005CQ-0M for emacs-orgmode@gnu.org; Fri, 02 Mar 2012 15:55:01 -0500 In-Reply-To: (Robert McIntyre's message of "Fri, 2 Mar 2012 14:45:09 -0600") 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: Robert McIntyre Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Robert McIntyre writes: > Hi, > > I use org-babel to produce the source and html documentation for my projects. > > My projects generally look like this: > > [~/tmp/org-project] $ tree > . > |-- html > | `-- proj.html > |-- org > | `-- proj.org > `-- src > `-- namesace > |-- prog_1.clj > `-- prog_2.clj > > Here prog_1.clj, prog_2.clj, and proj.html are all generated from the > proj.org file. > > Because the source and html files are generated files, I don't include > them in source control. > > When I download my project on another computer, I want to be able to > generate all these files again, preferably from a makefile/build.xml, > etc. > > What is the best practice for doing this? Right now, I maintain two > shell scripts called "tangle" and "weave" that invoke emacs on the > project, but these rely on my specific emacs setup. How can I make it > possible for someone to build my project if they have emacs and > make/ant? What are other people doing when it comes to automatically > building a project whose source files are generated from org files? > I've attached the Makefile I use to build a pdf of my proposal from the Org-mode source. Notice the EMACS, BATCH_EMACS, and proposal.tex lines. You should be able to adopt proposal.tex to export source code by replacing org-export-as-latex with org-babel-tangle. This setup has worked very reliably for me and should extend naturally. I use an init.el file to holds project-specific customization. If you can assume that the user has Emacs24 installed, then you need not do anything special and can omit init.el entirely, otherwise you will have to ensure that a recent version of Org-mode is installed and loaded. Hope this helps -- Eric --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=Makefile Content-Transfer-Encoding: base64 RU1BQ1M9ZW1hY3MKQkFUQ0hfRU1BQ1M9JChFTUFDUykgLS1iYXRjaCAtUSAtbCBpbml0LmVsIHBy b3Bvc2FsLm9yZwoKYWxsOiBwcm9wb3NhbC5wZGYKCnByb3Bvc2FsLmh0bWw6IHByb3Bvc2FsLm9y ZwoJJChCQVRDSF9FTUFDUykgLWYgb3JnLWV4cG9ydC1hcy1odG1sCgpwcm9wb3NhbC50ZXg6IHBy b3Bvc2FsLm9yZyBwcm9wb3NhbC5iaWIgaW5pdC5lbAoJJChCQVRDSF9FTUFDUykgLWYgb3JnLWV4 cG9ydC1hcy1sYXRleAoKcHJvcG9zYWwuYmliOiB0YXNrcy5vcmcgYmliLWV4cG9ydC5lbAoJJChC QVRDSF9FTUFDUykgLWwgYmliLWV4cG9ydC5lbAoKcHJvcG9zYWwucGRmOiBwcm9wb3NhbC50ZXgg Z2FudHQucGRmCglybSAtZiBwcm9wb3NhbC5hdXgKCWlmIHBkZmxhdGV4IHByb3Bvc2FsLnRleCA8 L2Rldi9udWxsOyB0aGVuIFwKCQl0cnVlOyBcCgllbHNlIFwKCQlzdGF0PSQkPzsgdG91Y2ggcHJv cG9zYWwucGRmOyBleGl0ICQkc3RhdDsgXAoJZmkKCWJpYnRleCBwcm9wb3NhbAoJd2hpbGUgZ3Jl cCAiUmVydW4gdG8gZ2V0IiBwcm9wb3Nh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