This repository has been archived by the owner on Mar 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
54 lines (43 loc) · 1.53 KB
/
Makefile.am
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Image Preseeder, a tool to create preseeded Linux installation images
# Copyright 2013 Johannes Lehtinen
#
# Licensed under the MIT License, see LICENSE.md.
SUBDIRS = testsuite
bin_SCRIPTS = image-preseeder
dist_doc_DATA = README.md LICENSE.md EXAMPLES.md \
README.html LICENSE.html EXAMPLES.html
dist_pkgdata_DATA = \
data/preseed-ubuntu-server-12.04.cfg \
data/include-ubuntu-server-12.04
EXAMPLE_TARGETS = examples clean-examples
EXAMPLES_MAKEFILES = examples/Makefile examples/ubuntu-server-install/Makefile
# Environment variables for the examples when run from build directory
IMAGE_PRESEEDER ?= $(abs_builddir)/image-preseeder
IMAGE_PRESEEDER_TOPSRCDIR ?= $(abs_top_srcdir)
IMAGE_PRESEEDER_PKGDATADIR ?= $(IMAGE_PRESEEDER_TOPSRCDIR)/data
IMAGE_PRESEEDER_DOCDIR ?= $(IMAGE_PRESEEDER_TOPSRCDIR)
export IMAGE_PRESEEDER IMAGE_PRESEEDER_TOPSRCDIR IMAGE_PRESEEDER_PKGDATADIR
export IMAGE_PRESEEDER_DOCDIR
all-local: image-preseeder $(EXAMPLES_MAKEFILES)
clean-local:
-rm -f image-preseeder
-rm -f $(EXAMPLES_MAKEFILES)
check-local: examples
examples: image-preseeder
$(EXAMPLE_TARGETS): $(EXAMPLES_MAKEFILES)
$(MAKE) -C examples IMAGE_PRESEEDER_SOURCE=$(abs_srcdir) $@
%: %.template
rm -f '$@.tmp'
mkdir -p "`dirname '$@'`"
sed -e 's|@pkglibdir[@]|$(pkglibdir)|g' \
-e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
-e 's|@docdir[@]|$(docdir)|g' \
< '$<' > '$@.tmp'
chmod --reference='$<' '$@.tmp'
mv '$@.tmp' '$@'
%.html: %.md
rm -f '$@.tmp'
mkdir -p "`dirname '$@'`"
markdown '$<' > '$@.tmp'
mv '$@.tmp' '$@'
.PHONY: $(EXAMPLE_TARGETS)