Commit 6af65345 authored by Bob Ham's avatar Bob Ham

Makefile: create link to local.sh in files/ when present in root

Add a PHONY rule to Makefile to possibly create a link if there's a
local.sh present in the root, before creating an image.  This allows
"make clean" to nuke any local.sh in files/ while also allowing
easy maintenance of a local.sh.
parent d3e9f9b5
debootstrap.log
local.sh
*.img
*.img.xz
*.tar.xz
......
......@@ -16,7 +16,7 @@ DEPS=\
all: $(CHECKSUM)
tmp/$(IMAGE).stamp $(IMAGE) $(TARBALL): $(DEPS)
tmp/$(IMAGE).stamp $(IMAGE) $(TARBALL): local.sh-link $(DEPS)
./build-image -b $(BOARD) -T $(TYPE)
touch tmp/$(IMAGE).stamp
......@@ -39,4 +39,10 @@ publish: $(CHECKSUM)
bin/sign-checksum
bin/publish -T ${TYPE}
.PHONY: all publish
local.sh-link:
if test -e local.sh; then \
mkdir -p files; \
ln -sf ../local.sh files; \
fi
.PHONY: all publish local.sh-link
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment