From a54a7a2f512da45f6f4f2abae964e9f37ff64a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 25 Mar 2017 21:31:16 -0400 Subject: Update to constants from systemd-233 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In systemd-233 the format of the constants file changed to use SD_ID128_MAKE_STR macro and long lines are broken with '\'. Doing this in sed is too anyoing — add a simple python script to do the processing. --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 678f412..26f75b8 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,8 @@ builddir := $(shell $(PYTHON) -c '$(buildscript)') all: build .PHONY: update-constants -update-constants: $(INCLUDE_DIR)/systemd/sd-messages.h - cat $< systemd/id128-defines.h | \ - $(SED) -n -r '/#define SD_MESSAGE_[A-Z0-9_]/p' | \ +update-constants: update-constants.py $(INCLUDE_DIR)/systemd/sd-messages.h + $(PYTHON) $+ systemd/id128-defines.h | \ sort -u | \ tee systemd/id128-defines.h.tmp | \ $(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' | \ -- cgit v1.2.1