Skip to content

Commit

Permalink
Merge webapp/vendor/Makefile into webapp/Vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
tom93 committed Jul 20, 2024
1 parent 590d3a9 commit a652b04
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 38 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ docs: SUBDIRS= doc
install-docs: SUBDIRS= doc
maintainer-conf: SUBDIRS= webapp
maintainer-install: SUBDIRS= webapp
inplace-install: SUBDIRS= doc misc-tools webapp
inplace-install: SUBDIRS= doc misc-tools
inplace-uninstall: SUBDIRS= doc misc-tools
dist: SUBDIRS= lib sql misc-tools
clean: SUBDIRS=etc doc lib sql judge misc-tools webapp
Expand Down Expand Up @@ -217,6 +217,8 @@ inplace-install-l:
# because judgehost-create-dirs sets wrong permissions:
$(MKDIR_P) $(domserver_tmpdir)
chmod a+rwx $(domserver_tmpdir)
# Make sure we're running from a clean state:
(cd webapp && composer auto-scripts)
@echo ""
@echo "========== Maintainer Install Completed =========="
@echo ""
Expand Down Expand Up @@ -317,5 +319,4 @@ clean-autoconf:
$(addprefix inplace-,conf conf-common install uninstall) \
$(addprefix maintainer-,conf install) clean-autoconf config distdocs \
composer-dependencies composer-dependencies-dev \
composer-dump-autoload-dev \
coverity-conf coverity-build
1 change: 0 additions & 1 deletion webapp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/var/log/*
!var/log/.gitkeep
/vendor/
!vendor/Makefile

###> phpunit/phpunit ###
/phpunit.xml
Expand Down
53 changes: 30 additions & 23 deletions webapp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,32 @@ REC_TARGETS = domserver
include $(TOPDIR)/Makefile.global

# Subdirectories to recurse into for REC_TARGETS
SUBDIRS = config vendor
SUBDIRS = config

domserver: composer-dump-autoload

# Install PHP dependencies
composer-dependencies:
ifeq (, $(shell command -v composer 2> /dev/null))
$(error "'composer' command not found in $(PATH), install it via your package manager or https://getcomposer.org/download/")
endif
# We use --no-scripts here because at this point the autoload.php file is
# not generated yet, which is needed to run the post-install scripts.
composer $(subst 1,-q,$(QUIET)) install --prefer-dist -o -a --no-scripts --no-plugins

composer-dependencies-dev:
composer $(subst 1,-q,$(QUIET)) install --prefer-dist --no-scripts --no-plugins

# Dump autoload dependencies (including plugins)
# This is needed since symfony/runtime is a Composer plugin that runs while dumping
# the autoload file
composer-dump-autoload:
# We skip this if autoload_runtime.php already exists, to avoid
# setting the ownerhip to 'root' during `sudo make install-domserver`.
[ -f vendor/autoload_runtime.php ] || composer $(subst 1,-q,$(QUIET)) dump-autoload -o -a

composer-dump-autoload-dev:
composer $(subst 1,-q,$(QUIET)) dump-autoload

maintainer-conf: .env.local

Expand All @@ -18,8 +43,7 @@ maintainer-conf: .env.local
@echo "# the DOMjudge Symfony application in developer mode. Adjust as needed." >> $@
@echo "APP_ENV=dev" >> $@

composer-dump-autoload-dev:
composer $(subst 1,-q,$(QUIET)) dump-autoload
maintainer-install: composer-dump-autoload-dev

copy-bundle-assets:
# We can not use bin/console here, as when using a fakeroot,
Expand All @@ -30,6 +54,7 @@ copy-bundle-assets:

clean-l:
-rm -rf public/bundles/nelmioapidoc
-rm -f vendor/autoload_runtime.php

install-domserver:
# This must be done first to install with the rest.
Expand All @@ -52,30 +77,12 @@ install-domserver:
done
$(INSTALL_DATA) -t $(DESTDIR)$(domserver_webappdir) phpunit.xml.dist .env

inplace-install: composer-autoclean
maintainer-install: composer-dump-autoload-dev

# Install PHP dependencies
composer-dependencies:
ifeq (, $(shell command -v composer 2> /dev/null))
$(error "'composer' command not found in $(PATH), install it via your package manager or https://getcomposer.org/download/")
endif
# We use --no-scripts here because at this point the autoload.php file is
# not generated yet, which is needed to run the post-install scripts.
composer $(subst 1,-q,$(QUIET)) install --prefer-dist -o -a --no-scripts --no-plugins

composer-dependencies-dev:
composer $(subst 1,-q,$(QUIET)) install --prefer-dist --no-scripts --no-plugins

composer-autoclean:
# Make sure we're running from a clean state:
composer auto-scripts

maintainer-clean-l:
-for d in cache log ; do \
for t in dev prod ; do \
rm -rf var/$$d/$$t ; \
done ; \
done

.PHONY: copy-bundle-assets
.PHONY: composer-dump-autoload composer-dump-autoload-dev \
copy-bundle-assets
12 changes: 0 additions & 12 deletions webapp/vendor/Makefile

This file was deleted.

0 comments on commit a652b04

Please sign in to comment.