- @extras="$(EXTRAS)" ; for target in $$extras ; do \
- echo $$target ; \
- $(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
- -C $$target $@ ; \
- done ; \
-
-uninstall: uninstall-dbus-policy
- - rm $(hotplugdir)/udev.hotplug
- - rm $(configdir)/udev.permissions
- - rm $(configdir)/udev.rules
- - rm $(configdir)/udev.conf
- - rm $(initdir)/udev
- - rm $(mandir)/man8/udev.8
- - rm $(mandir)/man8/udevinfo.8
- - rm $(mandir)/man8/udevtest.8
- - rm $(mandir)/man8/udevstart.8
- - rm $(mandir)/man8/udevd.8
- - rm $(mandir)/man8/udevsend.8
- - rm $(sbindir)/$(ROOT)
- - rm $(sbindir)/$(DAEMON)
- - rm $(sbindir)/$(SENDER)
- - rm $(usrbindir)/$(INFO)
- - rmdir $(hotplugdir)
- - rmdir $(configdir)
- - rm $(udevdir)/.udev.tdb
- - rmdir $(udevdir)
- @extras="$(EXTRAS)" ; for target in $$extras ; do \
- echo $$target ; \
- $(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
- -C $$target $@ ; \
- done ; \
+ @extras="$(EXTRAS)"; for target in $$extras; do \
+ $(MAKE) -C $$target $@ || exit 1; \
+ done;
+.PHONY: uninstall-bin
+
+install: all install-bin install-config install-man
+.PHONY: install
+
+uninstall: uninstall-bin uninstall-man
+.PHONY: uninstall
+
+test tests: all
+ @ cd test && ./udev-test.pl
+.PHONY: test tests
+
+buildtest:
+ test/simple-build-check.sh
+.PHONY: buildtest
+
+ChangeLog:
+ head -1 $@ | grep -q "to v$(shell echo $$(($(VERSION) - 1)))"
+ @ mv $@ $@.tmp
+ @ echo "Summary of changes from v$(shell echo $$(($(VERSION) - 1))) to v$(VERSION)" >> $@
+ @ echo "============================================" >> $@
+ @ echo >> $@
+ @ git log --pretty=short $(shell echo $$(($(VERSION) - 1)))..HEAD | git shortlog >> $@
+ @ echo >> $@
+ @ cat $@
+ @ cat $@.tmp >> $@
+ @ rm $@.tmp
+ head -1 $@ | grep -q "to v$(VERSION)"
+.PHONY: ChangeLog
+.PRECIOUS: ChangeLog
+
+release:
+ $(Q) - rm -f udev-$(VERSION).tar.gz
+ $(Q) - rm -f udev-$(VERSION).tar.bz2
+ head -1 ChangeLog | grep -q "to v$(VERSION)"
+ head -1 RELEASE-NOTES | grep -q "udev $(VERSION)"
+ git commit -a -m "release $(VERSION)"
+ cat .git/refs/heads/master > .git/refs/tags/$(VERSION)
+ @ echo
+ git-archive --format=tar --prefix=udev-$(VERSION)/ HEAD | gzip -9v > udev-$(VERSION).tar.gz
+ git-archive --format=tar --prefix=udev-$(VERSION)/ HEAD | bzip2 -9v > udev-$(VERSION).tar.bz2
+.PHONY: release
+
+dist:
+ git-archive --format=tar --prefix=udev-$(VERSION)/ HEAD | gzip -9v > udev-$(VERSION).tar.gz
+ git-archive --format=tar --prefix=udev-$(VERSION)/ HEAD | bzip2 -9v > udev-$(VERSION).tar.bz2
+.PHONY: dist
+
+patch:
+ git diff $(shell echo $$(($(VERSION) - 1))) HEAD > udev-git-HEAD.patch
+.PHONY: patch
+
+gcov-all:
+ $(MAKE) clean all USE_GCOV=true
+ @ echo
+ @ echo "binaries built with gcov support."
+ @ echo "run the tests and analyze with 'make udev_gcov.txt'"
+.PHONY: gcov-all
+
+# see docs/README-gcov_for_udev
+udev_gcov.txt: $(wildcard *.gcda) $(wildcard *.gcno)
+ for file in `find -maxdepth 1 -name "*.gcno"`; do \
+ name=`basename $$file .gcno`; \
+ echo "################" >> $@; \
+ echo "$$name.c" >> $@; \
+ echo "################" >> $@; \
+ if [ -e "$$name.gcda" ]; then \
+ gcov -l "$$name.c" >> $@ 2>&1; \
+ else \
+ echo "code for $$name.c was never executed" >> $@ 2>&1; \
+ fi; \
+ echo >> $@; \
+ done; \
+ echo "view $@ for the result"