Skip to content

Commit 5df9ff5

Browse files
elderingvmcj
authored andcommitted
Replace phony copy-bundle-assets target by a real one
This makes that we don't rerun the rule during `domserver-install` if it already ran during `domserver`, so that if you install as root, the local files are still owned by the user who first ran `make domserver`, not root. This does assume that if the directory `public/bundles/nelmioapidoc` exists, then it contains the assets, and these won't automatically get updated, for example, in the setting of a maintainer-install.
1 parent 5ac5bc2 commit 5df9ff5

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

webapp/Makefile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,18 @@ composer-dump-autoload-dev:
4343
@echo "# the DOMjudge Symfony application in developer mode. Adjust as needed." >> $@
4444
@echo "APP_ENV=dev" >> $@
4545

46-
copy-bundle-assets:
46+
public/bundles/nelmioapidoc:
4747
# We can not use bin/console here, as when using a fakeroot,
4848
# the include paths are broken. We just copy in the data we need
49-
-rm -rf public/bundles/nelmioapidoc
50-
mkdir -p public/bundles/nelmioapidoc
51-
cp -a vendor/nelmio/api-doc-bundle/public/* public/bundles/nelmioapidoc/
49+
-rm -rf $@
50+
mkdir -p $@
51+
cp -a vendor/nelmio/api-doc-bundle/public/* $@
5252

5353
clean-l:
5454
-rm -rf public/bundles/nelmioapidoc
5555
-rm -f vendor/autoload_runtime.php
5656

57-
domserver-l:
58-
# This must be done first to install with the rest.
59-
$(MAKE) copy-bundle-assets
57+
domserver-l: public/bundles/nelmioapidoc
6058

6159
install-domserver:
6260
$(INSTALL_DIR) $(DESTDIR)$(domserver_webappdir);
@@ -88,5 +86,4 @@ maintainer-clean-l:
8886
done ; \
8987
done
9088

91-
.PHONY: composer-dump-autoload composer-dump-autoload-dev \
92-
copy-bundle-assets
89+
.PHONY: composer-dump-autoload-dev

0 commit comments

Comments
 (0)