melpa/Makefile
Georgi Valkov 70aa4693cb Add makefile rules for archive.json and recipes.json
archive.json is regenerated anytime packages/archive-contents changes
recipes.json is regenerated anytime a file in recipes/ changes
2012-07-21 15:31:47 -05:00

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 $@)