forked from mrevjd/cockpit-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile-snippet.txt
executable file
·67 lines (56 loc) · 2.12 KB
/
makefile-snippet.txt
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
55
56
57
58
59
60
61
62
63
64
65
66
67
# Webpack related
WEBPACK_PACKAGES = \
apps \
dashboard \
docker \
kdump \
machines \
networkmanager \
pcp \
packagekit \
playground \
selinux \
shell \
sosreport \
ssh \
storaged \
systemd \
tuned \
users \
$(NULL)
V_WEBPACK = $(V_WEBPACK_$(V))
V_WEBPACK_ = $(V_WEBPACK_$(AM_DEFAULT_VERBOSITY))
V_WEBPACK_0 = @echo " WEBPACK $(@:dist/%/stamp=%)";
WEBPACK_MAKE = NODE_ENV=$(NODE_ENV) SRCDIR=$(abspath $(srcdir)) BUILDDIR=$(abs_builddir) \
timeout 15m $(srcdir)/tools/missing $(srcdir)/tools/webpack-make
WEBPACK_CONFIG = $(srcdir)/webpack.config.js
WEBPACK_INPUTS =
WEBPACK_PO =
WEBPACK_OUTPUTS =
WEBPACK_INSTALL = $(WEBPACK_PACKAGES:%=dist/%/manifest.json)
WEBPACK_DEPS = $(WEBPACK_PACKAGES:%=dist/%/Makefile.deps)
WEBPACK_STAMPS = $(WEBPACK_PACKAGES:%=dist/%/stamp)
WEBPACK_MANIFEST_IN = $(WEBPACK_PACKAGES:%=pkg/%/manifest.json.in)
noinst_SCRIPTS += $(WEBPACK_STAMPS) $(WEBPACK_INSTALL)
MAINTAINERCLEANFILES += $(WEBPACK_STAMPS) $(WEBPACK_DEPS) $(WEBPACK_OUTPUTS)
EXTRA_DIST += $(WEBPACK_STAMPS) $(WEBPACK_DEPS) $(WEBPACK_MANIFEST_IN) webpack.config.js
PRINT_COPY_MSG_0 = echo " COPY " $@ &&
PRINT_COPY_MSG_ = $(PRINT_COPY_MSG_$(AM_DEFAULT_VERBOSITY))
# Copy an original copy of each Makefile.deps from the srcdir, in case
# of an out-of-tree build from a tarball. This is needed because the
# 'include' below won't find the file in srcdir.
# This rule needs to have a successful exit, or make will become unhappy.
dist/%/Makefile.deps:
$(AM_V_at)test "$(srcdir)" == "$(builddir)" -o ! $(srcdir)/$@ -nt $@ || ( \
$(PRINT_COPY_MSG_$(V))$(MKDIR_P) $(dir $@) && \
cp -p $(srcdir)/$@ $@.tmp && \
mv $@.tmp $@)
# This is the primary rule for running webpack; some pkgs like ssh or pcp only
# have a manifest, no actual webpack, so don't call webpack-make for these
dist/%/stamp: $(WEBPACK_CONFIG) $(srcdir)/tools/webpack-make
$(V_WEBPACK) $(MKDIR_P) dist/$* && \
(if ls $(srcdir)/pkg/$*/*.html >/dev/null 2>&1; then $(WEBPACK_MAKE) -d dist/$*/Makefile.deps $(WEBPACK_CONFIG); else touch dist/$*/Makefile.deps; fi ) && \
touch $@
dist/%/manifest.json: pkg/%/manifest.json
$(COPY_RULE)
-include $(WEBPACK_DEPS)