TP Histogramme.
[GPU.git] / WCudaMSE / BUILDER / makefile / private / doc / doxyCPP.mk
1 # Version : 0.0.7
2 # Date : 17.01.2014
3 # Author : Cedric.Bilat@he-arc.ch
4 #
5
6 ifndef __DOXYGEN_MK__
7 __DOXYGEN_MK__=true
8
9 ##############################################
10 # Variables #
11 ##############################################
12
13 TARGET_DOC_PATH:=${TARGET_PATH}/doc
14
15 TARGET_DOC_TEMP:=${TARGET_DOC_PATH}/temp
16 TARGET_DOC_FINAL:=${TARGET_DOC_PATH}/final
17 TARGET_DOC_DEPLOY:=${TARGET_DEPLOY_PATH_DOC}
18 TARGET_DOC_NAME=$(TARGET_NAME).doc.tar.gz
19 TARGET_DOC_DEPLOY_FILE:=$(TARGET_DOC_DEPLOY)/$(TARGET_DOC_NAME)
20
21 -include ${ROOT_MAKEFILE}/public/doc/doxygen.mk
22
23 ##############################################
24 # Set #
25 ##############################################
26
27 DOX_SRC_FINAL:= $(filter-out $(DOX_SRC_EXCLUDE),$(DOX_SRC))
28 #https://www.gnu.org/software/make/manual/make.html#Functions
29
30 ##############################################
31 # TARGET #
32 ##############################################
33
34
35 ######################
36 # Doxygen #
37 ######################
38
39 .PHONY: doc
40 doc: docTitleStart docTools docPurge docPrepare docConfig docBuild docDeploy docTitleEnd
41
42 .PHONY: docTitleStart
43 docTitleStart:
44 @echo "=================================================================================="
45 @echo "[CBI] -> Target : "$(TARGET_NAME)
46 @echo "[CBI] -> Task : Doc"
47 @echo "[CBI] -> Doc src : "${DOX_SRC_FINAL}
48 @echo "[CBI] -> Directory doc html : "${TARGET_DOC_FINAL}
49 ifdef IS_DEPLOY
50 @echo "[CBI] -> Directory doc tar : "$(TARGET_DOC_DEPLOY)
51 endif
52 @echo "=================================================================================="
53 @echo ""
54
55 .PHONY: docTitleEnd
56 docTitleEnd:
57 @echo ""
58 @echo "=================================================================================="
59 @echo "[CBI] -> Target : "$(TARGET_NAME)
60 @echo "[CBI] -> Task : Doc"
61 @echo "[CBI] -> Doc src : "${DOX_SRC_FINAL}
62 @echo "[CBI] -> Directory doc html : "${TARGET_DOC_FINAL}
63 ifdef IS_DEPLOY
64 @echo "[CBI] -> Directory doc tar : "$(TARGET_DOC_DEPLOY)
65 endif
66 @echo "=================================================================================="
67
68 .PHONY: docTools
69 docTools:
70 @echo "[Tools]"
71 @echo ""
72 @echo "doxygen version : "
73 @doxygen --version
74 @dot -V
75 @echo ""
76
77 .PHONY: docPurge
78 docPurge:
79 @echo "[Purge]"
80 @echo ""
81 @echo "delete " $(TARGET_DOC_PATH)
82 @echo "delete " $(TARGET_DOC_DEPLOY_FILE)
83 @rm -f -r $(TARGET_DOC_PATH)
84 @rm -f $(TARGET_DOC_DEPLOY_FILE)
85 @echo ""
86
87 .PHONY: docPrepare
88 docPrepare:
89 @echo "[Prepare]"
90 @echo ""
91 @echo "mkdir " $(TARGET_DOC_FINAL)
92 @echo "mkdir " $(TARGET_DOC_TEMP)
93 @mkdir -p $(TARGET_DOC_FINAL)
94 @mkdir -p ${TARGET_DOC_TEMP}
95 ifdef IS_DEPLOY
96 @echo "mkdir " $(TARGET_DOC_DEPLOY)
97 @mkdir -p $(TARGET_DOC_DEPLOY)
98 endif
99 @echo ""
100
101 .PHONY: docConfig
102 docConfig:
103 @echo "[Configuration]"
104 @doxygen -g $(TARGET_DOC_TEMP)/doxyFileDefaultTMP
105 @echo "Parse and fill defaut doxy-config with project-specific-config ..."
106 @echo ""
107 #DO NOT MODIFY THE SPACE at left of the first =
108 #Choice for separateur sed is ;
109 @sed -e 's;My Project;$(TARGET_NAME);' \
110 -e 's;INPUT =;INPUT = $(DOX_SRC_FINAL);' \
111 -e 's;CREATE_SUBDIRS = NO;CREATE_SUBDIRS = $(DOX_CREATE_SUBDIRS);' \
112 -e 's;OUTPUT_DIRECTORY =;OUTPUT_DIRECTORY = \"$(TARGET_DOC_FINAL)\";' \
113 -e 's;RECURSIVE = NO;RECURSIVE = $(DOX_RECURSIVE);' \
114 -e 's;OUTPUT_LANGUAGE = English;OUTPUT_LANGUAGE = $(DOX_OUTPUT_LANGUAGE);' \
115 -e 's;GENERATE_LATEX = YES;GENERATE_LATEX = $(DOX_GENERATE_LATEX);' \
116 -e 's;CLASS_DIAGRAMS = YES;CLASS_DIAGRAMS = $(DOX_CLASS_DIAGRAMS);' \
117 -e 's;EXTRACT_ALL = NO;EXTRACT_ALL = $(DOX_EXTRACT_ALL);' \
118 -e 's;UML_LOOK = NO;UML_LOOK = $(DOX_UML_LOOK);' \
119 -e 's;CALL_GRAPH = NO;CALL_GRAPH = $(DOX_CALL_GRAPH);' \
120 -e 's;CALLER_GRAPH = NO;CALLER_GRAPH = $(DOX_CALLER_GRAPH);' \
121 -e 's;EXTRACT_PRIVATE = NO;EXTRACT_PRIVATE = $(DOX_EXTRACT_PRIVATE);' \
122 -e 's;HAVE_DOT = NO;HAVE_DOT = $(DOX_HAVE_DOT);' $(TARGET_DOC_TEMP)/doxyFileDefaultTMP >$(TARGET_DOC_TEMP)/doxyFileProjectTMP
123 #-e 's;INPUT =;INPUT = $(SRC_PATH_ALL) $(SRC_AUX);' \
124
125 .PHONY: docBuild
126 docBuild:
127 @echo "[Build]"
128 @echo ""
129 @doxygen $(TARGET_DOC_TEMP)/doxyFileProjectTMP
130 @echo ""
131
132 .PHONY: docDeploy
133 docDeploy:
134 ifdef TARGET_DEPLOY_PATH
135 @echo "[Deploy]"
136 @echo ""
137 @echo "creating "$(TARGET_NAME).doc.tar
138 ifeq ($(OS),Linux)
139 @tar -cf ${TARGET_DOC_TEMP}/$(TARGET_NAME).doc.tar -C ${TARGET_DOC_FINAL} .
140 @echo "creating "$(TARGET_NAME).doc.tar.gz
141 @gzip -q ${TARGET_DOC_TEMP}/$(TARGET_NAME).doc.tar ${TARGET_DOC_TEMP}/$(TARGET_NAME).doc.tar.gz
142 @echo "moving "$(TARGET_NAME).doc.tar.gz" -> "$(TARGET_DOC_DEPLOY)
143 @mv -f $(TARGET_DOC_TEMP)/$(TARGET_NAME).doc.tar.gz $(TARGET_DOC_DEPLOY)
144 else
145 #@tar -cf '${TARGET_DOC_TEMP}/$(TARGET_NAME).doc.tar' -C ${TARGET_DOC_FINAL} .
146 #q: pose problem!
147 @tar -cf ${TARGET_DOC_DEPLOY}/$(TARGET_NAME).doc.tar -C ${TARGET_DOC_FINAL} .
148 @echo "creating "$(TARGET_NAME).doc.tar.gz
149 @gzip -q ${TARGET_DOC_DEPLOY}/$(TARGET_NAME).doc.tar ${TARGET_DOC_DEPLOY}/$(TARGET_NAME).doc.tar.gz
150 #@echo "moving "$(TARGET_NAME).doc.tar.gz" -> "$(TARGET_DOC_DEPLOY)
151 #@mv -f $(TARGET_NAME).doc.tar.gz $(TARGET_DOC_DEPLOY)
152 endif
153 endif
154
155 .PHONY: docShow
156 docShow:
157 @echo "show " ${TARGET_DOC_FINAL}/html/index.html
158 @chrome ${TARGET_DOC_FINAL}/html/index.html
159
160 #############################################
161 # END #
162 #############################################
163
164 endif#__DOXYGEN_MK__
165