2014-08-25 12:54:44 +02:00
|
|
|
# Install target
|
2014-08-21 10:29:15 +02:00
|
|
|
install: toxic doc
|
2014-07-30 14:14:13 +02:00
|
|
|
mkdir -p $(abspath $(DESTDIR)/$(BINDIR))
|
|
|
|
mkdir -p $(abspath $(DESTDIR)/$(DATADIR))
|
|
|
|
mkdir -p $(abspath $(DESTDIR)/$(DATADIR))/sounds
|
|
|
|
mkdir -p $(abspath $(DESTDIR)/$(MANDIR))
|
2014-08-21 10:29:15 +02:00
|
|
|
|
2014-07-30 14:14:13 +02:00
|
|
|
@echo "Installing toxic executable"
|
|
|
|
@install -m 0755 toxic $(abspath $(DESTDIR)/$(BINDIR))
|
2014-08-21 10:29:15 +02:00
|
|
|
|
2014-07-30 14:14:13 +02:00
|
|
|
@echo "Installing data files"
|
|
|
|
@for f in $(DATAFILES) ; do \
|
|
|
|
install -m 0644 $(MISC_DIR)/$$f $(abspath $(DESTDIR)/$(DATADIR)) ;\
|
|
|
|
file=$(abspath $(DESTDIR)/$(DATADIR))/$$f ;\
|
|
|
|
sed -i'' -e 's:__DATADIR__:'$(abspath $(DATADIR))':g' $$file ;\
|
|
|
|
done
|
|
|
|
@for f in $(SNDFILES) ; do \
|
|
|
|
install -m 0644 $(SND_DIR)/$$f $(abspath $(DESTDIR)/$(DATADIR))/sounds ;\
|
|
|
|
done
|
2014-08-21 10:29:15 +02:00
|
|
|
|
2014-07-30 14:14:13 +02:00
|
|
|
@echo "Installing man pages"
|
|
|
|
@for f in $(MANFILES) ; do \
|
|
|
|
section=$(abspath $(DESTDIR)/$(MANDIR))/man`echo $$f | rev | cut -d "." -f 1` ;\
|
|
|
|
file=$$section/$$f ;\
|
|
|
|
mkdir -p $$section ;\
|
2014-08-24 22:34:16 +02:00
|
|
|
install -m 0644 $(DOC_DIR)/$$f $$file ;\
|
|
|
|
sed -i'' -e 's:__VERSION__:'$(VERSION)':g' $$file ;\
|
|
|
|
sed -i'' -e 's:__DATADIR__:'$(abspath $(DATADIR))':g' $$file ;\
|
2014-07-30 14:14:13 +02:00
|
|
|
gzip -f -9 $$file ;\
|
|
|
|
done
|
|
|
|
|
|
|
|
.PHONY: install
|