aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-11-30 03:16:34 +0100
committerMattias Andrée <maandree@operamail.com>2015-11-30 03:16:34 +0100
commitd2d689dfae1c50fdab8fbeaa57a1c238b10f112c (patch)
tree6f0aaff141fe1f91be5f3f56169dcbe9e3bcc30c
parentadd info manual (diff)
downloadcrt-calibrator-1.3.tar.gz
crt-calibrator-1.3.tar.bz2
crt-calibrator-1.3.tar.xz
update makefile1.3
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--DEPENDENCIES3
-rw-r--r--Makefile116
2 files changed, 115 insertions, 4 deletions
diff --git a/DEPENDENCIES b/DEPENDENCIES
index 0ada91a..294d82d 100644
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -4,6 +4,7 @@ RUNTIME DEPENDENCIES:
libdrm
linux
+
BUILD DEPENDENCIES:
libc
@@ -11,6 +12,8 @@ BUILD DEPENDENCIES:
linux
gcc
make
+ texinfo (opt-put: for info, pdf, dvi and ps manuals)
+
INSTALL DEPENDENCIES:
diff --git a/Makefile b/Makefile
index 61ef07c..a700ebf 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,10 @@ BIN = /bin
DATA = /share
BINDIR = $(PREFIX)$(BIN)
DATADIR = $(PREFIX)$(DATA)
+DOCDIR = $(DATADIR)/doc
+INFODIR = $(DATADIR)/info
+MANDIR = $(DATADIR)/man
+MAN1DIR = $(MANDIR)/man1
LICENSES = $(DATADIR)/licenses
COMMAND = crt-calibrator
@@ -32,8 +36,18 @@ OBJS = calibrator drmgamma framebuffer gamma state
+.PHONY: default
+default: base info
+
.PHONY: all
-all: bin/crt-calibrator
+all: base doc
+
+.PHONY: base
+base: cmd
+
+
+.PHONY: cmd
+cmd: bin/crt-calibrator
bin/crt-calibrator: $(foreach O,$(OBJS),obj/$(O).o)
@mkdir -p bin
@@ -44,12 +58,100 @@ obj/%.o: src/%.c src/*.h
$(CC) $(C_FLAGS) -c -o $@ $<
+.PHONY: doc
+doc: info pdf dvi ps
+
+.PHONY: info
+info: bin/crt-calibrator.info
+bin/%.info: doc/info/%.texinfo
+ @mkdir -p bin
+ $(MAKEINFO) $<
+ mv $*.info $@
+
+.PHONY: pdf
+pdf: bin/crt-calibrator.pdf
+bin/%.pdf: doc/info/%.texinfo
+ @! test -d obj/pdf || rm -rf obj/pdf
+ @mkdir -p bin obj/pdf
+ cd obj/pdf && texi2pdf ../../"$<" < /dev/null
+ mv obj/pdf/$*.pdf $@
+
+.PHONY: dvi
+dvi: bin/crt-calibrator.dvi
+bin/%.dvi: doc/info/%.texinfo
+ @! test -d obj/dvi || rm -rf obj/dvi
+ @mkdir -p bin obj/dvi
+ cd obj/dvi && $(TEXI2DVI) ../../"$<" < /dev/null
+ mv obj/dvi/$*.dvi $@
+
+.PHONY: ps
+ps: bin/crt-calibrator.ps
+bin/%.ps: doc/info/%.texinfo
+ @! test -d obj/ps || rm -rf obj/ps
+ @mkdir -p bin obj/ps
+ cd obj/ps && texi2pdf --ps ../../"$<" < /dev/null
+ mv obj/ps/$*.ps $@
+
+
+
.PHONY: install
-install: bin/crt-calibrator
+install: install-base install-info install-man
+
+.PHONY: install-all
+install-all: install-base install-doc
+
+.PHONY: install-base
+install-base: install-cmd install-copyright
+
+
+.PHONY: install-cmd
+install-cmd: bin/crt-calibrator
install -dm755 -- "$(DESTDIR)$(BINDIR)"
- install -m755 bin/crt-calibrator -- "$(DESTDIR)$(BINDIR)/$(COMMAND)"
+ install -m755 $< -- "$(DESTDIR)$(BINDIR)/$(COMMAND)"
+
+
+.PHONY: install-copyright
+install-copyright: install-copying install-license
+
+.PHONY: install-copying
+install-copying:
+ install -dm755 -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)"
+ install -m644 COPYING -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)"
+
+.PHONY: install-license
+install-license:
install -dm755 -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)"
- install -m644 COPYING LICENSE -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)"
+ install -m644 LICENSE -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)"
+
+
+.PHONY: install-doc
+install-doc: install-info install-pdf install-dvi install-ps install-man
+
+.PHONY: install-info
+install-info: bin/crt-calibrator.info
+ install -dm755 -- "$(DESTDIR)$(INFODIR)"
+ install -m644 $< -- "$(DESTDIR)$(INFODIR)/$(PKGNAME).info"
+
+.PHONY: install-pdf
+install-pdf: bin/crt-calibrator.pdf
+ install -dm755 -- "$(DESTDIR)$(DOCDIR)"
+ install -m644 $< -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).pdf"
+
+.PHONY: install-dvi
+install-dvi: bin/crt-calibrator.dvi
+ install -dm755 -- "$(DESTDIR)$(DOCDIR)"
+ install -m644 $< -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).dvi"
+
+.PHONY: install-ps
+install-ps: bin/crt-calibrator.ps
+ install -dm755 -- "$(DESTDIR)$(DOCDIR)"
+ install -m644 $< -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).ps"
+
+.PHONY: install-man
+install-man: doc/man/crt-calibrator.1
+ install -dm755 -- "$(DESTDIR)$(MAN1DIR)"
+ install -m644 $< -- "$(DESTDIR)$(MAN1DIR)/$(COMMAND).1"
+
.PHONY: uninstall
@@ -58,6 +160,12 @@ uninstall:
-rm -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)/COPYING"
-rm -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)/LICENSE"
-rmdir -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)"
+ -rm -- "$(DESTDIR)$(INFODIR)/$(PKGNAME).info"
+ -rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).pdf"
+ -rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).dvi"
+ -rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).ps"
+ -rm -- "$(DESTDIR)$(MAN1DIR)/$(COMMAND).1"
+
.PHONY: clean