Skip to content

Commit

Permalink
Some *_FOR_REBAR variables better named as *_FOR_OTP, some targets be…
Browse files Browse the repository at this point in the history
…tter named regarding rebar/OTP.
  • Loading branch information
Olivier-Boudeville committed Jan 7, 2024
1 parent f9d4f3d commit 77dba3d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
9 changes: 5 additions & 4 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ stats:
#all: compile


compile: rebar3-create-app-file
compile: create-app-file
@echo " Compiling us_web from $$(pwd)"
@$(MYRIAD_REBAR_EXEC) compile

Expand Down Expand Up @@ -161,7 +161,7 @@ release: release-prod
#
# ('compile' is not needed either: same happens because of 'release')
#
release-dev: clean-otp-build-tree rebar3-create-app-file rebar.config #compile #update-release
release-dev: clean-otp-build-tree create-app-file rebar.config #compile #update-release
@echo " Generating OTP us_web release in development mode, using $(shell rebar3 -v)"
@$(MYRIAD_REBAR_EXEC) release
@cd $(US_WEB_DEFAULT_REL_DIR)/releases && /bin/ln -sf $(US_WEB_VERSION) latest-release
Expand All @@ -170,7 +170,7 @@ release-dev: clean-otp-build-tree rebar3-create-app-file rebar.config #compile #
# Rebuilding all dependencies ('compile' implied):
# (yes, 'tar', not 'release')
#
release-prod: real-clean rebar3-create-app-file set-rebar-conf
release-prod: real-clean create-app-file set-rebar-conf
@echo " Generating OTP us_web release $(US_WEB_VERSION) from scratch in production mode, using $(shell rebar3 -v)"
@$(MYRIAD_REBAR_EXEC) as prod tar

Expand All @@ -185,7 +185,8 @@ rebar.config: conf/rebar.config.template
# (not updating rebar config for example to take into account changes in release
# version, as the new release archive contains paths with the former version...)
#
# Note: 'rebar3 compile' / 'compile' dependency target not needed here (as implied).
# Note: 'rebar3 compile' / 'compile' dependency target not needed here (as
# implied).
#
release-prod-light:
@echo " Generating OTP us_web release $(US_WEB_VERSION) in production mode"
Expand Down
4 changes: 2 additions & 2 deletions conf/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ US_WEB_TOP = ..
# substitutions are layer-specific)
#
%: %.template $(US_WEB_TOP)/GNUmakevars.inc
@echo " Generating $@ from $< (VERSION_FOR_REBAR being $(VERSION_FOR_REBAR), US_COMMON_VERSION_FOR_REBAR being $(US_COMMON_VERSION), TRACES_VERSION_FOR_REBAR being $(TRACES_VERSION), WOOPER_VERSION_FOR_REBAR being $(WOOPER_VERSION), MYRIAD_VERSION_FOR_REBAR being $(MYRIAD_VERSION)); this file should be copied to the root of this layer in order to be taken into account."
@cat $< | sed "s|\"MYRIAD_VERSION_FOR_REBAR\"|\"$(MYRIAD_VERSION)\"|g" | sed "s|\"WOOPER_VERSION_FOR_REBAR\"|\"$(WOOPER_VERSION)\"|g" | sed "s|\"TRACES_VERSION_FOR_REBAR\"|\"$(TRACES_VERSION)\"|g" | sed "s|\"US_COMMON_VERSION_FOR_REBAR\"|\"$(US_COMMON_VERSION)\"|g" | sed "s|\"VERSION_FOR_REBAR\"|\"$(VERSION_FOR_REBAR)\"|g" | sed "s|FIRST_FILES_FOR_REBAR|$(MYRIAD_REBAR_FIRST_FILES)|g" | sed "s|DEBUG_KEY_FOR_REBAR|$(DEBUG_INFO_KEY)|g"| sed "s|INCS_FOR_REBAR|$(MYRIAD_REBAR_INCS)|g" > $@
@echo " Generating $@ from $< (VERSION_FOR_OTP being $(VERSION_FOR_OTP), US_COMMON_VERSION_FOR_OTP being $(US_COMMON_VERSION), TRACES_VERSION_FOR_OTP being $(TRACES_VERSION), WOOPER_VERSION_FOR_OTP being $(WOOPER_VERSION), MYRIAD_VERSION_FOR_OTP being $(MYRIAD_VERSION)); this file should be copied to the root of this layer in order to be taken into account."
@cat $< | sed "s|\"MYRIAD_VERSION_FOR_OTP\"|\"$(MYRIAD_VERSION)\"|g" | sed "s|\"WOOPER_VERSION_FOR_OTP\"|\"$(WOOPER_VERSION)\"|g" | sed "s|\"TRACES_VERSION_FOR_OTP\"|\"$(TRACES_VERSION)\"|g" | sed "s|\"US_COMMON_VERSION_FOR_OTP\"|\"$(US_COMMON_VERSION)\"|g" | sed "s|\"VERSION_FOR_OTP\"|\"$(VERSION_FOR_OTP)\"|g" | sed "s|FIRST_FILES_FOR_REBAR|$(MYRIAD_REBAR_FIRST_FILES)|g" | sed "s|DEBUG_KEY_FOR_REBAR|$(DEBUG_INFO_KEY)|g" | sed "s|INCS_FOR_REBAR|$(MYRIAD_REBAR_INCS)|g" > $@


