From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: A simple org tangle and weave makefile Date: Thu, 12 Jun 2014 15:54:11 -0400 Message-ID: <87ioo5x4td.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvBPq-0005ER-Le for emacs-orgmode@gnu.org; Thu, 12 Jun 2014 16:16:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WvBPm-00005B-Cv for emacs-orgmode@gnu.org; Thu, 12 Jun 2014 16:16:06 -0400 Received: from mail-ob0-x22d.google.com ([2607:f8b0:4003:c01::22d]:47620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvBPm-000056-8Z for emacs-orgmode@gnu.org; Thu, 12 Jun 2014 16:16:02 -0400 Received: by mail-ob0-f173.google.com with SMTP id va2so1910866obc.32 for ; Thu, 12 Jun 2014 13:16:01 -0700 (PDT) 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: Grant Rettke Cc: "emacs-orgmode@gnu.org" --=-=-= Content-Type: text/plain Grant Rettke writes: > Hi, > > My goals was to have a simple makefile to tangle and weave a document; > so org-mk was out of scope. > > Just wondering; how could I have done it better? > > ########## > INIT=.emacs.el > > $(INIT): TC3F.org > time emacs --batch --no-init-file --load .org-mode.emacs.el > --find-file TC3F.org --funcall org-babel-tangle --kill > > TC3F.html: $(INIT) > time emacs --batch --no-init-file --load .org-mode.emacs.el > --find-file TC3F.org --funcall org-html-export-to-html --kill > > clean: > rm $(INIT) > rm TC3F.html > ########## > > Kind regards, > I don't know if this is better, but its closer to what I use locally. --=-=-= Content-Type: text/x-make Content-Disposition: inline; filename=Makefile EMACS=emacs BATCH_EMACS=$(EMACS) --batch -Q -l init.el %.html: %.org $(BATCH_EMACS) $*.org -f org-html-export-to-html %.tex: %.org init.el $(BATCH_EMACS) $*.org -f org-latex-export-to-latex %.el: %.org init.el $(BATCH_EMACS) $*.org -f org-babel-tangle # two fancier alternatives to the above which provide a default file # name and encode language information %.el: %.org init.el $(BATCH_EMACS) $*.org \ --eval '(org-babel-tangle nil "$@" (quote emacs-lisp))' %.sh: %.org init.el $(BATCH_EMACS) $*.org \ --eval '(org-babel-tangle nil "$@" (quote bash))' --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > > Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi > gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/ > =E2=80=9CWisdom begins in wonder.=E2=80=9D --Socrates > ((=CE=BB (x) (x x)) (=CE=BB (x) (x x))) > =E2=80=9CLife has become immeasurably better since I have been forced to = stop > taking it seriously.=E2=80=9D --ThompsonH > --=20 Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D (see https://u.fsf.org/yw) --=-=-=--