Skip to content

Commit 90893b3

Browse files
author
Michael Vasseur
committed
Install the dependencies from a recursive target in webapp
1 parent ad0171c commit 90893b3

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

Makefile

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
export TOPDIR = $(shell pwd)
66

77
REC_TARGETS=build domserver install-domserver judgehost install-judgehost \
8-
docs install-docs inplace-install inplace-uninstall maintainer-conf
8+
docs install-docs inplace-install inplace-uninstall maintainer-conf \
9+
composer-dependencies composer-dependencies-dev
910

1011
# Global Makefile definitions
1112
include $(TOPDIR)/Makefile.global
@@ -64,18 +65,6 @@ ifneq "$(JUDGEHOST_BUILD_ENABLED)" "yes"
6465
@exit 1
6566
endif
6667

67-
# Install PHP dependencies
68-
composer-dependencies:
69-
ifeq (, $(shell command -v composer 2> /dev/null))
70-
$(error "'composer' command not found in $(PATH), install it via your package manager or https://getcomposer.org/download/")
71-
endif
72-
# We use --no-scripts here because at this point the autoload.php file is
73-
# not generated yet, which is needed to run the post-install scripts.
74-
composer $(subst 1,-q,$(QUIET)) install --prefer-dist -o -a --no-scripts --no-plugins
75-
76-
composer-dependencies-dev:
77-
composer $(subst 1,-q,$(QUIET)) install --prefer-dist --no-scripts --no-plugins
78-
7968
# Dump autoload dependencies (including plugins)
8069
# This is needed since symfony/runtime is a Composer plugin that runs while dumping
8170
# the autoload file
@@ -114,6 +103,8 @@ dist: SUBDIRS= lib sql misc-tools
114103
clean: SUBDIRS=etc doc lib sql judge misc-tools webapp
115104
distclean: SUBDIRS=etc doc lib sql judge misc-tools webapp
116105
maintainer-clean: SUBDIRS=etc doc lib sql judge misc-tools webapp
106+
composer-dependencies: SUBDIRS= webapp
107+
composer-dependencies-dev: SUBDIRS= webapp
117108

118109
domserver-create-dirs:
119110
$(INSTALL_DIR) $(addprefix $(DESTDIR),$(domserver_dirs))

webapp/Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ install-domserver:
5151

5252
inplace-install: composer-autoclean
5353

54+
# Install PHP dependencies
55+
composer-dependencies:
56+
ifeq (, $(shell command -v composer 2> /dev/null))
57+
$(error "'composer' command not found in $(PATH), install it via your package manager or https://getcomposer.org/download/")
58+
endif
59+
# We use --no-scripts here because at this point the autoload.php file is
60+
# not generated yet, which is needed to run the post-install scripts.
61+
composer $(subst 1,-q,$(QUIET)) install --prefer-dist -o -a --no-scripts --no-plugins
62+
63+
composer-dependencies-dev:
64+
composer $(subst 1,-q,$(QUIET)) install --prefer-dist --no-scripts --no-plugins
65+
5466
composer-autoclean:
5567
# Make sure we're running from a clean state:
5668
composer auto-scripts

0 commit comments

Comments
 (0)