我的项目使用autoconf,主要语言是python。 测试从顶层Makefile.am完成:
SUBDIRS = src
distclean-local:
rm -rf INSTALL `find -name Makefile.in -o -name '*.pyc'` aclocal.m4 autom4te.cache/ configure install-sh missing src/build
check:
PYTHONPATH=src python -m unittest discover -p '*.py' -s tests
从src / Makefile.am完成安装:
EXTRA_DIST = setup.py
clean:
$(PYTHON) $(top_srcdir)/src/setup.py clean --all
install-exec-local:
$(PYTHON) $(top_srcdir)/src/setup.py install --prefix $(DESTDIR)/$(prefix) --install-layout=deb
mkdir -p $(DESTDIR)$(bindir)
cp sinz.py $(DESTDIR)$(bindir)/sinz
chmod a+x $(DESTDIR)$(bindir)/sinz
mkdir -p $(DESTDIR)$(sysconfdir)/bash_completion.d/
cp sinz.completion $(DESTDIR)$(sysconfdir)/bash_completion.d/sinz
我希望能够执行以下操作,而无需在源目录中创建.pyc文件。
autoreconf -i
cd /some/other/dir
/project/sourcedir/configure
make check
make install DESTDIR=/yet/another/dir
我应该改变什么?