chiark / gitweb /
path_id: fix invalid character class
[elogind.git] / Makefile
index 4968df42616b6cdffe8b416d4f8dfe0f7f4a9f8f..5edc76f81a85e9ddcb3dc1b7592ee2c0bdf03c4f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 #
 
-VERSION = 075
+VERSION = 079
 
 # set this to make use of syslog
 USE_LOG = true
@@ -106,13 +106,12 @@ GEN_CONFIGS = \
 GEN_HEADERS = \
        udev_version.h
 
-# override this to make udev look in a different location for it's config files
 prefix =
-exec_prefix =  ${prefix}
 etcdir =       ${prefix}/etc
-sbindir =      ${exec_prefix}/sbin
-usrbindir =    ${exec_prefix}/usr/bin
-usrsbindir =   ${exec_prefix}/usr/sbin
+sbindir =      ${prefix}/sbin
+usrbindir =    ${prefix}/usr/bin
+usrsbindir =   ${prefix}/usr/sbin
+libudevdir =   ${prefix}/lib/udev
 mandir =       ${prefix}/usr/share/man
 configdir =    ${etcdir}/udev
 udevdir =      /dev
@@ -134,20 +133,15 @@ HOSTCC = gcc
 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
@@ -208,7 +202,7 @@ all: $(PROGRAMS) $(MAN_PAGES)
                        LIBUDEV="$(PWD)/$(LIBUDEV)" \
                        LIBSYSFS="$(PWD)/$(LIBSYSFS)" \
                        QUIET="$(QUIET)" \
-                       -C $$target $@; \
+                       -C $$target $@ || exit 1; \
        done;
 .PHONY: all
 .DEFAULT: all
@@ -217,7 +211,7 @@ all: $(PROGRAMS) $(MAN_PAGES)
 .SUFFIXES:
 
 # build the objects
-%.o: %.c $(GEN_HEADERS)
+%.o: %.c $(HOST_PROGS) $(GEN_HEADERS)
        $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
 
 # "Static Pattern Rule" to build all programs
@@ -248,10 +242,8 @@ udev_version.h:
        @echo "Creating udev_version.h"
        @echo \#define UDEV_VERSION             \"$(VERSION)\" > $@
        @echo \#define UDEV_ROOT                \"$(udevdir)\" >> $@
-       @echo \#define UDEV_CONFIG_DIR          \"$(configdir)\" >> $@
        @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
@@ -263,6 +255,7 @@ ccdv: ccdv.c
 .SILENT: ccdv
 
 clean:
+       - rm -f $(HOST_PROGS)
        - find . \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print0 | xargs -0rt rm -f
        - find -name "*.gcno" -print0 | xargs -0rt rm -f
        - find -name "*.gcda" -print0 | xargs -0rt rm -f
@@ -272,7 +265,7 @@ clean:
        - 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
 
@@ -294,7 +287,7 @@ install-config: $(GEN_CONFIGS)
        fi
        @extras="$(EXTRAS)"; for target in $$extras; do \
                echo $$target; \
-               $(MAKE) -C $$target $@; \
+               $(MAKE) -C $$target $@ || exit 1; \
        done;
 .PHONY: install-config
 
@@ -309,7 +302,7 @@ install-man:
        - 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
 
@@ -324,7 +317,7 @@ uninstall-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
 
@@ -340,7 +333,7 @@ install-bin:
        $(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
@@ -364,7 +357,7 @@ ifndef DESTDIR
 endif
        @extras="$(EXTRAS)"; for target in $$extras; do \
                echo $$target; \
-               $(MAKE) -C $$target $@; \
+               $(MAKE) -C $$target $@ || exit 1; \
        done;
 .PHONY: uninstall-bin
 
@@ -380,9 +373,20 @@ test tests: all
 .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