aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-11-21 09:21:59 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-11-21 09:21:59 +0000
commit83b20bee29dac587d83bd7ace62c6b84022109d2 (patch)
tree8c3ac9bc8bf27b257628d8a32b6dcdddab6ff176 /scripts
parent[w3m-dev 02472] cleanup CYGWIN macro (diff)
downloadw3m-83b20bee29dac587d83bd7ace62c6b84022109d2.tar.gz
w3m-83b20bee29dac587d83bd7ace62c6b84022109d2.zip
[w3m-dev 02470]
Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r--scripts/Makefile25
-rw-r--r--scripts/multipart/Makefile28
-rw-r--r--scripts/multipart/README2
-rw-r--r--scripts/w3mman/Makefile38
-rw-r--r--scripts/w3mman/README4
5 files changed, 66 insertions, 31 deletions
diff --git a/scripts/Makefile b/scripts/Makefile
new file mode 100644
index 0000000..00ee78c
--- /dev/null
+++ b/scripts/Makefile
@@ -0,0 +1,25 @@
+
+prefix = /usr/local
+DESTDIR =
+BIN_DIR = $(prefix)/bin
+LIB_DIR = $(prefix)/lib/w3m
+
+LIB_TARGETS = dirlist.cgi
+
+INSTALL = install -c
+INSTALL_SCRIPT = $(INSTALL) -m 755
+
+PERL = /usr/local/bin/perl
+
+.SUFFIXES: .in
+
+all: $(LIB_TARGETS)
+
+.in:
+ sed 's%@PERL@%$(PERL)%' $< > $@
+
+install: $(LIB_TARGETS)
+ for file in $(LIB_TARGETS); \
+ do \
+ $(INSTALL_SCRIPT) $$file $(DISTDIR)$(LIB_DIR); \
+ done
diff --git a/scripts/multipart/Makefile b/scripts/multipart/Makefile
index 8f77b16..d3510e9 100644
--- a/scripts/multipart/Makefile
+++ b/scripts/multipart/Makefile
@@ -1,27 +1,33 @@
prefix = /usr/local
-bindir = $(prefix)/bin
-libdir = $(prefix)/lib
+DESTDIR =
+BIN_DIR = $(prefix)/bin
+LIB_DIR = $(prefix)/lib/w3m
distdir = ./distfiles
-W3M_LIBDIR = $(libdir)/w3m
+LIB_TARGETS = multipart.cgi
INSTALL = install -c
INSTALL_SCRIPT = $(INSTALL) -m 755
PERL = /usr/local/bin/perl
-NKF = /usr/local/bin/nkf
+NKF = nkf
-all: multipart.cgi
+.SUFFIXES: .in
-multipart.cgi: multipart.cgi.in Makefile
+all: $(LIB_TARGETS)
+
+.in:
sed -e 's%@PERL@%$(PERL)%g' \
-e 's%@NKF@%$(NKF)%g' \
- multipart.cgi.in > multipart.cgi
- chmod +x multipart.cgi
-
-install: multipart.cgi
- $(INSTALL_SCRIPT) multipart.cgi $(W3M_LIBDIR)
+ $< > $@
+ chmod +x $@
+
+install: $(LIB_TARGETS)
+ for file in $(LIB_TARGETS); \
+ do \
+ $(INSTALL_SCRIPT) $$file $(DISTDIR)$(LIB_DIR); \
+ done
dist: all
@-rm -fr $(distdir)/multipart
diff --git a/scripts/multipart/README b/scripts/multipart/README
index 54df29a..b82f585 100644
--- a/scripts/multipart/README
+++ b/scripts/multipart/README
@@ -7,7 +7,7 @@ Content-Type: multipart/* を扱う local-CGI
インストール
* make install
- 必要なら PERL, NKF, W3M_LIBDIR を設定してください。
+ 必要なら PERL, NKF, LIBDIR を設定してください。
* mailcap を ~/.w3m/mailcap にマージ
multipart.cgi のパスに注意
diff --git a/scripts/w3mman/Makefile b/scripts/w3mman/Makefile
index 1e596e0..0d7b582 100644
--- a/scripts/w3mman/Makefile
+++ b/scripts/w3mman/Makefile
@@ -1,10 +1,12 @@
prefix = /usr/local
-bindir = $(prefix)/bin
-libdir = $(prefix)/lib
+BIN_DIR = $(prefix)/bin
+LIB_DIR = $(prefix)/lib/w3m
+DESTDIR =
distdir = ./distfiles
-W3M_LIBDIR = $(libdir)/w3m
+TARGETS = w3mman
+LIB_TARGETS = w3mman2html.cgi
INSTALL = install -c
INSTALL_SCRIPT = $(INSTALL) -m 755
@@ -14,24 +16,26 @@ W3M = w3m
# W3M = w3m -X -o confirm_qq=0
MAN = man
-all: w3mman w3mman2html.cgi
+.SUFFIXES: .in
-w3mman: w3mman.in Makefile
+all: $(TARGETS) $(LIB_TARGETS)
+
+.in:
sed -e 's%@PERL@%$(PERL)%g' \
-e 's%@W3M@%$(W3M)%g' \
-e 's%@MAN@%$(MAN)%g' \
- w3mman.in > w3mman
- chmod +x w3mman
-
-w3mman2html.cgi: w3mman2html.cgi.in Makefile
- sed -e 's%@PERL@%$(PERL)%g' \
- -e 's%@MAN@%$(MAN)%g' \
- w3mman2html.cgi.in > w3mman2html.cgi
- chmod +x w3mman2html.cgi
-
-install: w3mman w3mman2html.cgi
- $(INSTALL_SCRIPT) w3mman $(bindir)
- $(INSTALL_SCRIPT) w3mman2html.cgi $(W3M_LIBDIR)
+ $< > $@
+ chmod +x $@
+
+install: $(TARGETS) $(LIB_TARGETS)
+ for file in $(TARGETS); \
+ do \
+ $(INSTALL_SCRIPT) $$file $(DESTDIR)$(BIN_DIR); \
+ done
+ for file in $(LIB_TARGETS); \
+ do \
+ $(INSTALL_SCRIPT) $$file $(DESTDIR)$(LIB_DIR); \
+ done
dist: all
@-rm -fr $(distdir)/w3mman
diff --git a/scripts/w3mman/README b/scripts/w3mman/README
index 699e068..0fc817e 100644
--- a/scripts/w3mman/README
+++ b/scripts/w3mman/README
@@ -14,7 +14,7 @@ w3mman
インストール
make install
- 必要なら PERL, MAN, W3M_LIBDIR を設定してください。
+ 必要なら PERL, MAN, LIBDIR を設定してください。
w3mman2html.cgi もインストールされます。
================
@@ -31,7 +31,7 @@ w3mman2html.cgi
インストール
make install
- 必要なら PERL, MAN, W3M_LIBDIR を設定してください。
+ 必要なら PERL, MAN, LIBDIR を設定してください。
w3mman もインストールされます。
================