# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-VERSION = 075
+VERSION = 078
# set this to make use of syslog
USE_LOG = true
GEN_HEADERS = \
udev_version.h
-# override this to make udev look in a different location for it's config files
prefix =
etcdir = ${prefix}/etc
sbindir = ${prefix}/sbin
STRIP = $(CROSS)strip
STRIPCMD = $(STRIP) -s
-# check if compiler option is supported
-cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;}
-
CFLAGS = -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
WARNINGS = -Wstrict-prototypes -Wsign-compare -Wshadow \
-Wchar-subscripts -Wmissing-declarations -Wnested-externs \
-Wpointer-arith -Wcast-align -Wsign-compare -Wmissing-prototypes
-WARNINGS += $(call cc-supports, -Wdeclaration-after-statement, )
CFLAGS += $(WARNINGS)
LDFLAGS = -Wl,-warn-common
-# use -Os optimization if available, else use -O2
-OPTFLAGS := $(call cc-supports, -Os, -O2)
+OPTFLAGS = -Os
CFLAGS += $(OPTFLAGS)
# include our local copy of libsysfs
LIBUDEV="$(PWD)/$(LIBUDEV)" \
LIBSYSFS="$(PWD)/$(LIBSYSFS)" \
QUIET="$(QUIET)" \
- -C $$target $@; \
+ -C $$target $@ || exit 1; \
done;
.PHONY: all
.DEFAULT: all
@echo \#define UDEV_ROOT \"$(udevdir)\" >> $@
@echo \#define UDEV_CONFIG_FILE \"$(configdir)/udev.conf\" >> $@
@echo \#define UDEV_RULES_FILE \"$(configdir)/rules.d\" >> $@
- @echo \#define UDEVD_BIN \"$(sbindir)/udevd\" >> $@
# man pages
%.8: docs/%.xml
- rm -f udev-$(VERSION).tar.gz
@extras="$(EXTRAS)"; for target in $$extras; do \
echo $$target; \
- $(MAKE) -C $$target $@; \
+ $(MAKE) -C $$target $@ || exit 1; \
done;
.PHONY: clean
fi
@extras="$(EXTRAS)"; for target in $$extras; do \
echo $$target; \
- $(MAKE) -C $$target $@; \
+ $(MAKE) -C $$target $@ || exit 1; \
done;
.PHONY: install-config
- ln -f -s udevd.8 $(DESTDIR)$(mandir)/man8/udevcontrol.8
@extras="$(EXTRAS)"; for target in $$extras; do \
echo $$target; \
- $(MAKE) -C $$target $@; \
+ $(MAKE) -C $$target $@ || exit 1; \
done;
.PHONY: install-man
- rm -f $(DESTDIR)$(mandir)/man8/udevcontrol.8
@extras="$(EXTRAS)"; for target in $$extras; do \
echo $$target; \
- $(MAKE) -C $$target $@; \
+ $(MAKE) -C $$target $@ || exit 1; \
done;
.PHONY: uninstall-man
$(INSTALL_PROGRAM) -D udevstart $(DESTDIR)$(sbindir)/udevstart
@extras="$(EXTRAS)"; for target in $$extras; do \
echo $$target; \
- $(MAKE) -C $$target $@; \
+ $(MAKE) -C $$target $@ || exit 1; \
done;
ifndef DESTDIR
- killall udevd
endif
@extras="$(EXTRAS)"; for target in $$extras; do \
echo $$target; \
- $(MAKE) -C $$target $@; \
+ $(MAKE) -C $$target $@ || exit 1; \
done;
.PHONY: uninstall-bin
.PHONY: test tests
buildtest:
- ./test/simple-build-check.sh
+ test/simple-build-check.sh
.PHONY: buildtest
+ChangeLog: Makefile
+ @ mv $@ $@.tmp
+ @ echo "Summary of changes from v$(shell printf '%03i' $$(expr $(VERSION) - 1)) to v$(VERSION)" >> $@
+ @ echo "============================================" >> $@
+ @ echo >> $@
+ @ git log --pretty=short $(shell printf '%03i' $$(expr $(VERSION) - 1))..HEAD | git shortlog >> $@
+ @ echo >> $@
+ @ cat $@
+ @ cat $@.tmp >> $@
+ @ rm $@.tmp
+
gcov-all:
$(MAKE) clean all STRIPCMD= USE_GCOV=true
@echo