clean: clean-local
Expand Down
2 changes: 1 addition & 1 deletion conf/rebar.config.template
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
{relx, [

% Not 'us_web_release', otherwise plenty of paths will be cluttered:
{release, {us_web, "VERSION_FOR_REBAR"},
{release, {us_web, "VERSION_FOR_OTP"},

% Listing an application here seems necessary (otherwise its .app file will
% not be found), however it will also result in its automatic starting with
Expand Down
8 changes: 4 additions & 4 deletions conf/us_web.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
% ./ebin/us_web.app
% ./src/us_web.app.src -> ../ebin/us_web.app
%
% For more information see the Ceylan-Myriad 'rebar3-create-app-file' make
% target and its associated comments.
% For more information see the Ceylan-Myriad 'create-app-file' make target and
% its associated comments.

% See also:
% - http://erlang.org/doc/man/app.html
Expand All @@ -20,7 +20,7 @@

{application, us_web,
[{description, "US-Web, the OTP active application offering web services in the context of the Universal Server framework (see http://us-web.esperide.org)"},
{vsn, "VERSION_FOR_REBAR"},
{vsn, "VERSION_FOR_OTP"},
{registered, [us_web]},

% Active application:
Expand Down Expand Up @@ -55,7 +55,7 @@
{env,[]},

% Flat hierarchy in ebin here:
{modules, [MODULES_FOR_REBAR]},
{modules, [MODULES_FOR_OTP]},

{licenses, ["US-Web is licensed by its author (Olivier Boudeville) under the GNU Affero General Public License (AGPL), version 3.0 or later"]},

Expand Down
6 changes: 3 additions & 3 deletions ebin/us_web.app
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
% ./ebin/us_web.app
% ./src/us_web.app.src -> ../ebin/us_web.app
%
% For more information see the Ceylan-Myriad 'rebar3-create-app-file' make
% target and its associated comments.
% For more information see the Ceylan-Myriad 'create-app-file' make target and
% its associated comments.

% See also:
% - http://erlang.org/doc/man/app.html
Expand All @@ -20,7 +20,7 @@

{application, us_web,
[{description, "US-Web, the OTP active application offering web services in the context of the Universal Server framework (see http://us-web.esperide.org)"},
{vsn, "1.1.2"},
{vsn, "1.1.3"},
{registered, [us_web]},

% Active application:
Expand Down

0 comments on commit 77dba3d

Please sign in to comment.