OSDN Git Service

d43505a8100a704d9e58f3b9e38d261d679833d2
[linuxjm/coreutils.git] / Makefile
1 NAME = coreutils
2 V = 8.16
3
4 DEST = draft/man1
5
6 # You must compile coreutils in advance.
7 # Use 'make all_programs' to compile binaries which are not
8 # compiled in default (like arch, hostname).
9 #srcdir = $(HOME)/JM-work/coreutils-8.16
10 srcdir = ./$(NAME)-$(V)
11 tarball = $(NAME)-$(V).tar.xz
12
13 PACKAGE_NAME = GNU $(NAME)
14 PACKAGE_VERSION = $(V)
15 PACKAGE_STRING = $(PACKAGE_NAME) $(PACKAGE_VERSION)
16
17 all:    build-man
18
19 tarball:        $(tarball)
20 $(tarball):
21         wget http://core.ring.gr.jp/pub/GNU/coreutils/$@
22
23 stamp-setup:    $(tarball)
24         tar xJf $^
25         ln -s $(srcdir) source
26         @(cd source \
27           && git init \
28           && git add . \
29           && git commit -m 'Import $(PACKAGE_NAME).' > /dev/null \
30         )
31         mkdir -p source/locale/$(LANG)/LC_MESSAGES
32         touch $@
33
34 stamp-configure:        stamp-setup
35         @(cd source && ./configure --localedir=`pwd`/locale)
36         touch stamp-configure
37
38 stamp-build:    stamp-configure
39         @(cd source \
40          && make \
41          && cd src \
42          && make all_programs \
43         )
44         touch $@
45
46 build-man:
47         $(MAKE) -C help2man.ja $@ PACKAGE_VERSION=$(PACKAGE_VERSION)
48
49 install:        build-man
50         $(MAKE) -C help2man.ja $@
51
52 clean:
53         $(MAKE) -C help2man.ja $@
54
55 clean-build:
56         (cd source && make distclean)
57         $(RM) stamp-configure stamp-build
58
59 clean-setup:
60         $(RM) -r $(srcdir)
61         $(RM) source
62         $(RM) stamp-setup stamp-configure stamp-build
63
64 realclean:      clean-setup clean