aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/multipart/Makefile
blob: d3510e9ddab7761245eeb941ef06902b5cc71470 (plain) (blame)
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
prefix		= /usr/local
DESTDIR		=
BIN_DIR		= $(prefix)/bin
LIB_DIR		= $(prefix)/lib/w3m
distdir		= ./distfiles

LIB_TARGETS	= multipart.cgi

INSTALL		= install -c
INSTALL_SCRIPT	= $(INSTALL) -m 755

PERL		= /usr/local/bin/perl
NKF		= nkf

.SUFFIXES: .in

all: $(LIB_TARGETS)

.in:
	sed -e 's%@PERL@%$(PERL)%g'	\
	    -e 's%@NKF@%$(NKF)%g'	\
	$< > $@
	chmod +x $@

install: $(LIB_TARGETS)
	for file in $(LIB_TARGETS);	\
	do	\
		$(INSTALL_SCRIPT) $$file $(DISTDIR)$(LIB_DIR);	\
	done

dist: all
	@-rm -fr $(distdir)/multipart
	mkdir -p $(distdir)/multipart
	cp Makefile README multipart.cgi multipart.cgi.in \
		$(distdir)/multipart
	( cd $(distdir); \
		 tar -cf - multipart | GZIP='' gzip ) \
		> $(distdir)/multipart.tar.gz
	-rm -fr $(distdir)/multipart