Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@BonfaceKilz
Created July 16, 2020 21:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BonfaceKilz/db98fc723ffb3af297e79dd4b2daa8d2 to your computer and use it in GitHub Desktop.
Save BonfaceKilz/db98fc723ffb3af297e79dd4b2daa8d2 to your computer and use it in GitHub Desktop.
Sample MAKEFILE to convert org files to md using emacs
#!/usr/bin/make -f
SHELL := emacs
.SHELLFLAGS := --quick --batch --eval
orgs := $(wildcard *.org)
objs := $(orgs:.org=.md) $(orgs:.org=.texi)
.PHONY: all
all: $(objs)
.ONESHELL:
%.md %.texi: %.org
(with-temp-buffer
(require 'ox-md)
(require 'ox-texinfo)
(when (insert-file-contents "$<")
(org-mode)
(org-export-to-file 'md "$*.md")
(org-export-to-file 'texinfo "$*.texi")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment