Bugfix: do-elinstall now places load-path correctly in main dir.
[org2blog.git] / make-target.el
bloba8ae758e496268fcf2a25899fdccfa05aae9121e
1 ;;;_ org2blog/make-target.el --- Help to make converted files
3 ;;;_. Headers
4 ;;;_ , License
5 ;; Copyright (C) 2010 Tom Breton (Tehom)
7 ;; Author: Tom Breton (Tehom) <tehom@panix.com>
8 ;; Keywords: lisp, internal
10 ;; This file is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version.
15 ;; This file is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to
22 ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
25 ;;;_ , Commentary:
27 ;; Basically calls make. Assumes makefile has already been set up.
30 ;;;_ , Requires
32 ;;;_. Body
34 ;;;_ , Medium-general: link conversion help
36 ;;;_ . org2blog:convert-filename
37 (defun org2blog:convert-filename (path suffix converted-path)
39 (concat
40 (expand-file-name
41 (file-relative-name
42 (file-name-sans-extension path))
43 converted-path)
44 suffix))
46 ;;;_ . org2blog:make-target
47 (defun org2blog:make-target (filename)
49 ;;This completely relies on having "make" already set up properly.
50 ;;Using elmake would be an alternative to make.
52 (let ((status
53 (call-process "make" nil nil nil filename)))
54 (unless
55 (equal status 0)
56 (error "Failed to make %s" filename))))
58 ;;;_. Footers
59 ;;;_ , Provides
61 (provide 'org2blog/make-target)
63 ;;;_ * Local emacs vars.
64 ;;;_ + Local variables:
65 ;;;_ + mode: allout
66 ;;;_ + End:
68 ;;;_ , End
69 ;;; org2blog/make-target.el ends here