6 # You must compile coreutils in advance.
7 srcdir = ./$(NAME)-$(V)
8 tarball = $(NAME)-$(V).tar.xz
10 PACKAGE_NAME = GNU $(NAME)
11 PACKAGE_VERSION = $(V)
12 PACKAGE_STRING = $(PACKAGE_NAME) $(PACKAGE_VERSION)
17 #------------------------------------------------------------
21 wget http://core.ring.gr.jp/pub/GNU/coreutils/$@
23 stamp-setup: $(tarball)
25 ln -s $(srcdir) source
29 && git commit -m 'Import $(PACKAGE_NAME).' > /dev/null \
31 mkdir -p source/locale/ja/LC_MESSAGES
32 set -e ; if [ -f ja.po/ja.po.$(V) ]; then \
33 rm -f source/po/ja.po; \
34 ln -s ../../ja.po/ja.po.$(V) source/po/ja.po; \
36 echo "No JM-maintained ja.po found for $(V)."; \
40 stamp-configure: stamp-setup
41 @(cd source && ./configure --localedir=`pwd`/locale)
44 stamp-build: stamp-configure
48 && make src/hostname \
50 && make man/hostname.1 \
54 #------------------------------------------------------------
56 mo-ja = source/locale/ja/LC_MESSAGES/coreutils.mo
57 gmo-ja = source/po/ja.gmo
58 po-ja = source/po/ja.po
64 $(MAKE) -C source/po $$(basename $@)
68 build-man: stamp-build catalog
69 $(MAKE) -C help2man.ja $@ PACKAGE_VERSION=$(PACKAGE_VERSION)
72 $(MAKE) -C help2man.ja $@
75 $(MAKE) -C help2man.ja $@
78 (cd source && make distclean)
79 $(RM) stamp-configure stamp-build
84 $(RM) stamp-setup stamp-configure stamp-build
86 realclean: clean-setup clean
88 #------------------------------------------------------------
90 MAN2HTML = ../../admin/man-1.6g/man2html/man2html
92 html: html-setup html-gen html-index
95 @set -e; if [ ! -e html ]; then \
96 echo " MKDIR html."; \
99 for d in draft/man?; do \
100 dm=html/$$(basename $$d); \
101 echo " MKDIR $$dm"; \
106 @set -e; for f in draft/man?/*.[1-8]; do \
107 n=$$(basename $$f); \
108 t=$$(echo $$f | cut -d / -f 2-3); \
110 echo " GEN html/$${t}.html"; \
111 $(MAN2HTML) $$f | tail -n +3 > html/$${t}.draft.html; \
112 $(MAN2HTML) $$o | tail -n +3 > html/$${t}.orig.html; \
113 printf "<html>\n" > html/$${t}.html; \
114 printf "<head><title>$$n</title></head>\n" >> html/$${t}.html; \
115 printf "<frameset cols=\"50%%,50%%\">\n" >> html/$${t}.html; \
116 printf " <frame src=\"$$n.orig.html\" name=\"orig\" />\n" >> html/$${t}.html; \
117 printf " <frame src=\"$$n.draft.html\" name=\"draft\" />\n" >> html/$${t}.html; \
118 printf "</frameset></html>\n" >> html/$${t}.html; \
122 @set -e; echo " GEN index.html"; \
123 idx=html/index.html; \
124 printf "<html><head><title>" > $$idx; \
125 printf "Drafts of $(PACKAGE_STRING)</title></head>\n" >> $$idx; \
126 printf "<body><h1>Drafts of $(PACKAGE_STRING)</h1>\n<ul>\n" >> $$idx; \
127 for f in draft/man?/*.[1-8]; do \
128 t=$$(echo $$f | cut -d / -f 2-3).html; \
129 printf "<li><a href=\"$$t\">$$(basename $$f)</a></li>\n" >> $$idx; \
131 printf "</ul><hr>$$(LC_ALL=C date)</body></html>\n" >> $$idx