File: FLIM-MK

package info (click to toggle)
flim 1%3A1.14.9%2B0.20201117-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 864 kB
  • sloc: lisp: 7,300; makefile: 86; sh: 86
file content (93 lines) | stat: -rw-r--r-- 2,951 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
;;; -*-Emacs-Lisp-*-

;; FLIM-MK: installer for FLIM.

;;; Code:

(defun config-flim ()
  (let (prefix lisp-dir version-specific-lisp-dir)
    (and (setq prefix (car command-line-args-left))
	 (or (string-equal "NONE" prefix)
	     (defvar PREFIX prefix)))
    (setq command-line-args-left (cdr command-line-args-left))
    (and (setq lisp-dir (car command-line-args-left))
	 (or (string-equal "NONE" lisp-dir)
	     (defvar LISPDIR lisp-dir)))
    (setq command-line-args-left (cdr command-line-args-left))
    (and (setq version-specific-lisp-dir (car command-line-args-left))
	 (or (string-equal "NONE" version-specific-lisp-dir)
	     (progn
	       (defvar VERSION_SPECIFIC_LISPDIR version-specific-lisp-dir)
	       (princ (format "VERSION_SPECIFIC_LISPDIR=%s\n"
			      VERSION_SPECIFIC_LISPDIR)))))
    (setq command-line-args-left (cdr command-line-args-left))
    (load-file "FLIM-CFG")
    (load-file "FLIM-ELS")
    (princ (format "PREFIX=%s
LISPDIR=%s\n" PREFIX LISPDIR))))

(defun compile-flim ()
  (config-flim)
  (compile-elisp-modules flim-version-specific-modules ".")
  (compile-elisp-modules flim-modules "."))

(defun install-flim ()
  (config-flim)
  (if flim-version-specific-modules
      (install-elisp-modules flim-version-specific-modules "./"
			     FLIM_VERSION_SPECIFIC_DIR))
  (install-elisp-modules flim-modules "./" FLIM_DIR))

(defun check-flim ()
  (config-flim)
  (require 'lunit)
  (let ((files (directory-files "tests" t "^test-.*\\.el$"))
	(suite (lunit-make-test-suite)))
    (while files
      (if (file-regular-p (car files))
	  (progn
	    (load-file (car files))
	    (lunit-test-suite-add-test
	     suite (lunit-make-test-suite-from-class
		    (intern (file-name-sans-extension
			     (file-name-nondirectory (car files))))))))
      (setq files (cdr files)))
    (lunit suite)))

(defun config-flim-package ()
  (let (package-dir)
    (and (setq package-dir (car command-line-args-left))
	 (or (string= "NONE" package-dir)
	     (defvar PACKAGEDIR package-dir)))
    (setq command-line-args-left (cdr command-line-args-left))
    (load-file "FLIM-CFG")
    (load-file "FLIM-ELS")
    (setq flim-modules (append flim-modules
			       '(auto-autoloads custom-load)))
    (princ (format "PACKAGEDIR=%s\n" PACKAGEDIR))))

(defun compile-flim-package ()
  (config-flim-package)

  (setq autoload-package-name "flim")
  (add-to-list 'command-line-args-left ".")
  (batch-update-directory)

  (add-to-list 'command-line-args-left ".")
  (Custom-make-dependencies)

  (compile-elisp-modules flim-version-specific-modules ".")
  (compile-elisp-modules flim-modules "."))

(defun install-flim-package ()
  (config-flim-package)
  (install-elisp-modules (append flim-version-specific-modules
				 flim-modules)
			 "./"
			 (expand-file-name FLIM_PREFIX
					   (expand-file-name "lisp"
							     PACKAGEDIR)))
  (delete-file "./auto-autoloads.el")
  (delete-file "./custom-load.el"))

;;; FLIM-MK ends here