Skip to content

Instantly share code, notes, and snippets.

@darkfeline
Created June 24, 2019 00:42
Show Gist options
  • Save darkfeline/24e2ec43c0cc0b9f3ae69ccda1d63be1 to your computer and use it in GitHub Desktop.
Save darkfeline/24e2ec43c0cc0b9f3ae69ccda1d63be1 to your computer and use it in GitHub Desktop.
Makefile for building emacs-w3m as a package
pkgname = w3m
pkgver = 0.1.0
$(pkgname)-$(pkgver).tar: w3m-pkg.el $(wildcard *.el) $(wildcard shimbun/*.el) dir $(wildcard doc/*.info)
tar --transform "s/^/$(pkgname)-$(pkgver)\//" -cf $@ $(wildcard *.el) $(wildcard shimbun/*.el) dir
tar --transform "s/^doc/$(pkgname)-$(pkgver)/" -rf $@ $(wildcard doc/*.info)
dir: $(wildcard doc/*.info)
rm -f $@
for f in $^; do install-info $$f $@; done
.SUFFIXES:
w3m-pkg.el:
printf "(define-package \"$(pkgname)\" \"$(pkgver)\")" >$@
# Local Variables:
# mode: makefile
# End:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment