-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (22 loc) · 1.13 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
INSTALL ?= install
PREFIX ?= /usr
GEBUILDER_ROOT ?=$(PREFIX)/share/gebuilder
MANDIR ?= $(PREFIX)/share/man
BINDIR ?= $(PREFIX)/bin/
CACHEDIR ?= /var/cache/gebuilder
IMAGESDIR ?= /var/lib/gebuilder
BUILDFILES = gebuilder/gebuild
M4OPTS = -DCACHEDIR=$(CACHEDIR) -DIMAGESDIR=$(IMAGESDIR) -DPREFIX=$(PREFIX) -DGEBUILDER_ROOT=$(GEBUILDER_ROOT)
all: gebuilder/gebuild
doc/gebuild.8: doc/gebuild.8.m4 $(wildcard gebuilder/scripts/*/*.sh gebuilder/scripts/*/*/*.sh) ./gebuilder/utils/docgenerator.sh
./gebuilder/utils/docgenerator.sh gebuilder/scripts | m4 $(M4OPTS) $< > $@
gebuilder/gebuild: gebuilder/gebuild.m4 Makefile
m4 $(M4OPTS) $< > $@
chmod a+x $@
.PHONY: install
install: gebuilder/gebuild doc/gebuild.8 doc/dotgentoo.5
cd gebuilder; find -L utils config -type f -exec install -D -m 0644 {} $(DESTDIR)$(GEBUILDER_ROOT)/{} \;
cd gebuilder; find -L example_hooks exec.sh scripts -type f -exec install -D -m 0755 {} $(DESTDIR)$(GEBUILDER_ROOT)/{} \;
$(INSTALL) -D -m 0755 -t $(DESTDIR)$(BINDIR) gebuilder/gebuild
$(INSTALL) -D -m 0644 -t $(DESTDIR)$(MANDIR)/man8/ doc/gebuild.8
$(INSTALL) -D -m 0644 -t $(DESTDIR)$(MANDIR)/man5/ doc/dotgentoo.5