From 5c71155dc3eca4cc5277598c6a75cc862594c137 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Sun, 7 Mar 2021 16:35:52 -0800 Subject: [PATCH] Only run xattr if present try 3 --- cricket/Makefile | 6 +++++- dclock/Makefile | 6 +++++- ns.clock/Makefile | 6 +++++- quit/Makefile | 6 +++++- ram.drv/Makefile | 6 +++++- selectors/Makefile | 6 +++++- 6 files changed, 30 insertions(+), 6 deletions(-) diff --git a/cricket/Makefile b/cricket/Makefile index fb1682b..1ccdeca 100644 --- a/cricket/Makefile +++ b/cricket/Makefile @@ -20,6 +20,8 @@ DD = $(shell date "+%-d") YY = $(shell date "+%-y") DEFINES = -D DD=$(DD) -D MM=$(MM) -D YY=$(YY) +XATTR := $(shell command -v xattr 2> /dev/null) + .PHONY: clean all all: $(OUTDIR) $(TARGETS) @@ -36,4 +38,6 @@ $(OUTDIR)/%.o: %.s $(HEADERS) $(OUTDIR)/%.BIN $(OUTDIR)/%.SYS: $(OUTDIR)/%.o ld65 $(LDFLAGS) -o $@ $< - if command -v xattr &> /dev/null; then xattr -wx prodos.AuxType '00 20' $@; fi +ifdef XATTR + xattr -wx prodos.AuxType '00 20' $@ +endif diff --git a/dclock/Makefile b/dclock/Makefile index 9e1d279..057049b 100644 --- a/dclock/Makefile +++ b/dclock/Makefile @@ -15,6 +15,8 @@ DD = $(shell date "+%-d") YY = $(shell date "+%-y") DEFINES = -D DD=$(DD) -D MM=$(MM) -D YY=$(YY) +XATTR := $(shell command -v xattr 2> /dev/null) + .PHONY: clean all all: $(OUTDIR) $(TARGETS) @@ -31,4 +33,6 @@ $(OUTDIR)/%.o: %.s $(HEADERS) $(OUTDIR)/%.SYS: $(OUTDIR)/%.o ld65 $(LDFLAGS) -o $@ $< - if command -v xattr &> /dev/null; then xattr -wx prodos.AuxType '00 20' $@; fi +ifdef XATTR + xattr -wx prodos.AuxType '00 20' $@ +endif diff --git a/ns.clock/Makefile b/ns.clock/Makefile index 9c754f6..c4a2210 100644 --- a/ns.clock/Makefile +++ b/ns.clock/Makefile @@ -15,6 +15,8 @@ DD = $(shell date "+%-d") YY = $(shell date "+%-y") DEFINES = -D DD=$(DD) -D MM=$(MM) -D YY=$(YY) +XATTR := $(shell command -v xattr 2> /dev/null) + .PHONY: clean all all: $(OUTDIR) $(TARGETS) @@ -31,4 +33,6 @@ $(OUTDIR)/%.o: %.s $(HEADERS) $(OUTDIR)/%.SYS: $(OUTDIR)/%.o ld65 $(LDFLAGS) -o $@ $< - if command -v xattr &> /dev/null; then xattr -wx prodos.AuxType '00 20' $@; fi +ifdef XATTR + xattr -wx prodos.AuxType '00 20' $@ +endif diff --git a/quit/Makefile b/quit/Makefile index 081f47f..d1c4a1a 100644 --- a/quit/Makefile +++ b/quit/Makefile @@ -15,6 +15,8 @@ DD = $(shell date "+%-d") YY = $(shell date "+%-y") DEFINES = -D DD=$(DD) -D MM=$(MM) -D YY=$(YY) +XATTR := $(shell command -v xattr 2> /dev/null) + .PHONY: clean all all: $(OUTDIR) $(TARGETS) @@ -31,4 +33,6 @@ $(OUTDIR)/%.o: %.s $(HEADERS) $(OUTDIR)/%.SYS: $(OUTDIR)/%.o ld65 $(LDFLAGS) -o $@ $< - if command -v xattr &> /dev/null; then xattr -wx prodos.AuxType '00 20' $@; fi +ifdef XATTR + xattr -wx prodos.AuxType '00 20' $@ +endif diff --git a/ram.drv/Makefile b/ram.drv/Makefile index 2eb3b48..b1e1a95 100644 --- a/ram.drv/Makefile +++ b/ram.drv/Makefile @@ -15,6 +15,8 @@ DD = $(shell date "+%-d") YY = $(shell date "+%-y") DEFINES = -D DD=$(DD) -D MM=$(MM) -D YY=$(YY) +XATTR := $(shell command -v xattr 2> /dev/null) + .PHONY: clean all all: $(OUTDIR) $(TARGETS) @@ -31,4 +33,6 @@ $(OUTDIR)/%.o: %.s $(HEADERS) $(OUTDIR)/%.SYS: $(OUTDIR)/%.o ld65 $(LDFLAGS) -o $@ $< - if command -v xattr &> /dev/null; then xattr -wx prodos.AuxType '00 20' $@; fi +ifdef XATTR + xattr -wx prodos.AuxType '00 20' $@ +endif diff --git a/selectors/Makefile b/selectors/Makefile index 0bdad96..2acc526 100644 --- a/selectors/Makefile +++ b/selectors/Makefile @@ -18,6 +18,8 @@ DD = $(shell date "+%-d") YY = $(shell date "+%-y") DEFINES = -D DD=$(DD) -D MM=$(MM) -D YY=$(YY) +XATTR := $(shell command -v xattr 2> /dev/null) + .PHONY: clean all all: $(OUTDIR) $(TARGETS) @@ -34,4 +36,6 @@ $(OUTDIR)/%.o: %.s $(HEADERS) $(OUTDIR)/%.SYS: $(OUTDIR)/%.o ld65 $(LDFLAGS) -o $@ $< - if command -v xattr &> /dev/null; then xattr -wx prodos.AuxType '00 20' $@; fi +ifdef XATTR + xattr -wx prodos.AuxType '00 20' $@ +endif