File: extconf.rb

package info (click to toggle)
libiconv-ruby 0.4.5-2.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 96 kB
  • ctags: 132
  • sloc: ansic: 471; makefile: 58; ruby: 25
file content (32 lines) | stat: -rwxr-xr-x 773 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/env ruby

require 'mkmf'

dir_config("iconv")

if have_header("iconv.h")
  have_library("iconv", "iconv")
  if method(:have_func).arity != 1
    have_func("rb_obj_freeze", "ruby.h")
    have_func("rb_block_given_p", "ruby.h")
    have_func("rb_str_buf_new", "ruby.h")
  end
  $objs = ["iconv.o"]
  create_makefile("iconv")
end
open("Makefile", "a") {|mf|
  mf.print <<EOMF

doc: iconv.html iconv.rlog.html iconv.rmi.html
dist tarball: iconv.tarball

Makefile: extconf.rb; ruby $<

%.html: %.c; rd2html --with-css=rd.css -o$* $<
%.rmi.html: %.rmi; rmi2html $< > $@
%.rmi: %.c; rd2rmi -o$* $<
%.rlog.html: %.rlog %.rmi; rd2html --with-rmi=$*.rmi --with-css=rd.css -o$*.rlog $<
%.tarball: %.c %.rlog MANIFEST; mktarball -f $< $*
%.rlog: %.c; rlog2rd -o$@ $<
EOMF
}