3 # Author : Cedric.Bilat@he-arc.ch
9 ##############################################
11 ##############################################
13 TARGET_DOC_PATH:=${TARGET_PATH}/doc
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)
21 -include ${ROOT_MAKEFILE}/public/doc/doxygen.mk
23 ##############################################
25 ##############################################
27 DOX_SRC_FINAL:= $(filter-out $(DOX_SRC_EXCLUDE),$(DOX_SRC))
28 #https://www.gnu.org/software/make/manual/make.html#Functions
30 ##############################################
32 ##############################################
35 ######################
37 ######################
40 doc: docTitleStart docTools docPurge docPrepare docConfig docBuild docDeploy docTitleEnd
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}
50 @echo "[CBI] -> Directory doc tar : "$(TARGET_DOC_DEPLOY)
52 @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}
64 @echo "[CBI] -> Directory doc tar : "$(TARGET_DOC_DEPLOY)
66 @echo "=================================================================================="
72 @echo "doxygen version : "
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)
91 @echo "mkdir " $(TARGET_DOC_FINAL)
92 @echo "mkdir " $(TARGET_DOC_TEMP)
93 @mkdir -p $(TARGET_DOC_FINAL)
94 @mkdir -p ${TARGET_DOC_TEMP}
96 @echo "mkdir " $(TARGET_DOC_DEPLOY)
97 @mkdir -p $(TARGET_DOC_DEPLOY)
103 @echo "[Configuration]"
104 @doxygen -g $(TARGET_DOC_TEMP)/doxyFileDefaultTMP
105 @echo "Parse and fill defaut doxy-config with project-specific-config ..."
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);' \
129 @doxygen $(TARGET_DOC_TEMP)/doxyFileProjectTMP
134 ifdef TARGET_DEPLOY_PATH
137 @echo "creating "$(TARGET_NAME).doc.tar
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)
145 #@tar -cf '${TARGET_DOC_TEMP}/$(TARGET_NAME).doc.tar' -C ${TARGET_DOC_FINAL} .
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)
157 @echo "show " ${TARGET_DOC_FINAL}/html/index.html
158 @chrome ${TARGET_DOC_FINAL}/html/index.html
160 #############################################
162 #############################################