-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (44 loc) · 1.2 KB
/
Makefile
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
#
# Makefile
#
SHELL = /bin/sh
RUBY = ruby
FRUBY = ruby
RM = rm
#### Start of system configuration section. ####
prefix = $(DESTDIR)/usr
bindir = $(prefix)/bin
libdir = $(prefix)/lib/ruby/$(shell $(RUBY) -rrbconfig -e 'puts Config::CONFIG["ruby_version"]')
mandir = $(DESTDIR)/usr/share/man
bins = $(wildcard bin/*)
libs = $(wildcard lib/*.rb)
libs_debian = $(wildcard lib/debian/*.rb)
man1 = $(wildcard man/*.1)
all:
clean:
@-(cd t; rm -f test.log)
distclean: clean
realclean: distclean
install:
@$(FRUBY) -r ftools -e 'File::makedirs(*ARGV)' $(bindir)
@$(FRUBY) -r ftools -e 'File::makedirs(*ARGV)' $(libdir)
@for b in $(bins); do \
$(FRUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0755, true)' \
$$b $(bindir); \
done
@for rb in $(libs); do \
$(FRUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0644, true)'\
$$rb $(libdir); \
done
@mkdir $(libdir)/debian/
@for rb in $(libs_debian); do \
$(FRUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0644, true)'\
$$rb $(libdir)/debian; \
done
@mkdir -p $(mandir)/man1
@for m in $(man1); do \
$(FRUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0644, true)' \
$$m $(mandir)/man1; \
done
test:
@(cd t; $(RUBY) testall.rb -o test.log)