Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emacs/del outdated files #1188

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
16 changes: 12 additions & 4 deletions editors/emacs/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.POSIX:

VERSION = 1.1.0
NAME = lambdapi-mode
LAMBDAPI_FILE = lambdapi-mode.el
fblanqui marked this conversation as resolved.
Show resolved Hide resolved
VERSION = $(shell cat $(LAMBDAPI_FILE) | grep ";; Version:" | sed "s/;; Version: \(.*\)/\1/")
fblanqui marked this conversation as resolved.
Show resolved Hide resolved
NAME = $(shell cat $(LAMBDAPI_FILE) | grep "^(provide" | grep ")" | grep -v "legacy" | sed "s/(provide '\(.*\))/\1/")
fblanqui marked this conversation as resolved.
Show resolved Hide resolved
# The path to lambdapi built by dune
LAMBDAPI = ../../_build/install/default/bin/lambdapi

Expand All @@ -12,7 +12,7 @@ SRC += lambdapi-abbrev.el
SRC += lambdapi-capf.el
SRC += lambdapi-input.el
SRC += lambdapi-layout.el
SRC += lambdapi-mode.el
SRC += $(LAMBDAPI_FILE)
SRC += lambdapi-mode-pkg.el
SRC += lambdapi-proofs.el
SRC += lambdapi-smie.el
Expand All @@ -23,6 +23,14 @@ $(NAME)-$(VERSION).tar: $(SRC)
cp *.el "$(NAME)-$(VERSION)"
tar -cf "$(NAME)-$(VERSION)".tar "$(NAME)-$(VERSION)"

.PHONY: lambdapi-mode-pkg.el
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you make it phony?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be useful if lambdapi-mode-pkg.el is accidentally altered between two generations. I can remove it if not really useful which would allow one to change the lambdapi-mode-pkg.el file manually before installation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand. PHONY means that this is a target that do not correspond to an actual file, doesn't it?

lambdapi-mode-pkg.el: $(LAMBDAPI_FILE)
$(eval description := $(shell cat $< | grep ";;; $(LAMBDAPI_FILE) ---" | sed "s/;;; $(LAMBDAPI_FILE) --- \(.*\)-\*- lexical-binding:.*/\1/"))
fblanqui marked this conversation as resolved.
Show resolved Hide resolved
$(eval requirements := $(shell cat $(LAMBDAPI_FILE) | grep ";; Package-Requires: " | sed "s/;; Package-Requires: \(.*\)/\1/" | sed 's/"/\\"/g' | cut -d' ' -f3-100))
fblanqui marked this conversation as resolved.
Show resolved Hide resolved
@echo "(define-package \"$(NAME)\" \"$(VERSION)\"" > $@
@echo " \"$(description)\"" >> $@
@echo " '($(requirements))" >> $@

.PHONY: install
install:
@echo "See https://lambdapi.readthedocs.io/en/latest/emacs.html \
Expand Down
5 changes: 0 additions & 5 deletions editors/emacs/lambdapi-mode-pkg.el

This file was deleted.

Loading