-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathMakefile.project
115 lines (77 loc) · 4.02 KB
/
Makefile.project
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Copyright (c) 2018, Michal Policht. This file is dually licensed under terms
# of either WTFPL or BEER-WARE LICENSE. You may obtain the copy of WTFPL or
# BEER-WARE LICENSE by googling, binging, yahooing or downloading it from pirate
# bay. NO WARRANTY.
# This Makefile defines various project-specific variables.
HELP_MESSAGE = Use Qbs if you wish to build the project itself.
# C compiler (GCC-compatible is required in many cases).
CC = gcc
INCLUDE_GUARD_PREFIX = 'H_'
# Project directory (without trailing slash).
PROJECT_DIR := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
# Root directory of external artifacts.
EXTERNAL_ROOT = $(PROJECT_DIR)/external
# Directory for temporaries.
TEMP_DIR = $(EXTERNAL_ROOT)/_temp/$(TARGET_MACHINE)
# A place where external source code archives are stored.
ARCHIVE_DIR = $(TEMP_DIR)/archive
# Sources directory.
SOURCE_DIR = $(TEMP_DIR)/source
# Port directory.
PORT_DIR = $(TEMP_DIR)/port
# Build directory.
BUILD_DIR = $(TEMP_DIR)/build
# Installation directory.
INSTALL_DIR = $(TEMP_DIR)/install
# Root directory for deployments.
DEPLOY_DIR = $(EXTERNAL_ROOT)/deploy
# Recipes directory.
RECIPES_DIR = $(EXTERNAL_ROOT)/recipes/$(TARGET_MACHINE)
LICENSE_DSLASH_DIRS = extensions qbs tools
INCLUDE_GUARDS_DIRS = extensions tools
DOXYGEN_INPUT_DIRS = Doxyfile extensions tools doc/Doxyfile external/Doxyfile external/recipes
DOXYGEN_OUTPUT_DIR = doc/Doxygen/docs
DOC_PROJECT_TARGETS = $(DOC_EXTENSIONS_LIST_FILE) $(DOC_TOOLS_LIST_FILE) \
doc_subdirs doc_project_doxyqml
# Directory for autogenerated files.
MAKEFILE_PROJECT_AUTOGEN_DIR = $(PROJECT_DIR)/doc/_temp/Makefile.project
# File containing list of tools.
DOC_TOOLS_LIST_FILE = $(MAKEFILE_PROJECT_AUTOGEN_DIR)/ToolsList.inc.dox
# File containing list of extensions.
DOC_EXTENSIONS_LIST_FILE = $(MAKEFILE_PROJECT_AUTOGEN_DIR)/ExtensionsList.inc.dox
# Product entry print script.
DOCPRODENTRY = awkgward/docprodentry.sh
INCLUDE_GUARDS_EXCLUDE = ! -path 'extensions/templates_*'
# URL of l10n-kf5 repository.
L10N-KF5_URL = svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5/scripts
include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))Makefile.toolchain
# Add directory with doxyqml to the PATH, so that it can be seen by Doxygen.
PATH := $(PATH):$(abspath $(DOXYQML_DIR))
.PHONY: doc_project_doxyqml doc_subdirs
$(DOC_TOOLS_LIST_FILE): tools $(MAKEFILE_PROJECT_AUTOGEN_DIR) $(DOCPRODENTRY) | $(SH) $(FIND) $(XARGS) $(SORT) $(BASENAME) $(DIRNAME) $(ECHO)
@$(ECHO) Generating "$@" file...
@$(ECHO) '<!-- This file has been autogenerated by Makefile.project. -->' > $@
@$(FIND) tools -mindepth 2 \( -name 'Doxyfile' -o -name '*.Doxyfile' \) \
| $(SORT) | $(XARGS) -I {} $(SH) $(DOCPRODENTRY) {} >> $@
@$(ECHO) '.' >> $@
$(DOC_EXTENSIONS_LIST_FILE): extensions $(MAKEFILE_PROJECT_AUTOGEN_DIR) $(DOCPRODENTRY) | $(SH) $(FIND) $(XARGS) $(SORT) $(SED) $(DIRNAME) $(ECHO)
@$(ECHO) Generating "$@" file...
@$(ECHO) '<!-- This file has been autogenerated by Makefile.project. -->' > $@
@$(FIND) extensions -mindepth 2 \( -name 'Doxyfile' -o -name '*.Doxyfile' \) \
| $(SORT) | $(XARGS) -I {} $(SH) $(DOCPRODENTRY) {} >> $@
@$(ECHO) '.' >> $@
# Doxygen is not able to create output subdirectories (e.g. extensions/CuteHMI/Test.0)
# recursively (like mkidr -p does) and quits with error, so they have to be created.
doc_subdirs: | $(SH) $(FIND) $(XARGS) $(BASENAME) $(DIRNAME) $(ECHO) $(MKDIR)
@$(ECHO) Creating documentation output subdirectories...
@$(FIND) extensions -mindepth 2 \( -name 'Doxyfile' -o -name '*.Doxyfile' \) \
| $(XARGS) -I {} $(DIRNAME) {} | $(XARGS) -I {} $(MKDIR) -p $(DOXYGEN_OUTPUT_DIR)/{}
@$(FIND) tools -mindepth 2 \( -name 'Doxyfile' -o -name '*.Doxyfile' \) \
| $(XARGS) -I {} $(DIRNAME) {} | $(XARGS) -I {} $(MKDIR) -p $(DOXYGEN_OUTPUT_DIR)/{}
doc_project_doxyqml: $(DOXYQML_PY)
@$(ECHO) Doxyqml path: "$(DOXYQML)"
@$(ECHO) Python path: "$(PYTHON)"
@$(ECHO) Doxyqml version: $(shell $(DOXYQML) --version)
$(MAKEFILE_PROJECT_AUTOGEN_DIR): | $(MKDIR)
@$(ECHO) Creating "$@" directory...
@$(MKDIR) -p "$@"