|
|
|
@ -15,13 +15,18 @@ PKGNAME = $(MAKEFILE_DIR)
|
|
|
|
|
|
|
|
|
|
|
|
default_target: all
|
|
|
|
default_target: all
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: all init depend debug prepare check build uninstall install clean up_ver help
|
|
|
|
.PHONY: all init depend debug prepare check build uninstall install clean help
|
|
|
|
|
|
|
|
|
|
|
|
all: init build
|
|
|
|
all: init build
|
|
|
|
|
|
|
|
|
|
|
|
init:
|
|
|
|
init:
|
|
|
|
@echo "Initialize ..."; \
|
|
|
|
@echo "Initialize ..."; \
|
|
|
|
sed -r "s/^(string version_application = ).*/\1\"$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2)\";/" -i source/${PKGNAME}.cc; \
|
|
|
|
if [ -d ".git" ]; then \
|
|
|
|
|
|
|
|
LATEST_TAG=$$(git describe --tags | sed 's/^v//'); \
|
|
|
|
|
|
|
|
else \
|
|
|
|
|
|
|
|
LATEST_TAG="0.0"; \
|
|
|
|
|
|
|
|
fi; \
|
|
|
|
|
|
|
|
sed -r "s/^(string version_application = ).*/\1\"$${LATEST_TAG}\";/" -i source/${PKGNAME}.cc; \
|
|
|
|
echo "-- Build path: ${CMAKE_BUILD_DIR}"
|
|
|
|
echo "-- Build path: ${CMAKE_BUILD_DIR}"
|
|
|
|
|
|
|
|
|
|
|
|
depend:
|
|
|
|
depend:
|
|
|
|
@ -136,14 +141,6 @@ clean:
|
|
|
|
echo "Clean: OK"; \
|
|
|
|
echo "Clean: OK"; \
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
up_ver:
|
|
|
|
|
|
|
|
@CURRENT=$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2); \
|
|
|
|
|
|
|
|
MAJOR=$$(cut -d. -f1 <<< $${CURRENT}); \
|
|
|
|
|
|
|
|
MINOR=$$(cut -d. -f2 <<< $${CURRENT}); \
|
|
|
|
|
|
|
|
VER="$${MAJOR}.$$(($${MINOR}+1))"; \
|
|
|
|
|
|
|
|
sed "s/VERSION *[[:digit:]]*.*/VERSION $${VER}/" -i ${FILE_VERSION}; \
|
|
|
|
|
|
|
|
echo "Updated version to VERSION.md: $${CURRENT} to $${VER}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
help:
|
|
|
|
help:
|
|
|
|
@echo "The following are some of the valid targets for this Makefile:"; \
|
|
|
|
@echo "The following are some of the valid targets for this Makefile:"; \
|
|
|
|
echo "... all (the default if no target is provided)"; \
|
|
|
|
echo "... all (the default if no target is provided)"; \
|
|
|
|
@ -153,5 +150,4 @@ help:
|
|
|
|
echo "... compile"; \
|
|
|
|
echo "... compile"; \
|
|
|
|
echo "... install"; \
|
|
|
|
echo "... install"; \
|
|
|
|
echo "... uninstall"; \
|
|
|
|
echo "... uninstall"; \
|
|
|
|
echo "... clean"; \
|
|
|
|
echo "... clean"
|
|
|
|
echo "... up_ver"
|
|
|
|
|
|
|
|
|