From 32388937884a92e30a378b1edba1a89d861621b0 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Tue, 19 Mar 2002 16:27:20 +0000 Subject: [w3m-dev 03137] Re: w3mman.1 * XMakefile (MAN1): added (MAN1_JA): added (install-core): install man (install-scripts): pass MAN_DIR (uninstall): uninstall man, pass MAN_DIR to subdirs * config.h.dist (MAN_DIR): added (MAN1_DIR): added (MAN1_JA_DIR): added * configure: -mandir (config.h): add MAN_DIR, MAN1_DIR, MAN1_JA_DIR * scripts/w3mman/Makefile (MAN1_DIR): added From: Hironori Sakamoto --- ChangeLog | 17 ++++++++++++++++- XMakefile | 16 ++++++++++++---- config.h.dist | 5 ++++- configure | 21 +++++++++++++++++++-- scripts/w3mman/Makefile | 8 +++++--- 5 files changed, 56 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74074b7..a2d7493 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2002-03-20 Hironori Sakamoto + + * [w3m-dev 03137] Re: w3mman.1 + * XMakefile (MAN1): added + (MAN1_JA): added + (install-core): install man + (install-scripts): pass MAN_DIR + (uninstall): uninstall man, pass MAN_DIR to subdirs + * config.h.dist (MAN_DIR): added + (MAN1_DIR): added + (MAN1_JA_DIR): added + * configure: -mandir + (config.h): add MAN_DIR, MAN1_DIR, MAN1_JA_DIR + * scripts/w3mman/Makefile (MAN1_DIR): added + 2002-03-20 Hironori Sakamoto * [w3m-dev 03136] Add COMMAND to execute multiple commands @@ -3262,4 +3277,4 @@ * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.357 2002/03/19 16:06:52 ukai Exp $ +$Id: ChangeLog,v 1.358 2002/03/19 16:27:20 ukai Exp $ diff --git a/XMakefile b/XMakefile index 67d0203..3d6a695 100644 --- a/XMakefile +++ b/XMakefile @@ -1,4 +1,4 @@ -# $Id: XMakefile,v 1.21 2002/02/12 08:52:57 ukai Exp $ +# $Id: XMakefile,v 1.22 2002/03/19 16:27:20 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 image.c\ func.c cookie.c history.c backend.c $(KEYBIND_SRC) @@ -20,6 +20,8 @@ HELPER=w3mhelperpanel$(EXT) INFLATE=inflate$(EXT) IMGDISPLAY=w3mimgdisplay$(EXT) IMGSIZE=w3mimgsize$(EXT) +MAN1=doc/w3m.1 +MAN1_JA=doc-jp/w3m.1 TARGETS=$(TARGET) $(EXT_TARGETS) HELP_ALLFILES=w3mhelp-w3m_en.html w3mhelp-w3m_ja.html \ w3mhelp-lynx_en.html w3mhelp-lynx_ja.html @@ -112,10 +114,14 @@ install: install-core install-scripts install-core: $(TARGETS) -$(MKDIR) $(DESTDIR)$(BIN_DIR) - -$(MKDIR) $(DESTDIR)$(HELP_DIR) -$(MKDIR) $(DESTDIR)$(LIB_DIR) + -$(MKDIR) $(DESTDIR)$(HELP_DIR) + -$(MKDIR) $(DESTDIR)$(MAN1_DIR) + -$(MKDIR) $(DESTDIR)$(MAN1_JA_DIR) $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(BIN_DIR)/$(TARGET) $(INSTALL_DATA) $(HELP_FILE) $(DESTDIR)$(HELP_DIR)/w3mhelp.html + $(INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1_DIR)/$(TARGET).1 + $(INSTALL_DATA) $(MAN1_JA) $(DESTDIR)$(MAN1_JA_DIR)/$(TARGET).1 for file in $(EXT_TARGETS); \ do \ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(LIB_DIR)/$$file; \ @@ -138,7 +144,7 @@ install-scripts: all-scripts topdir=`pwd`; \ for dir in $(SCRIPTSUBDIRS); \ do \ - (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); \ + (cd $$dir; $(MAKE) PERL='$(PERL)' MKDIR='$(MKDIR)' BIN_DIR='$(BIN_DIR)' LIB_DIR='$(LIB_DIR)' HELP_DIR='$(HELP_DIR)' MAN_DIR='$(MAN_DIR)' DESTDIR='$(DESTDIR)' INSTALL="sh $$topdir/install-sh" install); \ done uninstall: @@ -151,9 +157,11 @@ uninstall: do \ rm -f $(HELP_DIR)/$$file; \ done + -rm -f $(MAN1_DIR)/$(TARGET).1 + -rm -f $(MAN1_JA_DIR)/$(TARGET).1 -for dir in $(SCRIPTSUBDIRS); \ do \ - (cd $$dir; $(MAKE) BIN_DIR='$(BIN_DIR)' LIB_DIR='$(LIB_DIR)' HELP_DIR='$(HELP_DIR)' uninstall); \ + (cd $$dir; $(MAKE) BIN_DIR='$(BIN_DIR)' LIB_DIR='$(LIB_DIR)' HELP_DIR='$(HELP_DIR)' MAN_DIR='$(MAN_DIR)' uninstall); \ done clean: sweep diff --git a/config.h.dist b/config.h.dist index 0e249ba..551bbf6 100644 --- a/config.h.dist +++ b/config.h.dist @@ -65,8 +65,11 @@ #ifdef makefile_parameter BIN_DIR = /usr/local/bin -HELP_DIR = /usr/local/lib/w3m LIB_DIR = /usr/local/lib/w3m +HELP_DIR = /usr/local/share/w3m +MAN_DIR = /usr/local/man +MAN1_DIR = $(MAN_DIR)/man1 +MAN1_JA_DIR = $(MAN_DIR)/ja/man1 ETC_DIR = /usr/local/etc/w3m RC_DIR = ~/.w3m HELP_FILE = w3mhelp-w3m_ja.html diff --git a/configure b/configure index 399c830..8333068 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: configure,v 1.65 2002/03/14 16:12:06 ukai Exp $ +# $Id: configure,v 1.66 2002/03/19 16:27:20 ukai Exp $ # Configuration. # @@ -64,6 +64,9 @@ do -helpdir=*|--helpdir=*) helpdir=`expr "$1" : "-*helpdir=\(.*\)"` ;; + -mandir=*|--mandir=*) + mandir=`expr "$1" : "-*mandir=\(.*\)"` + ;; -sysconfdir=*|--sysconfdir=*) sysconfdir=`expr "$1" : "-*sysconfdir=\(.*\)"` ;; @@ -122,6 +125,7 @@ do echo "-bindir=DIR user executable in DIR (default: PREFIX/bin)" echo "-libdir=DIR program executables in DIR (default: PREFIX/lib/w3m)" echo "-helpdir=DIR help file in DIR (default: PREFIX/share/w3m)" + echo "-mandir=DIR manual in DIR (default: PREFIX/man)" echo "-sysconfdir=DIR w3mconfig in DIR [PREFIX/etc/w3m]" echo "-lang=(en|ja) Specify default language" echo "-model=(baby|little|mouse|cookie|monster|custom)" @@ -541,6 +545,16 @@ readdir "$d_helpdir" helpdir=$_dir echo "helpdir='$helpdir'" >> config.param +d_mandir=$mandir +if [ -z "$d_mandir" ]; then + d_mandir="$topdir/man" +fi +echo "Which directory do you want to put the manfile?" +Echo "(default: $d_mandir) " +readdir "$d_mandir" +mandir=$_dir +echo "mandir='$mandir'" >> config.param + d_sysconfdir=$sysconfdir if [ -z "$d_sysconfdir" ]; then d_sysconfdir="$topdir/etc/w3m" @@ -2072,8 +2086,11 @@ $def_matrix #ifdef makefile_parameter BIN_DIR = $bindir -HELP_DIR = $helpdir LIB_DIR = $libdir +HELP_DIR = $helpdir +MAN_DIR = $mandir +MAN1_DIR = \$(MAN_DIR)/man1 +MAN1_JA_DIR = \$(MAN_DIR)/ja/man1 ETC_DIR = $sysconfdir RC_DIR = ~/.w3m HELP_FILE = $helpfile diff --git a/scripts/w3mman/Makefile b/scripts/w3mman/Makefile index 8adf5dd..a95f113 100644 --- a/scripts/w3mman/Makefile +++ b/scripts/w3mman/Makefile @@ -3,6 +3,7 @@ prefix = /usr/local BIN_DIR = $(prefix)/bin LIB_DIR = $(prefix)/lib/w3m MAN_DIR = $(prefix)/man +MAN1_DIR = $(MAN_DIR)/man1 DESTDIR = distdir = ./distfiles @@ -36,6 +37,7 @@ all: $(TARGETS) $(LIB_TARGETS) $(MAN_TARGETS) install: $(TARGETS) $(LIB_TARGETS) $(MAN_TARGETS) -$(MKDIR) $(DESTDIR)$(BIN_DIR) -$(MKDIR) $(DESTDIR)$(LIB_DIR) + -$(MKDIR) $(DESTDIR)$(MAN1_DIR) for file in $(TARGETS); \ do \ $(INSTALL_SCRIPT) $$file $(DESTDIR)$(BIN_DIR); \ @@ -46,7 +48,7 @@ install: $(TARGETS) $(LIB_TARGETS) $(MAN_TARGETS) done for file in $(MAN1_TARGETS); \ do \ - $(INSTALL_MAN) $$file $(DESTDIR)$(MAN_DIR)/man1; \ + $(INSTALL_MAN) $$file $(DESTDIR)$(MAN1_DIR); \ done uninstall: @@ -58,9 +60,9 @@ uninstall: do \ rm -f $(LIB_DIR)/$$file; \ done - -for file in $(MAN_TARGETS); \ + -for file in $(MAN1_TARGETS); \ do \ - rm -f $(MAN_DIR)/$$file; \ + rm -f $(MAN1_DIR)/$$file; \ done clean: -- cgit v1.2.3