commit 9042c7413d13eae5b0386036cfb180b8d8f2dc53
parent c5dee4480c1821108880be54d09446a5b15e1da5
Author: ukai <ukai>
Date: Wed, 21 Nov 2001 09:21:59 +0000
[w3m-dev 02470]
Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat:
9 files changed, 104 insertions(+), 42 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,14 @@
+2001-11-21 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 02470]
+ * XMakefile: all of scripts are generated by this instead of configure
+ * configure: add PERL, remove scripts/dirlist.cgi generation
+ * config.h.dist: add PERL
+ * scripts/Makefile: added
+ * scripts/multipart/Makefile scripts/w3mman/Makefile:
+ new scripts generation and installation
+ * scripts/multipart/README scripts/w3mman/README: update
+
2001-11-21 Tsutomu Okada <okada@furuno.co.jp>
* [w3m-dev 02472] cleanup CYGWIN macro
diff --git a/XMakefile b/XMakefile
@@ -30,7 +30,7 @@ INSTALL=sh install.sh
INSTALL2=sh ../install.sh
AR=ar
-all: $(TARGETS)
+all: $(TARGETS) all-scripts
$(TARGET): $(ALLOBJS) $(ALIB) $(GCTARGET)
$(CC) $(CFLAGS) -o $(TARGET) $(ALLOBJS) $(LIBS)
@@ -77,9 +77,10 @@ inflate.o: inflate.c
$(CC) $(CFLAGS) $(Z_CFLAGS) -c inflate.c
gc/gc.a:
- cd gc; make CC='$(CC)' CFLAGS='$(GCCFLAGS) $(GC_CFLAGS)' SPECIALCFLAGS='-I./\$(srcdir)/include $(GC_CFLAGS)'
+ cd gc; $(MAKE) CC='$(CC)' CFLAGS='$(GCCFLAGS) $(GC_CFLAGS)' SPECIALCFLAGS='-I./\$(srcdir)/include $(GC_CFLAGS)'
-install: $(TARGETS)
+
+install: $(TARGETS) all-scripts
-$(MKDIR) $(DESTDIR)$(BIN_DIR)
-$(MKDIR) $(DESTDIR)$(HELP_DIR)
-$(MKDIR) $(DESTDIR)$(LIB_DIR)
@@ -92,6 +93,18 @@ install: $(TARGETS)
for d in $(EXT_TARGETS); do $(INSTALL) -m 755 $$d $(DESTDIR)$(LIB_DIR)/$$d; done
(cd scripts; for i in *.cgi; do $(INSTALL2) -m 755 $$i $(DESTDIR)$(LIB_DIR)/$$i; done)
+all-scripts:
+ for dir in scripts scripts/multipart scripts/w3mman; \
+ do \
+ (cd $$dir; $(MAKE) PERL='$(PERL)' BIN_DIR='$(BIN_DIR)' LIB_DIR='$(LIB_DIR)'); \
+ done
+
+install-scripts:
+ for dir in scripts scripts/multipart scripts/w3mman; \
+ do \
+ (cd $$dir; $(MAKE) PERL='$(PERL)' BIN_DIR='$(BIN_DIR)' LIB_DIR='$(LIB_DIR)' DESTDIR='$(DESTDIR)' INSTALL='sh $(PWD)/install.sh' install); \
+ done
+
uninstall:
-$(RM) $(BIN_DIR)/$(TARGET)
-$(RM) $(HELP_DIR)/w3mhelp-lynx_en.html
diff --git a/config.h.dist b/config.h.dist
@@ -121,6 +121,7 @@ GCLIB=gc/gc.a
GCTARGET=gc/gc.a
RANLIB=ranlib
MKDIR=mkdir -p
+PERL=/usr/local/bin/perl
VERSION=0.2.2
MODEL=Linux.i686-monster-ja
#else
diff --git a/configure b/configure
@@ -1014,6 +1014,15 @@ else
fi
rm -rf hogege 2>&1 >/dev/null
+####### perl
+perl=`./which perl`
+if [ `expr "$perl" : 'not found'` != 0 ]; then
+ echo "You don't have perl."
+ perl=/usr/local/bin/perl
+else
+ echo "You have perl."
+fi
+
####### strcasecmp
cat > _zmachdep.c << EOF
#include <string.h>
@@ -1807,6 +1816,7 @@ GCLIB=$gclib
GCTARGET=$gctarget
RANLIB=$ranlib_cmd
MKDIR=$MKDIR
+PERL=$perl
VERSION=$w3mversion
MODEL=$sysname.$platform-$modelname-$lang
#else
@@ -1929,12 +1939,4 @@ echo 'config.h is created. See config.h for further configuration.'
echo ''
echo 'Generating scripts/dirlist.cgi'
-perl=`./which perl`
-if [ `expr "$perl" : 'not found'` != 0 ]; then
- perl=/usr/local/bin/perl
-fi
-sed -e "s;@PERL@;$perl;" \
- scripts/dirlist.cgi.in > scripts/dirlist.cgi
-chmod +x scripts/dirlist.cgi
-
echo 'Configuration done. Just type "make".'
diff --git a/scripts/Makefile 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
@@ -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
@@ -7,7 +7,7 @@ Content-Type: multipart/*
インストール
* make install
- 必要なら PERL, NKF, W3M_LIBDIR を設定してください。
+ 必要なら PERL, NKF, LIBDIR を設定してください。
* mailcap を ~/.w3m/mailcap にマージ
multipart.cgi のパスに注意
diff --git 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
@@ -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 もインストールされます。
================