chiark / gitweb /
[PATCH] add IGNORE rule type
[elogind.git] / klibc / Makefile
index 288a86270763df15f549ec942adce184ec77a83a..ef5fbabff8fc06291be7a5331c3fdf097364ecbc 100644 (file)
@@ -1,3 +1,23 @@
+VERSION := $(shell cat version)
+SUBDIRS = klibc
+
+all:
+
+rpmbuild = $(shell which rpmbuild 2>/dev/null || which rpm)
+
+klibc.spec: klibc.spec.in version
+       sed -e 's/@@VERSION@@/$(VERSION)/g' < $< > $@
+
+.PHONY: rpm
+rpm: klibc.spec
+       +$(rpmbuild) -bb klibc.spec
+
+%:
+       @set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
 
 clean:
-       @echo "all clean"
+       @set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
+
+spotless:
+       @set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
+       rm -f klibc.spec *~ tags