-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.am
47 lines (40 loc) · 1.38 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
# problems:
# - avoid at all cost the execution of npm or bower on launchpad
# because there is no network access on build farm
# - target 'install' needs that the bower_components/ subdir is filled
# and thus that 'bower install' has been run
# current solution:
# - make everything by hand in target 'all-local'
# - bower_components/ is put into the distribution
# - target 'dist-hook' takes care of that
NPM_INSTALL_FLAGS= --no-color --no-spin --production
BOWER=$(top_builddir)/node_modules/bower/bin/bower
BOWER_INSTALL_FLAGS=--no-color --no-spin
BOWER_TIMESTAMP=.bower_components.timestamp
all-local:
@do_bower_install() { \
echo "installing bower & other stuff" ; \
if test ! -x $(top_builddir)/node_modules/bower/bin/bower ; then \
$(NPM) install $(NPM_INSTALL_FLAGS) bower; \
fi ; \
$(BOWER) install $(BOWER_INSTALL_FLAGS) ; \
touch $@ ; \
} ; \
if test ! -d bower_components ; then \
do_bower_install ; \
elif test -f $(BOWER_TIMESTAMP) ; then \
if test $(srcdir)/bower.json -nt $(BOWER_TIMESTAMP) ; then \
do_bower_install ; \
fi \
fi
clean-local:
-rm -rf node_modules bower_components $(BOWER_TIMESTAMP)
webguidir=$(datadir)/armadito
install-data-hook:
-mkdir -p $(DESTDIR)$(webguidir)
cp -r bower_components $(DESTDIR)$(webguidir)
cp -r $(srcdir)/app $(DESTDIR)$(webguidir)
EXTRA_DIST=\
bower.json
dist-hook: all-local
cp -r bower_components $(distdir)