Makefile: split install into multiple sub-targets.
This commit is contained in:
parent
6d1124dc0b
commit
c252d6b6bd
1 changed files with 17 additions and 2 deletions
19
Makefile
19
Makefile
|
@ -4,6 +4,7 @@ CONFDIR=$(DESTDIR)/etc
|
||||||
BINDIR=$(DESTDIR)/usr/bin
|
BINDIR=$(DESTDIR)/usr/bin
|
||||||
MANDIR=$(DESTDIR)/usr/share/man
|
MANDIR=$(DESTDIR)/usr/share/man
|
||||||
DOCDIR=$(DESTDIR)/usr/share/doc/$(NAME)
|
DOCDIR=$(DESTDIR)/usr/share/doc/$(NAME)
|
||||||
|
LIBDIR=$(DESTDIR)/usr/share/$(NAME)/
|
||||||
|
|
||||||
RUBYVERSION=1.8
|
RUBYVERSION=1.8
|
||||||
RDOC=rdoc$(RUBYVERSION)
|
RDOC=rdoc$(RUBYVERSION)
|
||||||
|
@ -36,10 +37,24 @@ install-doc:
|
||||||
cp -a doc $(DOCDIR)
|
cp -a doc $(DOCDIR)
|
||||||
|
|
||||||
|
|
||||||
install:
|
install: install-bin install-lib install-data
|
||||||
|
|
||||||
|
install-bin:
|
||||||
mkdir -p $(BINDIR)
|
mkdir -p $(BINDIR)
|
||||||
|
for binfile in bin/*.rb ; do \
|
||||||
|
BINFILE=`basename $$binfile |sed -e 's/.rb$$//'`; \
|
||||||
|
install -D -o root -g root -m 755 $$binfile $(BINDIR)/$$BINFILE; \
|
||||||
|
sed -i -e 's|^QASIM_INCLUDE_DIR.*|QASIM_INCLUDE_DIR = "/usr/share/$(NAME)"|' $(BINDIR)/$$BINFILE; \
|
||||||
|
done
|
||||||
|
#install -D -o root -g root -m 755 $(CURDIR)/bin/$(NAME)-gui.rb $(BINDIR)/$(NAME)-gui
|
||||||
|
|
||||||
|
install-lib:
|
||||||
|
for libfile in $(NAME)/*.rb ; do \
|
||||||
|
install -D -o root -g root -m 644 $$libfile $(LIBDIR)/$$libfile; \
|
||||||
|
done
|
||||||
|
|
||||||
|
install-data:
|
||||||
mkdir -p $(MANDIR)/man1
|
mkdir -p $(MANDIR)/man1
|
||||||
install -D -o root -g root -m 755 $(CURDIR)/bin/$(NAME)-gui.rb $(BINDIR)/$(NAME)-gui
|
|
||||||
#cat $(NAME).1 | gzip > $(MANDIR)/man1/$(NAME).1.gz
|
#cat $(NAME).1 | gzip > $(MANDIR)/man1/$(NAME).1.gz
|
||||||
## Install completion file
|
## Install completion file
|
||||||
# install -D -o root -g root -m 644 $(CURDIR)/$(NAME).completion $(DESTDIR)/etc/bash_completion.d/$(NAME)
|
# install -D -o root -g root -m 644 $(CURDIR)/$(NAME).completion $(DESTDIR)/etc/bash_completion.d/$(NAME)
|
||||||
|
|
Loading…
Reference in a new issue