Commit 14cd368d authored by Federico Vaga's avatar Federico Vaga

ci: remove git usage when distributing sources

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent f7bc0210
PREFIX ?= /
GIT_VERSION = $(shell cd $(TRTL); git describe --always --dirty --long --tags)
VERSION:= $(shell git describe --tags --abbrev=0 | tr -d 'v')
GIT_VERSION := $(shell git describe --always --dirty --long --tags)
VERSION := $(shell git describe --tags --abbrev=0 | tr -d 'v')
TRTL_SW := $(TRTL)/software
......@@ -3,9 +3,10 @@
# SPDX-FileCopyrightText: 2019 CERN
TOP_DIR ?= $(shell pwd)/../
TRTL ?= $(TOP_DIR)
include $(TRTL)/common.mk
NAME := mockturtle
VERSION := $(shell git describe --abbrev=0 | tr -d 'v')
DIR_NAME := $(NAME)-$(VERSION)
KEEP_TEMP ?= n
......@@ -110,6 +111,14 @@ sources-tar:
sources-tar-replace-autogen: sources-tar wbgen2-headers
@tar -rf $(SOURCES)/$(DIR_NAME).tar --transform "s,^,"$(DIR_NAME)"/," $(TRTL_SW)/include/mockturtle/hw/mockturtle_cpu_lr.h $(TRTL_SW)/include/mockturtle/hw/mockturtle_cpu_csr.h
@tar --delete -f $(SOURCES)/$(DIR_NAME).tar $(DIR_NAME)/software/include/mockturtle/hw/Makefile
@cp $(TRTL)/common.mk $(SOURCES)/common.mk
@sed -e "s,^GIT_VERSION.*$$,GIT_VERSION := "$(GIT_VERSION)"," \
-e "s,^VERSION.*$$,VERSION := "$(VERSION)"," \
-i $(SOURCES)/common.mk
@cd $(SOURCES) && tar --update -f $(SOURCES)/$(DIR_NAME).tar \
--transform "s,^,"$(DIR_NAME)"/," \
common.mk
@rm $(SOURCES)/common.mk
sources-tar-gz: sources-tar sources-tar-replace-autogen
@gzip $(SOURCES)/$(DIR_NAME).tar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment