Skip to content

Commit 3e8dd0f

Browse files
Michael Vasseurvmcj
authored andcommitted
Simplify maintainer-conf target by traversing
In another commit we will move more targets there. Because of that we can put this target in the correct dir and simplify the reading process.
1 parent 2024e6c commit 3e8dd0f

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

Makefile

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

77
REC_TARGETS=build domserver install-domserver judgehost install-judgehost \
8-
docs install-docs inplace-install inplace-uninstall
8+
docs install-docs inplace-install inplace-uninstall maintainer-conf
99

1010
# Global Makefile definitions
1111
include $(TOPDIR)/Makefile.global
@@ -101,6 +101,7 @@ judgehost: SUBDIRS=etc judge misc-tools
101101
install-judgehost: SUBDIRS=etc lib judge misc-tools
102102
docs: SUBDIRS= doc
103103
install-docs: SUBDIRS= doc
104+
maintainer-conf: SUBDIRS= webapp
104105
inplace-install: SUBDIRS= doc misc-tools
105106
inplace-uninstall: SUBDIRS= doc misc-tools
106107
dist: SUBDIRS= lib sql misc-tools
@@ -187,7 +188,7 @@ paths.mk:
187188
@exit 1
188189

189190
# Configure for running in source tree, not meant for normal use:
190-
maintainer-conf: inplace-conf-common composer-dependencies-dev webapp/.env.local
191+
maintainer-conf: inplace-conf-common composer-dependencies-dev
191192
inplace-conf: inplace-conf-common composer-dependencies
192193
inplace-conf-common: dist
193194
./configure $(subst 1,-q,$(QUIET)) --prefix=$(CURDIR) \
@@ -205,13 +206,6 @@ inplace-conf-common: dist
205206
--with-baseurl='http://localhost/domjudge/' \
206207
$(CONFIGURE_FLAGS)
207208

208-
# Run Symfony in dev mode (for maintainer-mode):
209-
webapp/.env.local:
210-
@echo "Creating file '$@'..."
211-
@echo "# This file was automatically created by 'make maintainer-conf' to run" > $@
212-
@echo "# the DOMjudge Symfony application in developer mode. Adjust as needed." >> $@
213-
@echo "APP_ENV=dev" >> $@
214-
215209
# Install the system in place: don't really copy stuff, but create
216210
# symlinks where necessary to let it work from the source tree.
217211
# This stuff is a hack!

webapp/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ include $(TOPDIR)/Makefile.global
99
# Subdirectories to recurse into for REC_TARGETS
1010
SUBDIRS = config
1111

12+
maintainer-conf: .env.local
13+
14+
# Run Symfony in dev mode (for maintainer-mode):
15+
.env.local:
16+
@echo "Creating file '$@'..."
17+
@echo "# This file was automatically created by 'make maintainer-conf' to run" > $@
18+
@echo "# the DOMjudge Symfony application in developer mode. Adjust as needed." >> $@
19+
@echo "APP_ENV=dev" >> $@
20+
1221
copy-bundle-assets:
1322
# We can not use bin/console here, as when using a fakeroot,
1423
# the include paths are broken. We just copy in the data we need

0 commit comments

Comments
 (0)