--- /dev/null
+NAME = coreutils
+V = 8.16
+
+DEST = draft/man1
+
+# You must compile coreutils in advance.
+# Use 'make all_programs' to compile binaries which are not
+# compiled in default (like arch, hostname).
+#srcdir = $(HOME)/JM-work/coreutils-8.16
+srcdir = ./$(NAME)-$(V)
+tarball = $(NAME)-$(V).tar.xz
+
+PACKAGE_NAME = GNU $(NAME)
+PACKAGE_VERSION = $(V)
+PACKAGE_STRING = $(PACKAGE_NAME) $(PACKAGE_VERSION)
+
+all: build-man
+
+tarball: $(tarball)
+$(tarball):
+ wget http://core.ring.gr.jp/pub/GNU/coreutils/$@
+
+stamp-setup: $(tarball)
+ tar xJf $^
+ ln -s $(srcdir) source
+ @(cd source \
+ && git init \
+ && git add . \
+ && git commit -m 'Import $(PACKAGE_NAME).' > /dev/null \
+ )
+ mkdir -p source/locale/$(LANG)/LC_MESSAGES
+ touch $@
+
+stamp-configure: stamp-setup
+ @(cd source && ./configure --localedir=`pwd`/locale)
+ touch stamp-configure
+
+stamp-build: stamp-configure
+ @(cd source \
+ && make \
+ && cd src \
+ && make all_programs \
+ )
+ touch $@
+
+build-man:
+ $(MAKE) -C help2man.ja $@ PACKAGE_VERSION=$(PACKAGE_VERSION)
+
+install: build-man
+ $(MAKE) -C help2man.ja $@
+
+clean:
+ $(MAKE) -C help2man.ja $@
+
+clean-build:
+ (cd source && make distclean)
+ $(RM) stamp-configure stamp-build
+
+clean-setup:
+ $(RM) -r $(srcdir)
+ $(RM) source
+ $(RM) stamp-setup stamp-configure stamp-build
+
+realclean: clean-setup clean
-NAME = coreutils
-V = 8.16
+PACKAGE_STRING = GNU coreutils
+srcdir = ../source
+DEST = ../draft/man1
+
+FILES = $(wildcard *.x)
+MANPAGES = $(patsubst %.x,%.1,$(FILES))
LANG = ja_JP.UTF-8
HELP2MAN = /usr/bin/help2man
INSTALL = install
AM_V_GEN = @echo " GEN " $@;
-FILES = $(wildcard *.x)
-MANPAGES = $(patsubst %.x,%.1,$(FILES))
-DEST = ../draft/man1
-
-# You must compile coreutils in advance.
-# Use 'make all_programs' to compile binaries which are not
-# compiled in default (like arch, hostname).
-#srcdir = $(HOME)/JM-work/coreutils-8.16
-srcdir = ./$(NAME)-$(V)
-tarball = $(NAME)-$(V).tar.xz
-
-PACKAGE_NAME = GNU $(NAME)
-PACKAGE_VERSION = $(V)
-PACKAGE_STRING = $(PACKAGE_NAME) $(PACKAGE_VERSION)
-
.SUFFIXES: .x .1
# Ensure that help2man runs the ../src/ginstall binary as
all: build-man
-tarball: $(tarball)
-$(tarball):
- wget http://core.ring.gr.jp/pub/GNU/coreutils/$@
-
-stamp-setup: $(tarball)
- tar xJf $^
- @(cd $(srcdir) \
- && git init \
- && git add . \
- && git commit -m 'Import $(PACKAGE_NAME).' > /dev/null \
- )
- mkdir -p $(srcdir)/locale/$(LANG)/LC_MESSAGES
- touch $@
-
-stamp-configure: stamp-setup
- @(cd $(srcdir) && ./configure --localedir=`pwd`/locale)
- touch stamp-configure
-
-stamp-build: stamp-configure
- @(cd $(srcdir) \
- && make \
- && cd src \
- && make all_programs \
- )
- touch $@
-
build-man: $(MANPAGES)
-$(MANPAGES): stamp-build
-
install: build-man
$(INSTALL) --mode=644 $(MANPAGES) $(DEST)
clean:
$(RM) $(MANPAGES)
-clean-build:
- (cd $(srcdir) && make distclean)
- $(RM) stamp-configure stamp-build
-
-clean-setup:
- $(RM) -r $(srcdir)
- $(RM) stamp-setup stamp-configure stamp-build
-
-realclean: clean-setup clean
-
.x.1:
$(AM_V_GEN)rm -f $@ $@-t \
&& { \
mkdir $t; \
sed -e '/^\.\\\"O/d' ./$*.x > $t/$*.x; \
(cd $t && $(LN_S) ../$(srcdir)/src/$(mapped_name) $*); \
- $(HELP2MAN) \
+ $(HELP2MAN) \
--locale=$(LANG) \
--source='$(PACKAGE_STRING)' \
--include=$t/$*.x \