mirror of
https://github.com/correl/melpa.git
synced 2024-12-22 19:17:27 +00:00
70aa4693cb
archive.json is regenerated anytime packages/archive-contents changes recipes.json is regenerated anytime a file in recipes/ changes
46 lines
966 B
Makefile
46 lines
966 B
Makefile
SHELL := /bin/bash
|
|
PKGDIR := ./packages
|
|
HTMLDIR := ./html
|
|
WORKDIR := ./working
|
|
|
|
.PHONY: clean build index html json
|
|
.FORCE:
|
|
|
|
all: build json index
|
|
|
|
build:
|
|
emacs --batch -l package-build.el --eval "(package-build-all)"
|
|
|
|
html:
|
|
$(MAKE) -C $(HTMLDIR)
|
|
|
|
index: html
|
|
|
|
clean-working:
|
|
rm -rf $(WORKDIR)/*
|
|
|
|
clean-packages:
|
|
rm -rfv $(PKGDIR)/*
|
|
|
|
clean-json:
|
|
-rm -vf archive.json recipes.json
|
|
|
|
clean: clean-working clean-packages clean-json
|
|
|
|
archive.json: packages/archive-contents
|
|
emacs --batch --no-site-file -l package-build.el --eval \
|
|
'(package-build-archive-alist-as-json "archive.json")'
|
|
|
|
recipes.json: recipes/.dirstamp
|
|
emacs --batch --no-site-file -l package-build.el --eval \
|
|
'(package-build-alist-as-json "recipes.json")'
|
|
|
|
recipes/.dirstamp: .FORCE
|
|
@[[ ! -e $@ || "$$(find $(@D) -newer $@ -print -quit)" != "" ]] && touch $@ || exit 0
|
|
|
|
json: archive.json recipes.json
|
|
|
|
recipes/%: .FORCE
|
|
-rm -vf $(PKGDIR)/$(notdir $@)-*
|
|
@echo
|
|
./buildpkg $(notdir $@)
|