From 7ce14b2d36ecbf90fec4988bbb70076e8dc2eb71 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Yadav Date: Thu, 22 Apr 2021 18:27:19 +0530 Subject: [PATCH] Only create blocks when creating config.h --- GNUmakefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 1cf0f45..580755e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -8,12 +8,9 @@ X11LIBS = $(shell pkg-config --libs x11) all: dwmblocks sigdwmblocks/sigdwmblocks xgetrootname/xgetrootname -dwmblocks: dwmblocks.c blocks config.h block.h +dwmblocks: dwmblocks.c config.h block.h ${CC} -o $@ -Wno-missing-field-initializers -Wno-unused-parameter ${CFLAGS} ${X11CFLAGS} $< ${X11LIBS} -blocks: - cp -r blocks.def $@ - E0BLOCKS = $(abspath blocks) # two level escaping of `\', one for sed and one for C E1BLOCKS = $(subst \,\\\\,${E0BLOCKS}) @@ -27,6 +24,7 @@ EFBLOCKS = $(subst ','\'',${E4BLOCKS}) # this comment is a workaround for syntax highlighting bug in vim') config.h: + [ -d blocks ] || cp -R blocks.def blocks sed '2s==${EFBLOCKS}=' config.def.h >$@ sigdwmblocks/sigdwmblocks: sigdwmblocks/sigdwmblocks.c