- @extras="$(EXTRAS)" ; for target in $$extras ; do \
- echo $$target ; \
- $(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
- -C $$target $@ ; \
- done ; \
-
-uninstall: uninstall-man uninstall-dev.d
- - rm $(hotplugdir)/10-udev.hotplug
- - rm $(hotplugdir)/05-wait_for_sysfs.hotplug
- - rm $(configdir)/rules.d/50-udev.rules
- - rm $(configdir)/permissions.d/50-udev.permissions
- - rm $(configdir)/udev.conf
- - rmdir $(configdir)/rules.d
- - rmdir $(configdir)/permissions.d
- - rmdir $(configdir)
- - rm $(initdir)/udev
- - rm $(sbindir)/$(ROOT)
- - rm $(sbindir)/$(DAEMON)
- - rm $(sbindir)/$(SENDER)
- - rm $(sbindir)/$(STARTER)
- - rm $(usrbindir)/$(INFO)
- - rm $(usrbindir)/$(TESTER)
- - rm $(usrbindir)/$(WAIT)
- - rmdir $(hotplugdir)
- - 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 ; \
+.PHONY: install-bin
+
+uninstall-bin:
+ - rm -f $(sbindir)/udev
+ - rm -f $(sbindir)/udevd
+ - rm -f $(sbindir)/udevsend
+ - rm -f $(sbindir)/udevinitsend
+ - rm -f $(sbindir)/udeveventrecoreder
+ - rm -f $(sbindir)/udevcontrol
+ - rm -f $(sbindir)/udevstart
+ - rm -f $(usrsbindir)/udevmonitor
+ - rm -f $(usrbindir)/udevinfo
+ - rm -f $(usrbindir)/udevtest
+ - rm -rf $(udevdb)
+ - killall udevd
+ @extras="$(EXTRAS)"; for target in $$extras; do \
+ echo $$target; \
+ $(MAKE) prefix=$(prefix) -C $$target $@; \
+ 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
+ @ cd test && ./udevstart-test.pl
+.PHONY: test tests
+
+buildtest:
+ ./test/simple-build-check.sh
+.PHONY: buildtest
+
+gcov-all:
+ $(MAKE) clean all DEBUG=true 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"
+