Add install target to Makefile

Installs everything under `DESTDIR', which is `/usr/local' by
default.
This commit is contained in:
Tom Willemsen 2013-01-06 14:36:51 +01:00
parent 8d9615f72a
commit 58a7c046d2
5 changed files with 41 additions and 3 deletions

View file

@ -1,7 +1,15 @@
dirs = src doc
export DESTDIR ?= /usr/local
dirs = src doc conkeror
install-dirs = $(addprefix install-,$(dirs))
.PHONY: all $(dirs)
all: $(dirs)
install: $(install-dirs)
$(dirs):
$(MAKE) -C $@
$(install-dirs): install-%:
$(MAKE) -C $*/ install

8
conkeror/Makefile Normal file
View file

@ -0,0 +1,8 @@
DESTDIR ?= /usr/local
.PHONY: all install
all:
install: markam.js
install -Dm 655 markam.js \
"$(DESTDIR)/share/conkeror/modules/markam.js"

View file

@ -1,4 +1,12 @@
DESTDIR ?= /usr/local
.PHONY: all
all: markam.info
install: markam.info
install -Dm 655 markam.info "$(DESTDIR)/share/info/markam.info"
install-info --dir-file="$(DESTDIR)/share/info/dir" \
"$(DESTDIR)/share/info/markam.info"
markam.info: markam.texi

View file

@ -35,6 +35,11 @@ The document was typeset with
@insertcopying
@end titlepage
@dircategory Individual utilities
@direntry
* Markam: (markam). Keeps bookmarks.
@end direntry
@c Output the table of the contents at the beginning.
@contents

View file

@ -1,13 +1,22 @@
DESTDIR ?= /usr/local
binaries = markam markam-convert
install-binaries = $(addprefix install-,$(binaries))
objects = paths.o common.o
.PHONY: all
.PHONY: all install
all: $(binaries)
install: $(install-binaries)
all: markam markam-convert
markam: markam.scm $(objects)
csc $^ -o $@
markam-convert: markam-convert.scm $(objects)
csc $^ -o $@
$(install-binaries): install-%: %
install -Dm 755 $* "$(DESTDIR)/bin/$*"
$(objects): %.o: %.scm
csc -c $^