aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog28
-rw-r--r--XMakefile55
-rw-r--r--scripts/Makefile18
-rw-r--r--scripts/multipart/Makefile18
-rw-r--r--scripts/w3mman/Makefile24
5 files changed, 107 insertions, 36 deletions
diff --git a/ChangeLog b/ChangeLog
index e1fa8c1..bad0f74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2001-12-05 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 02614]
+ * XMakefile (HELP_ALLFILES): added
+ * XMakefile (INSTALL_PROGRAM): ditto
+ * XMakefile (INSTALL_SCRIPT): ditto
+ * XMakefile (INSTALL_DATA): ditto
+ * XMakefile (install) use INSTALL_{PROGRAM,DATA}
+ * XMakefile (install-helpfile): cleanup
+ * XMakefile (install-scripts): pass MKDIR
+ * XMakefile (uninstall): cleanup
+ * XMakefile (clean): cleanup
+ * scripts/Makefile (MKDIR): added
+ * scripts/Makefile (INSTALL_DATA): added
+ * scripts/Makefile (install): mkdir, use INSTALL_DATA
+ * scripts/Makefile (uninstall): added
+ * scripts/Makefile (clean): ignore errors
+ * scripts/multipart/Makefile (MKDIR): added
+ * scripts/multipart/Makefile (install): mkdir
+ * scripts/multipart/Makefile (uninstall): added
+ * scripts/multipart/Makefile (clean): ignore errors
+ * scripts/multipart/Makefile (dist): cleanup
+ * scripts/w3mman/Makefile (MKDIR): added
+ * scripts/w3mman/Makefile (install): mkdir
+ * scripts/w3mman/Makefile (uninstall): added
+ * scripts/w3mman/Makefile (clean): ignore errors
+ * scripts/w3mman/Makefile (dist): cleanup
+
2001-12-04 Tsutomu Okada <okada@furuno.co.jp>
* [w3m-dev 02611] a improvement of find_cookie()
diff --git a/XMakefile b/XMakefile
index 8afa603..d98d693 100644
--- a/XMakefile
+++ b/XMakefile
@@ -1,4 +1,4 @@
-# $Id: XMakefile,v 1.13 2001/12/02 16:28:52 ukai Exp $
+# $Id: XMakefile,v 1.14 2001/12/04 16:17:07 ukai Exp $
SRCS=main.c file.c buffer.c display.c etc.c search.c linein.c table.c local.c \
form.c map.c frame.c rc.c menu.c mailcap.c\
func.c cookie.c history.c backend.c $(KEYBIND_SRC)
@@ -19,6 +19,8 @@ BOOKMARKER=w3mbookmark$(EXT)
HELPER=w3mhelperpanel$(EXT)
INFLATE=inflate$(EXT)
TARGETS=$(TARGET) $(EXT_TARGETS)
+HELP_ALLFILES=w3mhelp-w3m_en.html w3mhelp-w3m_ja.html \
+ w3mhelp-lynx_en.html w3mhelp-lynx_ja.html
SCRIPTSUBDIRS = scripts scripts/multipart scripts/w3mman
SUBDIRS = $(SCRIPTSUBDIRS)
@@ -30,6 +32,9 @@ CFLAGS=$(OPTS) $(MYCFLAGS) $(DEFS)
LIBS=-L. -lindep $(GCLIB) $(MATHLIB) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES)
LIBS2=-L. -lindep $(GCLIB) $(LOCAL_LIBRARIES)
INSTALL=sh install.sh
+INSTALL_PROGRAM=$(INSTALL) -m 755
+INSTALL_SCRIPT=$(INSTALL) -m 755
+INSTALL_DATA=$(INSTALL) -m 644
AR=ar
all: $(TARGETS) all-scripts
@@ -88,15 +93,19 @@ install-core: $(TARGETS)
-$(MKDIR) $(DESTDIR)$(BIN_DIR)
-$(MKDIR) $(DESTDIR)$(HELP_DIR)
-$(MKDIR) $(DESTDIR)$(LIB_DIR)
- $(INSTALL) -m 755 $(TARGET) $(DESTDIR)$(BIN_DIR)/$(TARGET)
- $(INSTALL) -m 644 $(HELP_FILE) $(DESTDIR)$(HELP_DIR)/w3mhelp.html
- for d in $(EXT_TARGETS); do $(INSTALL) -m 755 $$d $(DESTDIR)$(LIB_DIR)/$$d; done
+ $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(BIN_DIR)/$(TARGET)
+ $(INSTALL_DATA) $(HELP_FILE) $(DESTDIR)$(HELP_DIR)/w3mhelp.html
+ for file in $(EXT_TARGETS); \
+ do \
+ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(LIB_DIR)/$$file; \
+ done
install-helpfile:
- $(INSTALL) -m 644 w3mhelp-w3m_en.html $(DESTDIR)$(HELP_DIR)/w3mhelp-w3m_en.html
- $(INSTALL) -m 644 w3mhelp-w3m_ja.html $(DESTDIR)$(HELP_DIR)/w3mhelp-w3m_ja.html
- $(INSTALL) -m 644 w3mhelp-lynx_en.html $(DESTDIR)$(HELP_DIR)/w3mhelp-lynx_en.html
- $(INSTALL) -m 644 w3mhelp-lynx_ja.html $(DESTDIR)$(HELP_DIR)/w3mhelp-lynx_ja.html
+ -$(MKDIR) $(DESTDIR)$(HELP_DIR)
+ for file in $(HELP_ALLFILES); \
+ do \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(HELP_DIR)/$$file; \
+ done
all-scripts:
for dir in $(SCRIPTSUBDIRS); \
@@ -108,24 +117,28 @@ install-scripts: all-scripts
topdir=`pwd`; \
for dir in $(SCRIPTSUBDIRS); \
do \
- (cd $$dir; $(MAKE) PERL='$(PERL)' BIN_DIR='$(BIN_DIR)' LIB_DIR='$(LIB_DIR)' HELP_DIR='$(HELP_DIR)' DESTDIR='$(DESTDIR)' INSTALL="sh $$topdir/install.sh" install); \
+ (cd $$dir; $(MAKE) PERL='$(PERL)' MKDIR='$(MKDIR)' BIN_DIR='$(BIN_DIR)' LIB_DIR='$(LIB_DIR)' HELP_DIR='$(HELP_DIR)' DESTDIR='$(DESTDIR)' INSTALL="sh $$topdir/install.sh" install); \
done
uninstall:
- -$(RM) $(BIN_DIR)/$(TARGET)
- -$(RM) $(HELP_DIR)/w3mhelp-lynx_en.html
- -$(RM) $(HELP_DIR)/w3mhelp-lynx_ja.html
- -$(RM) $(HELP_DIR)/w3mhelp-w3m_en.html
- -$(RM) $(HELP_DIR)/w3mhelp-w3m_ja.html
- -$(RM) $(HELP_DIR)/w3mhelp.html
- -$(RM) $(LIB_DIR)/$(BOOKMARKER)
- -$(RM) $(LIB_DIR)/$(HELPER)
- -$(RM) $(LIB_DIR)/$(INFLATE)
+ -rm -f $(BIN_DIR)/$(TARGET)
+ -for file in $(EXT_TARGETS); \
+ do \
+ rm -f $(LIB_DIR)/$$file; \
+ done
+ -for file in $(HELP_ALLFILES); \
+ do \
+ rm -f $(HELP_DIR)/$$file; \
+ done
+ -for dir in $(SCRIPTSUBDIRS); \
+ do \
+ (cd $$dir; $(MAKE) BIN_DIR='$(BIN_DIR)' LIB_DIR='$(LIB_DIR)' HELP_DIR='$(HELP_DIR)' uninstall); \
+ done
clean: sweep
- rm -f *.o *.a $(TARGETS) mktable$(EXT)
- rm -f funcname.c funcname1.h funcname2.h tagtable.c
- for dir in $(SCRIPTSUBDIRS); \
+ -rm -f *.o *.a $(TARGETS) mktable$(EXT)
+ -rm -f funcname.c funcname1.h funcname2.h tagtable.c
+ -for dir in $(SCRIPTSUBDIRS); \
do \
(cd $$dir; $(MAKE) clean); \
done
diff --git a/scripts/Makefile b/scripts/Makefile
index 1f055ea..4be82c5 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -7,8 +7,10 @@ HELP_DIR = $(prefix)/lib/w3m
LIB_TARGETS = dirlist.cgi w3mhelp.cgi
+MKDIR = mkdir -p
INSTALL = install -c
INSTALL_SCRIPT = $(INSTALL) -m 755
+INSTALL_DATA = $(INSTALL) -m 644
PERL = /usr/local/bin/perl
@@ -58,14 +60,26 @@ helplibs:
@echo done
install: $(LIB_TARGETS)
+ -$(MKDIR) $(DESTDIR)$(LIB_DIR)
+ -$(MKDIR) $(DESTDIR)$(HELP_DIR)
for file in $(LIB_TARGETS); \
do \
$(INSTALL_SCRIPT) $$file $(DESTDIR)$(LIB_DIR); \
done
for file in w3mhelp-*.pl; \
do \
- $(INSTALL) $$file $(DESTDIR)$(HELP_DIR); \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(HELP_DIR); \
+ done
+
+uninstall:
+ -for file in $(LIB_TARGETS); \
+ do \
+ rm -f $(LIB_DIR)/$$file; \
+ done
+ -for file in w3mhelp-*.pl; \
+ do \
+ rm -f $(HELP_DIR)/$$file; \
done
clean:
- rm -f $(LIB_TARGETS) w3mhelp-*.pl
+ -rm -f $(LIB_TARGETS) w3mhelp-*.pl
diff --git a/scripts/multipart/Makefile b/scripts/multipart/Makefile
index 8825043..5ee3fb6 100644
--- a/scripts/multipart/Makefile
+++ b/scripts/multipart/Makefile
@@ -7,6 +7,7 @@ distdir = ./distfiles
LIB_TARGETS = multipart.cgi
+MKDIR = mkdir -p
INSTALL = install -c
INSTALL_SCRIPT = $(INSTALL) -m 755
@@ -24,21 +25,26 @@ all: $(LIB_TARGETS)
chmod +x $@
install: $(LIB_TARGETS)
+ -$(MKDIR) $(DESTDIR)$(LIB_DIR)
for file in $(LIB_TARGETS); \
do \
$(INSTALL_SCRIPT) $$file $(DESTDIR)$(LIB_DIR); \
done
+uninstall:
+ -for file in $(LIB_TARGETS); \
+ do \
+ rm -f $(LIB_DIR)/$$file; \
+ done
+
clean:
- rm -f $(LIB_TARGETS)
+ -rm -f $(LIB_TARGETS)
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 ) \
+ $(MKDIR) $(distdir)/multipart
+ cp Makefile README multipart.cgi.in $(distdir)/multipart
+ ( cd $(distdir); tar -cf - multipart | GZIP='' gzip ) \
> $(distdir)/multipart.tar.gz
-rm -fr $(distdir)/multipart
diff --git a/scripts/w3mman/Makefile b/scripts/w3mman/Makefile
index 613d561..7a629a8 100644
--- a/scripts/w3mman/Makefile
+++ b/scripts/w3mman/Makefile
@@ -8,6 +8,7 @@ distdir = ./distfiles
TARGETS = w3mman
LIB_TARGETS = w3mman2html.cgi
+MKDIR = mkdir -p
INSTALL = install -c
INSTALL_SCRIPT = $(INSTALL) -m 755
@@ -28,6 +29,8 @@ all: $(TARGETS) $(LIB_TARGETS)
chmod +x $@
install: $(TARGETS) $(LIB_TARGETS)
+ -$(MKDIR) $(DESTDIR)$(BIN_DIR)
+ -$(MKDIR) $(DESTDIR)$(LIB_DIR)
for file in $(TARGETS); \
do \
$(INSTALL_SCRIPT) $$file $(DESTDIR)$(BIN_DIR); \
@@ -37,17 +40,24 @@ install: $(TARGETS) $(LIB_TARGETS)
$(INSTALL_SCRIPT) $$file $(DESTDIR)$(LIB_DIR); \
done
+uninstall:
+ -for file in $(TARGETS); \
+ do \
+ rm -f $(BIN_DIR)/$$file; \
+ done
+ -for file in $(LIB_TARGETS); \
+ do \
+ rm -f $(LIB_DIR)/$$file; \
+ done
+
clean:
- rm -f $(TARGETS) $(LIB_TARGETS)
+ -rm -f $(TARGETS) $(LIB_TARGETS)
dist: all
@-rm -fr $(distdir)/w3mman
- mkdir -p $(distdir)/w3mman
- cp Makefile README w3mman w3mman.in \
- w3mman2html.cgi w3mman2html.cgi.in hlink.cgi \
- $(distdir)/w3mman
- ( cd $(distdir); \
- tar -cf - w3mman | GZIP='' gzip ) \
+ -$(MKDIR) $(distdir)/w3mman
+ cp Makefile README w3mman.in w3mman2html.cgi.in hlink.cgi $(distdir)/w3mman
+ ( cd $(distdir); tar -cf - w3mman | GZIP='' gzip ) \
> $(distdir)/w3mman.tar.gz
-rm -fr $(distdir)/w3mman