Show More
@@ -1,11 +1,13 b'' | |||||
1 | # This Makefile is only used by developers. |
|
1 | PREFIX=/usr/local | |
|
2 | export PREFIX | |||
2 | PYTHON=python |
|
3 | PYTHON=python | |
3 |
|
4 | |||
4 | all: |
|
5 | all: | |
5 | $(PYTHON) setup.py build_ext -i |
|
6 | $(PYTHON) setup.py build_ext -i | |
6 |
|
7 | |||
7 | install: |
|
8 | install: all | |
8 | @echo "Read the file README for install instructions." |
|
9 | $(PYTHON) setup.py install --home="$(PREFIX)" | |
|
10 | cd doc && $(MAKE) $(MFLAGS) install | |||
9 |
|
11 | |||
10 | clean: |
|
12 | clean: | |
11 | -$(PYTHON) setup.py clean --all # ignore errors of this command |
|
13 | -$(PYTHON) setup.py clean --all # ignore errors of this command |
@@ -1,6 +1,9 b'' | |||||
1 | SOURCES=$(wildcard *.[0-9].txt) |
|
1 | SOURCES=$(wildcard *.[0-9].txt) | |
2 | MAN=$(SOURCES:%.txt=%) |
|
2 | MAN=$(SOURCES:%.txt=%) | |
3 | HTML=$(SOURCES:%.txt=%.html) |
|
3 | HTML=$(SOURCES:%.txt=%.html) | |
|
4 | PREFIX=/usr/local | |||
|
5 | MANDIR=$(PREFIX)/man | |||
|
6 | INSTALL=install -c | |||
4 |
|
7 | |||
5 | all: man html |
|
8 | all: man html | |
6 |
|
9 | |||
@@ -23,5 +26,12 b' hg.1.gendoc.txt: ../mercurial/commands.p' | |||||
23 | %.html: %.txt |
|
26 | %.html: %.txt | |
24 | asciidoc -b html4 $*.txt || asciidoc -b html $*.txt |
|
27 | asciidoc -b html4 $*.txt || asciidoc -b html $*.txt | |
25 |
|
28 | |||
|
29 | install: man | |||
|
30 | for i in $(MAN) ; do \ | |||
|
31 | subdir=`echo $$i | sed -n 's/.\+\(\.[0-9]\)$$/man\1/p'` ; \ | |||
|
32 | mkdir -p $(MANDIR)/$$subdir ; \ | |||
|
33 | $(INSTALL) $$i $(MANDIR)/$$subdir ; \ | |||
|
34 | done | |||
|
35 | ||||
26 | clean: |
|
36 | clean: | |
27 | $(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) *.[0-9].gendoc.txt |
|
37 | $(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) *.[0-9].gendoc.txt |
General Comments 0
You need to be logged in to leave comments.
Login now