5
5
export TOPDIR = $(shell pwd)
6
6
7
7
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-dump-autoload composer-dump-autoload-dev
9
10
10
11
# Global Makefile definitions
11
12
include $(TOPDIR ) /Makefile.global
@@ -50,7 +51,7 @@ docs: paths.mk config
50
51
install-domserver : domserver composer-dump-autoload domserver-create-dirs
51
52
install-judgehost : judgehost judgehost-create-dirs
52
53
install-docs : docs-create-dirs
53
- dist : configure composer-dependencies
54
+ dist : configure
54
55
55
56
domserver-configure :
56
57
ifneq "$(DOMSERVER_BUILD_ENABLED ) " "yes"
@@ -64,27 +65,6 @@ ifneq "$(JUDGEHOST_BUILD_ENABLED)" "yes"
64
65
@exit 1
65
66
endif
66
67
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
-
79
- # Dump autoload dependencies (including plugins)
80
- # This is needed since symfony/runtime is a Composer plugin that runs while dumping
81
- # the autoload file
82
- composer-dump-autoload :
83
- composer $(subst 1,-q,$(QUIET ) ) dump-autoload -o -a
84
-
85
- composer-dump-autoload-dev :
86
- composer $(subst 1,-q,$(QUIET ) ) dump-autoload
87
-
88
68
# Generate documentation for distribution. Remove this dependency from
89
69
# dist above for quicker building from git sources.
90
70
distdocs :
@@ -108,12 +88,16 @@ install-judgehost: SUBDIRS=etc lib judge misc-tools
108
88
docs : SUBDIRS= doc
109
89
install-docs : SUBDIRS= doc
110
90
maintainer-conf : SUBDIRS= webapp
91
+ inplace-conf : SUBDIRS= webapp
111
92
inplace-install : SUBDIRS= doc misc-tools
112
93
inplace-uninstall : SUBDIRS= doc misc-tools
113
- dist : SUBDIRS= lib sql misc-tools
94
+ dist : SUBDIRS= lib sql misc-tools webapp
114
95
clean : SUBDIRS=etc doc lib sql judge misc-tools webapp
115
96
distclean : SUBDIRS=etc doc lib sql judge misc-tools webapp
116
97
maintainer-clean : SUBDIRS=etc doc lib sql judge misc-tools webapp
98
+ composer-clean : SUBDIRS= webapp
99
+ composer-dump-autoload : SUBDIRS= webapp
100
+ composer-dump-autoload-dev : SUBDIRS= webapp
117
101
118
102
domserver-create-dirs :
119
103
$(INSTALL_DIR ) $(addprefix $(DESTDIR ) ,$(domserver_dirs ) )
@@ -194,8 +178,8 @@ paths.mk:
194
178
@exit 1
195
179
196
180
# Configure for running in source tree, not meant for normal use:
197
- maintainer-conf : inplace-conf-common composer-dependencies-dev
198
- inplace-conf : inplace-conf-common composer-dependencies
181
+ maintainer-conf : inplace-conf-common
182
+ inplace-conf : inplace-conf-common
199
183
inplace-conf-common : dist
200
184
./configure $(subst 1,-q,$(QUIET ) ) --prefix=$(CURDIR ) \
201
185
--with-domserver_root=$(CURDIR ) \
@@ -216,7 +200,7 @@ inplace-conf-common: dist
216
200
# symlinks where necessary to let it work from the source tree.
217
201
# This stuff is a hack!
218
202
maintainer-install : inplace-install composer-dump-autoload-dev
219
- inplace-install : build composer-dump-autoload domserver-create-dirs judgehost-create-dirs
203
+ inplace-install : build composer-dump-autoload domserver-create-dirs judgehost-create-dirs composer-clean
220
204
inplace-install-l :
221
205
# Replace libjudgedir with symlink to prevent lots of symlinks:
222
206
-rmdir $(judgehost_libjudgedir)
@@ -234,7 +218,6 @@ inplace-install-l:
234
218
$(MKDIR_P) $(domserver_tmpdir)
235
219
chmod a+rwx $(domserver_tmpdir)
236
220
# Make sure we're running from a clean state:
237
- composer auto-scripts
238
221
@echo ""
239
222
@echo "========== Maintainer Install Completed =========="
240
223
@echo ""
@@ -334,6 +317,5 @@ clean-autoconf:
334
317
.PHONY : $(addsuffix -create-dirs,domserver judgehost docs) check-root \
335
318
$(addprefix inplace-,conf conf-common install uninstall) \
336
319
$(addprefix maintainer-,conf install) clean-autoconf config distdocs \
337
- composer-dependencies composer-dependencies-dev \
338
320
composer-dump-autoload composer-dump-autoload-dev \
339
- coverity-conf coverity-build
321
+ coverity-conf coverity-build composer-clean
0 commit comments