]> git.ipfire.org Git - people/stevee/pakfire.git/blobdiff - Makefile
cgroup: Move builder process out of cgroup before destroying it.
[people/stevee/pakfire.git] / Makefile
index c32cea939768aa92850160349edf29433e27ce63..c873463130d4d63884a985456774a49bae48ba15 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,33 +1,51 @@
 
-DESTDIR ?= /
+include Makeconfig
 
-all: po build
+SUBDIRS = po python tools tools/fake-environ
+
+all: build
 
 .PHONY: build
 build:
-       python setup.py build
+       for dir in $(SUBDIRS); do \
+               $(MAKE) -C $${dir} || exit; \
+       done
 
 .PHONY: clean
 clean:
-       python setup.py clean
-       -rm -rfv build
+       for dir in $(SUBDIRS); do \
+               $(MAKE) -C $${dir} clean || exit; \
+       done
 
 .PHONY: dist
 dist:
-       python setup.py sdist
+       git archive --format=tar --prefix=$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ HEAD | \
+               gzip -9 > $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
 
 .PHONY: install
-install:
-       python setup.py install  --root $(DESTDIR)
+install: build
+       for dir in $(SUBDIRS); do \
+               $(MAKE) -C $${dir} install || exit; \
+       done
+
+       -mkdir -pv $(DESTDIR)$(PREFIX)/lib/pakfire/macros
+       cp -vf macros/*.macro $(DESTDIR)$(PREFIX)/lib/pakfire/macros
 
-       -mkdir -pv $(DESTDIR)/etc/pakfire.repos.d
-       cp -vf examples/pakfire.conf $(DESTDIR)/etc/pakfire.conf
-       cp -vf examples/pakfire.repos.d/* $(DESTDIR)/etc/pakfire.repos.d/
+       # Install example configuration.
+       -mkdir -pv $(DESTDIR)/etc/pakfire/repos
+       for file in general.conf builder.conf client.conf daemon.conf distros; do \
+               [ -e "$(DESTDIR)/etc/pakfire/$${file}" ] && continue; \
+               cp -rvf examples/$${file} $(DESTDIR)/etc/pakfire/; \
+       done
 
 .PHONY: check
-check:
-       ./runpychecker.sh
+check: all
+       PYTHONPATH=python/src/ pylint -E python/pakfire
 
 .PHONY: po
 po:
-       find pakfire src -name "*.py" -or -name "*.c" | grep -v "__version__.py" | sort > po/POTFILES.in
+       $(MAKE) -C po
+
+.PHONY: pot
+pot:
+       $(MAKE) -C po pot