Skip to content

Commit

Permalink
Add tar-file command to Makefile (COVESA#469)
Browse files Browse the repository at this point in the history
Also remove obsolete deploy command and update gitignore
  • Loading branch information
erikbosch authored and jdacoello committed Feb 15, 2023
1 parent db6f32b commit a84b536
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,4 @@
*.id

# Generated files
vss_rel_*.cnative
vss_rel_*.csv
vss_rel_*.fidl
vss_rel_*.binary
vss_rel_*.h
vss_rel_*.json
vss_rel_*_macro.h
vss_rel_*
20 changes: 8 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# Makefile to generate specifications
#

.PHONY: clean all travis_targets json franca yaml csv ddsidl tests binary protobuf ttl graphql ocf c install deploy
.PHONY: clean all travis_targets json franca yaml csv ddsidl tests binary protobuf ttl graphql ocf c install

all: clean json franca yaml csv ddsidl binary tests protobuf graphql

# All mandatory targets that shall be built and pass on each pull request for
# vehicle-signal-specification or vss-tools
travis_targets: clean json franca yaml binary csv graphql ddsidl tests deploy
travis_targets: clean json franca yaml binary csv graphql ddsidl tests tar


# Additional targets that shall be built by travis, but where it is not mandatory
Expand All @@ -21,8 +21,6 @@ travis_optional: clean c ocf protobuf ttl

DESTDIR?=/usr/local
TOOLSDIR?=./vss-tools
DEPLOYDIR?=./docs-gen/static/releases/nightly


json:
${TOOLSDIR}/vspec2json.py -I ./spec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).json
Expand Down Expand Up @@ -62,6 +60,12 @@ c:
(cd ${TOOLSDIR}/contrib/vspec2c/; make )
PYTHONPATH=${TOOLSDIR} ${TOOLSDIR}/contrib/vspec2c.py -I ./spec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).h vss_rel_$$(cat VERSION)_macro.h

# Include all offically supported outputs (i.e. those created by travis_targets)
# Exception is binary as it might be target specific and library anyway needs to be rebuilt
tar:
tar -czvf vss_rel_$$(cat VERSION).tar.gz vss_rel_$$(cat VERSION).json vss_rel_$$(cat VERSION).fidl vss_rel_$$(cat VERSION).yaml \
vss_rel_$$(cat VERSION).csv vss_rel_$$(cat VERSION).graphql.ts vss_rel_$$(cat VERSION).idl

clean:
rm -f vss_rel_*
(cd ${TOOLSDIR}/contrib/vspec2c/; make clean)
Expand All @@ -73,11 +77,3 @@ install:
$(MAKE) DESTDIR=${DESTDIR} -C ${TOOLSDIR}/vspec2c install
install -d ${DESTDIR}/share/vss
(cd spec; cp -r * ${DESTDIR}/share/vss)

deploy:
if [ -d $(DEPLOYDIR) ]; then \
rm -f ${DEPLOYDIR}/vss_rel_*;\
else \
mkdir -p ${DEPLOYDIR}; \
fi;
cp vss_rel_* ${DEPLOYDIR}/

0 comments on commit a84b536

Please sign in to comment.