summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-05-10 11:55:21 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-05-10 11:55:21 +0200
commit2080c4a3487d863f57ba498bb4831824aab3e25e (patch)
tree19050444236a490b9be135c766947b992e041e98 /Makefile
parent4db42542867edd537df285abb6d2cdf4f727ec40 (diff)
Makefile: Handle files with weird names
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 9f72e7f..502df74 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ MAKEFLAGS += --warn-undefined-variables
package := grepc
DISTVERSION := $(shell git describe 2>/dev/null)
DISTNAME := $(package)-$(DISTVERSION)
+DIST_FILES := $(shell git ls-files -z 2>/dev/null | xargs -0 find)
srcdir := .
@@ -112,9 +113,9 @@ $(_prog): $(_exec_prefix)/%: $(srcdir)/% Makefile | $$(@D)
$(_data): $(_prefix)/%: $(srcdir)/% Makefile | $$(@D)
$(info INSTALL $@)
- $(INSTALL_DATA) -T $< $@
+ $(INSTALL_DATA) -T '$<' '$@'
-$(DISTFILE): $(shell git ls-files 2>/dev/null) Makefile | $$(@D)
+$(DISTFILE): $(DIST_FILES) Makefile | $$(@D)
$(info TAR $@)
tar cf $@ -T /dev/null
git ls-files \