File: Makefile

package info (click to toggle)
libwebapp-ruby 0.4-2.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 240 kB
  • sloc: ruby: 2,245; makefile: 79
file content (13 lines) | stat: -rw-r--r-- 279 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
RUBY=ruby

SRC_CGI = $(wildcard *.cgi)
DST_CGI = $(patsubst %.cgi,cgi-bin/%.cgi,$(SRC_CGI))

all: $(DST_CGI)

cgi-bin:
	mkdir cgi-bin

$(DST_CGI): cgistub.erb cgi-bin
	$(RUBY) -rerb -e 'ERB.new(STDIN.read).run' $(patsubst cgi-bin/%.cgi,%.cgi,$@) < cgistub.erb > $@
	chmod 755 $@