summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-03-25 21:31:16 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-03-25 21:33:05 -0400
commita54a7a2f512da45f6f4f2abae964e9f37ff64a8d (patch)
treeb1e6da1dfe51cca728a376870983f3d6f92143b4 /Makefile
parenta5dc4ab856255416e8881ab7d178d46b47285163 (diff)
downloadpython-systemd-a54a7a2f512da45f6f4f2abae964e9f37ff64a8d.tar.gz
Update to constants from systemd-233
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 2 insertions, 3 deletions
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' | \