Skip to content

Commit

Permalink
Better docs install.
Browse files Browse the repository at this point in the history
Choose compression:
METHOD="gzip -9"
sed -i -e 's|^COMPRESS.*|COMPRESS = $METHOD|' i-nex.mk
  • Loading branch information
eloaders committed Jul 15, 2014
1 parent 261d9b7 commit 2f2b071
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 12 deletions.
44 changes: 32 additions & 12 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,36 @@
include ../i-nex.mk
install: install-doc compress-doc

install-doc:
install-doc: install_copyright \
install_i_nex_LICENSE \
install_Pastebinit_LICENSE

compress-doc: compress-copyright \
compress_i_nex_LICENSE \
compress_Pastebinit_LICENSE

install_copyright:
@echo -e '\033[1;32mCreate directory...\033[0m'
$(MKDIR_P) $(DESTDIR)$(PREFIX)$(DOCSDIR)
@echo -e '\033[1;32mInstalling Docs copyright...\033[0m'
$(INSTALL_DM)644 copyright "$(DESTDIR)$(PREFIX)$(DOCSDIR)/copyright"
install_i_nex_LICENSE:
@echo -e '\033[1;32mCreate directory...\033[0m'
mkdir -p $(DESTDIR)$(PREFIX)$(DOCSDIR)
@echo -e '\033[1;32mInstalling Docs...\033[0m'
install -Dm644 copyright "$(DESTDIR)$(PREFIX)$(DOCSDIR)/copyright"
install -Dm644 I-Nex.LICENSE "$(DESTDIR)$(PREFIX)$(DOCSDIR)/I-Nex.LICENSE"
install -Dm644 Pastebinit.LICENSE "$(DESTDIR)$(PREFIX)$(DOCSDIR)/Pastebinit.LICENSE"

compress-doc:
@echo -e '\033[1;32mCompress Docs...\033[0m'
gzip -9 "$(DESTDIR)$(PREFIX)$(DOCSDIR)/copyright"
gzip -9 "$(DESTDIR)$(PREFIX)$(DOCSDIR)/I-Nex.LICENSE"
gzip -9 "$(DESTDIR)$(PREFIX)$(DOCSDIR)/Pastebinit.LICENSE"
$(MKDIR_P) $(DESTDIR)$(PREFIX)$(DOCSDIR)
@echo -e '\033[1;32mInstalling Docs I-Nex.LICENSE...\033[0m'
$(INSTALL_DM)644 I-Nex.LICENSE "$(DESTDIR)$(PREFIX)$(DOCSDIR)/I-Nex.LICENSE"
install_Pastebinit_LICENSE:
@echo -e '\033[1;32mCreate directory...\033[0m'
$(MKDIR_P) $(DESTDIR)$(PREFIX)$(DOCSDIR)
@echo -e '\033[1;32mInstalling Docs Pastebinit.LICENSE...\033[0m'
$(INSTALL_DM)644 Pastebinit.LICENSE "$(DESTDIR)$(PREFIX)$(DOCSDIR)/Pastebinit.LICENSE"

compress_copyright:
@echo -e '\033[1;32mCompress Docs copyright...\033[0m'
$(COMPRESS) "$(DESTDIR)$(PREFIX)$(DOCSDIR)/copyright"
compress_i_nex_LICENSE:
@echo -e '\033[1;32mCompress Docs I-Nex.LICENSE...\033[0m'
$(COMPRESS) "$(DESTDIR)$(PREFIX)$(DOCSDIR)/I-Nex.LICENSE"
compress_Pastebinit_LICENSE:
@echo -e '\033[1;32mCompress Docs Pastebinit.LICENSE...\033[0m'
$(COMPRESS) "$(DESTDIR)$(PREFIX)$(DOCSDIR)/Pastebinit.LICENSE"
2 changes: 2 additions & 0 deletions i-nex.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ CC = gcc
CFLAGS = -g -Wall
bindir = $(PREFIX)/bin
INSTALL = install -m
INSTALL_DM = install -Dm
MKDIR_P = mkdir -p
COMPRESS = gzip -9
RM_COM = rm
RMFILE_OPT = -f
RMDIR_OPT = -Rf
Expand Down

0 comments on commit 2f2b071

Please sign in to comment.