From 76111c51549fb63f4cd8e2cf380e8717f273d890 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 1 Nov 2017 10:06:08 +0100 Subject: [PATCH] move ancillary Makefiles to "make" subdirectory --- Makefile | 6 ++- Makefile.complete => make/Makefile.complete | 0 make/Makefile.help | 56 +++++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) rename Makefile.complete => make/Makefile.complete (100%) create mode 100644 make/Makefile.help diff --git a/Makefile b/Makefile index e63a83e7e..8881b77ea 100644 --- a/Makefile +++ b/Makefile @@ -126,6 +126,8 @@ else RELEASE = 1.$(subst -,_,$(GIT_BRANCH))_$(subst -,_,$(VARIANT)).$(shell date +%Y%m%d)git$(GIT_REV) endif +BUILDID = "$(VERSION)-$(GIT_REV)-$(VARIANT)" + # pkg-config dependencies PKGS = openssl jansson @@ -157,7 +159,7 @@ everything: escape = $(shell echo $1 | tr a-z- A-Z_ | tr -dc ' A-Z0-9_') -CFLAGS += -DBUILDID=\"$(VERSION)-$(GIT_REV)-$(VARIANT)\" +CFLAGS += -DBUILDID=\"$(BUILDID)\" CFLAGS += $(addprefix -DWITH_, $(call escape,$(PKGS))) install: $(addprefix install-,$(filter-out thirdparty doc clients,$(MODULES))) @@ -165,6 +167,6 @@ clean: $(addprefix clean-, $(filter-out thirdparty doc clients,$(MODULES))) .PHONY: all everything clean install -include $(wildcard $(SRCDIR)/Makefile.*) +include $(wildcard $(SRCDIR)/make/Makefile.*) include $(wildcard $(BUILDDIR)/**/*.d) include $(patsubst %,$(SRCDIR)/%/Makefile.inc,$(MODULES)) diff --git a/Makefile.complete b/make/Makefile.complete similarity index 100% rename from Makefile.complete rename to make/Makefile.complete diff --git a/make/Makefile.help b/make/Makefile.help new file mode 100644 index 000000000..292034d2a --- /dev/null +++ b/make/Makefile.help @@ -0,0 +1,56 @@ +# Makefile for clang autocompletion +# +# This Makefile produces .clang_complete files containing compiler flags +# which are used by clang autocompletion tools such as: +# +# - https://atom.io/packages/autocomplete-clang +# - https://github.com/Rip-Rip/clang_complete +# +# @author Steffen Vogel +# @copyright 2017, Institute for Automation of Complex Power Systems, EONERC +# @license GNU General Public License (version 3) +# +# VILLASnode +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +################################################################################### + +E = @echo + +help: + $E "The following make targets are available:" + $E " - make all" + $E " Build libvillas, villas CLI tools, tests" + $E + $E " - make everything" + $E " Build all in all available build variants" + + $E " - make docker" + $E " - make run-docker" + $E " - make deploy-docker" + + $E " - make docker-{app,dev,dev-centos,dev-fedora}" + $E " Build Docker images" + $E + $E " - make run-docker-{app,dev,dev-centos,dev-fedora}" + $E " Run Docker containers" + $E + $E " - make deploy-{app,dev,dev-centos,dev-fedora}" + $E " Deploy Docker images to official registry" + $E + $E "The following environment variables can change the build:" + $E " DEBUG=1" + $E " COVERAGE=1" + +.PHONY: help