Skip to content

Commit

Permalink
Use magic variables in Makefiles (#139)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Worrall <[email protected]>
  • Loading branch information
straight-shoota and Daniel-Worrall authored Sep 27, 2021
1 parent 59dd735 commit fd10ce5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ $(OUTPUT_BASENAME64).tar: Dockerfile $(FILES)
mkdir -p $(OUTPUT_DIR)
docker build $(BUILD_ARGS64) -t crystal-build-temp .
container_id="$$(docker create crystal-build-temp)" \
&& docker cp "$$container_id":/output/crystal-$(CRYSTAL_VERSION)-$(PACKAGE_ITERATION).tar $(OUTPUT_BASENAME64).tar \
&& docker cp "$$container_id":/output/crystal-$(CRYSTAL_VERSION)-$(PACKAGE_ITERATION).tar $@ \
&& docker rm -v "$$container_id"

$(OUTPUT_BASENAME64)-bundled.tar: $(OUTPUT_BASENAME64).tar $(OUTPUT_DIR)/bundled-libs.tar
Expand All @@ -116,7 +116,7 @@ $(OUTPUT_BASENAME32).tar: Dockerfile $(FILES)
mkdir -p $(OUTPUT_DIR)
docker build $(BUILD_ARGS32) -t crystal-build32-temp .
container_id="$$(docker create crystal-build32-temp)" \
&& docker cp "$$container_id":/output/crystal-$(CRYSTAL_VERSION)-$(PACKAGE_ITERATION).tar $(OUTPUT_BASENAME32).tar \
&& docker cp "$$container_id":/output/crystal-$(CRYSTAL_VERSION)-$(PACKAGE_ITERATION).tar $@ \
&& docker rm -v "$$container_id"

.PHONY: compress32
Expand Down
2 changes: 1 addition & 1 deletion snapcraft/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ all: snap/snapcraft.yaml

.PHONY: snap/snapcraft.yaml
snap/snapcraft.yaml:
sed 's/$${CRYSTAL_RELEASE_LINUX64_TARGZ}/$(subst /,\/,$(CRYSTAL_RELEASE_LINUX64_TARGZ))/; s/$${SNAP_GRADE}/$(SNAP_GRADE)/' snap/local/snapcraft.yaml.tpl > snap/snapcraft.yaml
sed 's/$${CRYSTAL_RELEASE_LINUX64_TARGZ}/$(subst /,\/,$(CRYSTAL_RELEASE_LINUX64_TARGZ))/; s/$${SNAP_GRADE}/$(SNAP_GRADE)/' snap/local/snapcraft.yaml.tpl > $@

clean:
rm snap/snapcraft.yaml
Expand Down

0 comments on commit fd10ce5

Please sign in to comment.