Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit633785f

Browse files
committed
Bring Makefile up to date
1 parent6a3e31c commit633785f

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

‎Makefile

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ COVERAGE=coverage
88
PYFLAGS=
99
DEST_DIR=/
1010

11-
# Horrid hack to ensure setuptools is installed in ourPython environment. This
11+
# Horrid hack to ensure setuptools is installed in ourpython environment. This
1212
# is necessary with Python 3.3's venvs which don't install it by default.
1313
ifeq ($(shell python -c "import setuptools" 2>&1),)
1414
SETUPTOOLS:=
@@ -43,7 +43,8 @@ DEB_SOURCES:=debian/changelog \
4343
DOC_SOURCES:=docs/conf.py\
4444
$(wildcard docs/*.png)\
4545
$(wildcard docs/*.svg)\
46-
$(wildcard docs/*.rst)
46+
$(wildcard docs/*.rst)\
47+
$(wildcard docs/*.pdf)
4748

4849
# Calculate the name of all outputs
4950
DIST_EGG=dist/$(NAME)-$(VER)-$(PYVER).egg
@@ -55,6 +56,7 @@ DIST_DEB=dist/python-$(NAME)_$(VER)-1$(DEB_SUFFIX)_all.deb \
5556
DIST_DSC=dist/$(NAME)_$(VER)-1$(DEB_SUFFIX).tar.gz\
5657
dist/$(NAME)_$(VER)-1$(DEB_SUFFIX).dsc\
5758
dist/$(NAME)_$(VER)-1$(DEB_SUFFIX)_source.changes
59+
MAN_PAGES=
5860

5961

6062
# Default target
@@ -77,7 +79,7 @@ install:
7779
$(PYTHON)$(PYFLAGS) setup.py install --root$(DEST_DIR)
7880

7981
doc:$(DOC_SOURCES)
80-
$(PYTHON)$(PYFLAGS) setup.py build_sphinx -bhtml
82+
$(MAKE) -C docshtml latexpdf
8183

8284
source:$(DIST_TAR)$(DIST_ZIP)
8385

@@ -92,7 +94,7 @@ deb: $(DIST_DEB) $(DIST_DSC)
9294
dist:$(DIST_EGG)$(DIST_DEB)$(DIST_DSC)$(DIST_TAR)$(DIST_ZIP)
9395

9496
develop: tags
95-
$(PIP) install -e.
97+
$(PIP) install -e .[doc,test]
9698

9799
test:
98100
$(COVERAGE) run -m$(PYTEST) tests -v
@@ -101,12 +103,18 @@ test:
101103
clean:
102104
$(PYTHON)$(PYFLAGS) setup.py clean
103105
$(MAKE) -f$(CURDIR)/debian/rules clean
106+
$(MAKE) -C docs clean
104107
rm -fr build/ dist/$(NAME).egg-info/ tags
105108
find$(CURDIR) -name"*.pyc" -delete
106109

107110
tags:$(PY_SOURCES)
108111
ctags -R --exclude="build/*" --exclude="debian/*" --exclude="docs/*" --languages="Python"
109112

113+
$(MAN_PAGES):$(DOC_SOURCES)
114+
$(MAKE) -C docs man
115+
mkdir -p man/
116+
cp docs/_build/man/*.1 man/
117+
110118
$(DIST_TAR):$(PY_SOURCES)
111119
$(PYTHON)$(PYFLAGS) setup.py sdist --formats gztar
112120

@@ -116,25 +124,26 @@ $(DIST_ZIP): $(PY_SOURCES)
116124
$(DIST_EGG):$(PY_SOURCES)
117125
$(PYTHON)$(PYFLAGS) setup.py bdist_egg
118126

119-
$(DIST_DEB):$(PY_SOURCES)$(DEB_SOURCES)
120-
# build the binarypackages in the parent directory then rename it to
127+
$(DIST_DEB):$(PY_SOURCES)$(DEB_SOURCES)$(MAN_PAGES)
128+
# build the binarypackage in the parent directory then rename it to
121129
# project_version.orig.tar.gz
122130
$(PYTHON)$(PYFLAGS) setup.py sdist --dist-dir=../
123131
rename -f's/$(NAME)-(.*)\.tar\.gz/$(NAME)_$$1\.orig\.tar\.gz/' ../*
124-
debuild -b -i -I -Idist -Ibuild -Icoverage -I__pycache__ -I.coverage -Itags -I*.pyc -I*.vim -rfakeroot
132+
debuild -b -i -I -Idist -Ibuild -Idocs/_build -Icoverage -I__pycache__ -I.coverage -Itags -I*.pyc -I*.vim -I*.xcf -rfakeroot
125133
mkdir -p dist/
126134
forfin$(DIST_DEB);do cp ../$${f##*/} dist/; done
127135

128-
$(DIST_DSC):$(PY_SOURCES)$(DEB_SOURCES)
136+
$(DIST_DSC):$(PY_SOURCES)$(DEB_SOURCES)$(MAN_PAGES)
129137
# build the source package in the parent directory then rename it to
130138
# project_version.orig.tar.gz
131139
$(PYTHON)$(PYFLAGS) setup.py sdist --dist-dir=../
132140
rename -f's/$(NAME)-(.*)\.tar\.gz/$(NAME)_$$1\.orig\.tar\.gz/' ../*
133-
debuild -S -i -I -Idist -Ibuild -Icoverage -I__pycache__ -I.coverage -Itags -I*.pyc -I*.vim -rfakeroot
141+
debuild -S -i -I -Idist -Ibuild -Idocs/_build -Icoverage -I__pycache__ -I.coverage -Itags -I*.pyc -I*.vim -I*.xcf -rfakeroot
134142
mkdir -p dist/
135143
forfin$(DIST_DSC);do cp ../$${f##*/} dist/; done
136144

137145
release:$(PY_SOURCES)$(DOC_SOURCES)$(DEB_SOURCES)
146+
$(MAKE) clean
138147
# ensure there are no current uncommitted changes
139148
test -z"$(shell git status --porcelain)"
140149
# update the changelog with new release information
@@ -153,6 +162,7 @@ upload: $(PY_SOURCES) $(DOC_SOURCES) $(DIST_DEB) $(DIST_DSC)
153162
# build the deb source archive and upload to the PPA
154163
dput waveform-ppa dist/$(NAME)_$(VER)-1$(DEB_SUFFIX)_source.changes
155164
git push --tags
165+
git push
156166

157167
.PHONY: all install develop test doc source egg zip tar deb dist clean tags release upload
158168

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp