cweb: use elisp shorthand
This commit is contained in:
parent
38f10897c1
commit
ea2c8903e3
1 changed files with 6 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
class Cweb < Formula
|
||||
desc "Literate documentation system for C, C++, and Java"
|
||||
homepage "http://www-cs-faculty.stanford.edu/~uno/cweb.html"
|
||||
homepage "https://cs.stanford.edu/~uno/cweb.html"
|
||||
url "ftp://ftp.cs.stanford.edu/pub/cweb/cweb-3.64ad.tar.gz"
|
||||
sha256 "1f0bb7aa35b8d43b721d588ed5003620d38de1959652f23bac2847ffcb922c0f"
|
||||
|
||||
|
@ -15,19 +15,18 @@ class Cweb < Formula
|
|||
def install
|
||||
ENV.deparallelize
|
||||
|
||||
macrosdir = (share/"texmf/tex/generic")
|
||||
emacsdir = (share/"emacs/site-lisp/cweb")
|
||||
cwebinputs = (lib/"cweb")
|
||||
macrosdir = share/"texmf/tex/generic"
|
||||
cwebinputs = lib/"cweb"
|
||||
|
||||
# make install doesn't use `mkdir -p` so this is needed
|
||||
[bin, man1, macrosdir, emacsdir, cwebinputs].each(&:mkpath)
|
||||
[bin, man1, macrosdir, elisp, cwebinputs].each(&:mkpath)
|
||||
|
||||
system "make", "install",
|
||||
"DESTDIR=#{bin}/",
|
||||
"MANDIR=#{man1}",
|
||||
"MANEXT=1",
|
||||
"MACROSDIR=#{macrosdir}",
|
||||
"EMACSDIR=#{emacsdir}",
|
||||
"EMACSDIR=#{elisp}",
|
||||
"CWEBINPUTS=#{cwebinputs}"
|
||||
end
|
||||
|
||||
|
@ -44,6 +43,6 @@ class Cweb < Formula
|
|||
EOS
|
||||
system bin/"ctangle", "test.w"
|
||||
system ENV.cc, "test.c", "-o", "hello"
|
||||
assert_equal "Hello world!", `./hello`
|
||||
assert_equal "Hello world!", pipe_output("./hello")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue