]> git.ipfire.org Git - pakfire.git/blobdiff - Makefile
Merge branch 'capabilities'
[pakfire.git] / Makefile
index c0a3ae4cd1588a6ae2f95a00a4b02191f4fd7d45..4951cd12ac03f20ff506f2bf2adc897d349e0f9d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,24 +1,45 @@
 
-DESTDIR ?= /
+include Makeconfig
+
+SUBDIRS = po python scripts
 
 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
+       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
 
+       # Install example configuration.
        -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/
+
+.PHONY: check
+check:
+       ./runpychecker.sh
+
+.PHONY: po
+po:
+       $(MAKE) -C po