source: trunk/base/src/portindex/Makefile @ 7230

Last change on this file since 7230 was 7230, checked in by kevin, 16 years ago

Allow installs into arbitrary locations.

  • Property svn:eol-style set to native
File size: 846 bytes
Line 
1INSTALL     = /usr/bin/install -c
2PREFIX     ?= /Library/WebServer/Documents/ports
3cgibin      = $(PREFIX)/cgi-bin
4portindex   = $(PREFIX)/index
5portfiles   = $(PREFIX)/files
6srcdir      = .
7
8all: portregister.cgi portsubmit.cgi initialize.sql register.html
9
10%.cgi: %.pl
11        @ echo $@
12        @ cat $< | sed "/@@PREFIX@@/s//$(subst /,\/,$(PREFIX))/" > $@
13
14install: all
15        mkdir -p $(PREFIX)
16        chown www:www $(PREFIX)
17        chmod 0775 $(PREFIX)
18        $(INSTALL) -m 644 register.html $(PREFIX)
19        mkdir -p $(cgibin)
20        chown www:www $(cgibin)
21        chmod 0775 $(cgibin)
22        $(INSTALL) -m 755 portsubmit.cgi $(cgibin)
23        $(INSTALL) -m 755 portregister.cgi $(cgibin)
24        mkdir -p $(portindex)
25        chown www:www $(portindex)
26        chmod 0775 $(portindex)
27        mkdir -p $(portfiles)
28        chown www:www $(portfiles)
29        chmod 0775 $(portfiles)
30        $(INSTALL) -m 644 initialize.sql $(portindex)
31
32clean:
33        rm -f *.cgi
Note: See TracBrowser for help on using the repository browser.