ob-makefile.el 1.48 KB
Newer Older
Rasmus's avatar
Rasmus committed
1
;;; ob-makefile.el --- Babel Functions for Makefile  -*- lexical-binding: t; -*-
Bastien Guerry's avatar
Bastien Guerry committed
2

Paul Eggert's avatar
Paul Eggert committed
3
;; Copyright (C) 2009-2020 Free Software Foundation, Inc.
Bastien Guerry's avatar
Bastien Guerry committed
4

5 6
;; Author: Eric Schulte
;; 	   Thomas S. Dye
Bastien Guerry's avatar
Bastien Guerry committed
7
;; Keywords: literate programming, reproducible research
Rasmus's avatar
Rasmus committed
8
;; Homepage: https://orgmode.org
Bastien Guerry's avatar
Bastien Guerry committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
23
;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
Bastien Guerry's avatar
Bastien Guerry committed
24 25 26

;;; Commentary:

Rasmus's avatar
Rasmus committed
27
;; This file exists solely for tangling a Makefile from Org files.
Bastien Guerry's avatar
Bastien Guerry committed
28 29 30 31 32 33

;;; Code:
(require 'ob)

(defvar org-babel-default-header-args:makefile '())

Rasmus's avatar
Rasmus committed
34
(defun org-babel-execute:makefile (body _params)
Bastien Guerry's avatar
Bastien Guerry committed
35 36 37 38
  "Execute a block of makefile code.
This function is called by `org-babel-execute-src-block'."
  body)

Rasmus's avatar
Rasmus committed
39
(defun org-babel-prep-session:makefile (_session _params)
Bastien Guerry's avatar
Bastien Guerry committed
40 41 42 43 44 45 46 47 48
  "Return an error if the :session header argument is set.  Make
does not support sessions."
  (error "Makefile sessions are nonsensical"))

(provide 'ob-makefile)



;;; ob-makefile.el ends here