1((author "Sören Tempel")
2 (synopsis "An extensible implementation of the ed text editor as defined in POSIX.1-2008")
3 (version "1.1.0")
4 (category tools)
5 (license "GPLv3")
6 (platform unix)
7 (dependencies r7rs srfi-1 srfi-14 srfi-37 matchable posix-regex)
8 (test-dependencies test)
9 (component-options (csc-options "-d3" "-O3" "-X" "r7rs" "-R" "r7rs"))
10 (cond-expand
11 (package
12 (component-options
13 ;; need static linkange for program component, dynamic for tests
14 (linkage dynamic static)))
15 (else
16 (component-options
17 ;; don't build static libraries to reduce compile time
18 (linkage dynamic))))
19 (components
20 (extension edward.util
21 (source "./lib/util.sld")
22 (source-dependencies
23 "./lib/util.scm"))
24 (extension edward.parse
25 (component-dependencies edward.util)
26
27 (source "./lib/parse.sld")
28 (source-dependencies
29 "./lib/parse/parse.scm"
30 "./lib/parse/util.scm"
31 "./lib/parse/repl.scm"))
32 (extension edward.replace
33 (component-dependencies edward.parse)
34
35 (source "./lib/replace.sld")
36 (source-dependencies
37 "./lib/replace.scm"))
38 (extension edward.buffer
39 (component-dependencies edward.util)
40
41 (source "./lib/buffer.sld")
42 (source-dependencies
43 "./lib/buffer/stack.scm"
44 "./lib/buffer/srfi214-minimal.scm"
45 "./lib/buffer/buffer.scm"))
46 (extension edward.ed.addr
47 (component-dependencies edward.parse)
48
49 (source "./lib/ed/addr.sld")
50 (source-dependencies
51 "./lib/ed/addr.scm"))
52 (extension edward.ed.editor
53 (component-dependencies
54 edward.util
55 edward.parse
56 edward.replace
57 edward.buffer
58 edward.ed.addr)
59
60 (source "./lib/ed/editor.sld")
61 (source-dependencies
62 "./lib/ed/editor.scm"))
63 (extension edward.ed.cmd
64 (component-dependencies
65 edward.util
66 edward.parse
67 edward.ed.addr
68 edward.ed.editor)
69
70 (source "./lib/ed/cmd.sld")
71 (source-dependencies
72 "./lib/ed/cmd.scm"))
73 (extension edward.ed.posix
74 (component-dependencies
75 edward.util
76 edward.parse
77 edward.replace
78 edward.ed.cmd
79 edward.ed.addr
80 edward.ed.editor)
81
82 (source "./lib/ed/posix.sld")
83 (source-dependencies
84 "./lib/ed/posix.scm"))
85 (extension edward.cli
86 (component-dependencies
87 edward.ed.cmd
88 edward.ed.posix
89 edward.ed.editor)
90
91 (source "./lib/cli.sld")
92 (source-dependencies
93 "./lib/cli.scm"))
94 (program bin/edward
95 ;; In package mode, link statically against Egg dependencies.
96 (cond-expand
97 (package
98 (linkage static))
99 (else
100 (linkage dynamic)))
101 ;; Uncomment to also link against C libraries statically.
102 ;(link-options "-L" "-static")
103
104 (install-name "edward")
105 (component-dependencies edward.cli))))