emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to build a project from org files using ant/make?


From: Eric Schulte
Subject: Re: [O] How to build a project from org files using ant/make?
Date: Fri, 02 Mar 2012 13:54:50 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux)

Robert McIntyre <address@hidden> 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

Attachment: Makefile
Description: Binary data

>
> sincerely,
> --Robert McIntyre
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]