Fix build from an extracted grafx2-2.5.*-src.tgz
we check if we are in a GIT working tree and load revision from version.c if we are not. also includes grafx2-2.5*-src.tgz in artifacts
This commit is contained in:
parent
0890c4490d
commit
d85e5ee893
@ -11,6 +11,7 @@ job_linux:
|
||||
artifacts:
|
||||
paths:
|
||||
- "*.zip"
|
||||
- "*.tgz"
|
||||
|
||||
job_win32:
|
||||
stage: build
|
||||
|
||||
11
src/Makefile
11
src/Makefile
@ -34,6 +34,7 @@
|
||||
STRIP = strip
|
||||
|
||||
# Detect GIT revision
|
||||
ifeq (true,$(shell git rev-parse --is-inside-work-tree))
|
||||
GIT_REVISION = $(shell git rev-list --count 1af8c74f53110e349d8f0d19b14599281913f71f..)
|
||||
ifneq (,$(CI_COMMIT_REF_NAME))
|
||||
GIT_BRANCH = $(CI_COMMIT_REF_NAME)
|
||||
@ -43,6 +44,10 @@
|
||||
ifneq (master,$(GIT_BRANCH))
|
||||
GIT_REVISION := "$(GIT_REVISION)-$(GIT_BRANCH)"
|
||||
endif
|
||||
else
|
||||
# outside git repository : get version stored in version.c
|
||||
GIT_REVISION := $(shell cat version.c | cut -f 2 -d '"')
|
||||
endif
|
||||
|
||||
REVISION_CACHE = .revision.cache
|
||||
RES := $(shell if [ ! -f $(REVISION_CACHE) ] || [ "`cat $(REVISION_CACHE)`" != "$(GIT_REVISION)" ] ; then echo "$(GIT_REVISION)" > $(REVISION_CACHE) ; fi )
|
||||
@ -737,15 +742,15 @@ RES := $(shell if [ ! -f $(CFLAGS_CACHE) ] || [ "`cat $(CFLAGS_CACHE)`" != "$(CO
|
||||
|
||||
ifndef NORECOIL
|
||||
recoil.c: ../3rdparty/recoil-$(RECOILVER)/recoil.c
|
||||
$(CP) $< $@
|
||||
$(CP) $(subst .c,.h,$< $@)
|
||||
if [ -f $< ] ; then $(CP) $< $@ ; fi
|
||||
if [ -f $(subst .c,.h,$<) ] ; then $(CP) $(subst .c,.h,$< $@) ; fi
|
||||
|
||||
recoil.h: recoil.c
|
||||
|
||||
$(OBJDIR)/loadrecoil.o: recoil.c recoil.h
|
||||
|
||||
../3rdparty/recoil-$(RECOILVER)/recoil.c:
|
||||
$(MAKE) -C ../3rdparty recoil
|
||||
if [ -d ../3rdparty ] ; then $(MAKE) -C ../3rdparty recoil ; fi
|
||||
endif
|
||||
|
||||
$(OBJ): $(CFLAGS_CACHE)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user