Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatise un marquage de la version de l’exécutable par git-describe #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ default: FORCE build

all: FORCE quick_test tests test_dgfip_c_backend

clean: FORCE
clean: FORCE remise_a_zero_versionnage
$(call make_in,$(DGFIP_DIR),clean_backend_all)
rm -f doc/doc.html
dune clean
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(name mlang)

(version 1.1.0)
(version %%VERSION%%)

(generate_opam_files true)

Expand Down
2 changes: 1 addition & 1 deletion makefiles/functions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $(if $(call not,$(call is_in,$(1))), \
endef

define make_in_raw
$(MAKE) --no-print-directory -f $(ROOT_DIR)/Makefile -C $(ROOT_DIR)/$(1) ROOT_DIR=$(ROOT_DIR) $(2)
@$(MAKE) --no-print-directory -f $(ROOT_DIR)/Makefile -C $(ROOT_DIR)/$(1) ROOT_DIR=$(ROOT_DIR) $(2)
endef

define check_in
Expand Down
7 changes: 7 additions & 0 deletions makefiles/mlang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ else
git submodule update ir-calcul
endif

remise_a_zero_versionnage: FORCE
sed -i 's/(version .*)/(version %%VERSION%%)/' dune-project
git checkout -- *.opam

##################################################
# Building the compiler
##################################################
Expand All @@ -49,7 +53,10 @@ dune: FORCE
ifeq ($(call is_in,),)
$(call make_in,,$@)
else
echo $(shell pwd)
sed -i 's/(version %%VERSION%%)/(version ${shell git describe --always --dirty --tag})/' dune-project
LINKING_MODE=$(LINKING_MODE) dune build $(DUNE_OPTIONS)
$(call make_in_raw,,remise_a_zero_versionnage)
endif

build: FORCE | format dune
Expand Down
Loading