1 ;;;_ org2blog/make-target.el --- Help to make converted files
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)
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.
27 ;; Basically calls make. Assumes makefile has already been set up.
34 ;;;_ , Medium-general: link conversion help
36 ;;;_ . org2blog:convert-filename
37 (defun org2blog:convert-filename
(path suffix target-prefix src-prefix
)
40 ((path-se (file-name-sans-extension path
))
41 ;;Relative to source top directory
45 (expand-file-name src-prefix
)))
46 ;;Relocated to target top directory
52 (concat target-path-se suffix
)))
54 ;;;_ . org2blog:make-target
55 (defun org2blog:make-target
(filename)
57 ;;This completely relies on having "make" already set up properly.
58 ;;Using elmake would be an alternative to make.
61 (call-process "make" nil nil nil filename
)))
64 (error "Failed to make %s" filename
))))
69 (provide 'org2blog
/make-target
)
71 ;;;_ * Local emacs vars.
72 ;;;_ + Local variables:
77 ;;; org2blog/make-target.el ends here