Fix Makefile to work on phone

This should work more generally.
This commit is contained in:
Tom Willemse 2019-03-06 00:11:08 -08:00
parent 7dcbe804a9
commit 58a8b9efc6

View file

@ -1,14 +1,23 @@
NAME=vc-p4 NAME := vc-p4
VERSION=0.1.0 VERSION := 0.1.0
DESCRIPTION="Perforce integration for VC" DESCRIPTION := "Perforce integration for VC"
.PHONY: vc-p4-pkg.el FULLNAME := "$(NAME)-$(VERSION)"
$(NAME)-$(VERSION).tar: $(NAME)-pkg.el $(NAME).el p4-lowlevel.el .PHONY: $(NAME)-pkg.el
tar cf $@ --xform="s/^/$(NAME)-$(VERSION)\//" $^ .SUFFIXES:
$(FULLNAME).tar: $(FULLNAME)/
tar cf $@ $^
$(FULLNAME)/: $(FULLNAME)/$(NAME)-pkg.el $(FULLNAME)/$(NAME).el $(FULLNAME)/p4-lowlevel.el
$(FULLNAME)/%: ./%
test -d $$(dirname $@) || mkdir $$(dirname $@)
cp $^ $@
$(NAME)-pkg.el: $(NAME)-pkg.el:
echo "(define-package \"$(NAME)\" \"$(VERSION)\" \"$(DESCRIPTION)\")" > $@ echo "(define-package \"$(NAME)\" \"$(VERSION)\" \"$(DESCRIPTION)\")" > $@
clean: clean:
rm -f $(NAME)-pkg.el $(NAME)-$(VERSION).tar rm -rf $(NAME)-pkg.el $(NAME)-$(VERSION).tar $(FULLNAME)/