1 | include $(MORPHEO_TOPLEVEL)/Makefile.tools |
---|
2 | |
---|
3 | #-----[ Directory ]---------------------------------------------------- |
---|
4 | DIR_LIB = Library |
---|
5 | DIR_DOC = Documentation/Source |
---|
6 | |
---|
7 | #-----[ Options ]------------------------------------------------------ |
---|
8 | |
---|
9 | PREFIXE_PATH = "." |
---|
10 | SUFFIXE_PATH = ".txt" |
---|
11 | |
---|
12 | #-----[ Rules ]-------------------------------------------------------- |
---|
13 | .PHONY : all help |
---|
14 | |
---|
15 | all : help |
---|
16 | |
---|
17 | #~~~~~[ doc ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
18 | doc : |
---|
19 | @\ |
---|
20 | $(ECHO) "";\ |
---|
21 | $(ECHO) "=====[ doc ]=====================================";\ |
---|
22 | $(ECHO) "";\ |
---|
23 | $(MAKE) -C $(DIR_DOC) view; |
---|
24 | |
---|
25 | #~~~~~[ path ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
26 | path : |
---|
27 | @\ |
---|
28 | $(ECHO) "";\ |
---|
29 | $(ECHO) "=====[ path ]====================================";\ |
---|
30 | $(ECHO) "";\ |
---|
31 | $(ECHO) -n "+ ";\ |
---|
32 | $(BASENAME) $(PWD);\ |
---|
33 | $(ECHO) "| <Top Level>";\ |
---|
34 | $(ECHO) "|";\ |
---|
35 | $(MAKE) path_rec TAB="| " DIR_PATH=.; |
---|
36 | |
---|
37 | path_rec : |
---|
38 | @\ |
---|
39 | for files in `$(LS) $(DIR_PATH)`; do \ |
---|
40 | if $(TEST) -d $(DIR_PATH)/$$files; \ |
---|
41 | then \ |
---|
42 | $(ECHO) "$(TAB)+ $$files"; \ |
---|
43 | \ |
---|
44 | if test -f $(DIR_PATH)/$(PREFIXE_PATH)`$(BASENAME) $$files`$(SUFFIXE_PATH); \ |
---|
45 | then \ |
---|
46 | $(ECHO) "$(TAB)| <\c"; \ |
---|
47 | $(CAT) $(DIR_PATH)/$(PREFIXE_PATH)`$(BASENAME) $$files`$(SUFFIXE_PATH); \ |
---|
48 | $(ECHO) ">"; \ |
---|
49 | else \ |
---|
50 | $(ECHO) "$(TAB)| <No description>"; \ |
---|
51 | fi; \ |
---|
52 | $(ECHO) "$(TAB)|"; \ |
---|
53 | \ |
---|
54 | $(MAKE) path_rec TAB="$(TAB)| " DIR_PATH=$(DIR_PATH)/$$files; \ |
---|
55 | fi; \ |
---|
56 | done; |
---|
57 | |
---|
58 | #~~~~~[ Lib ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
59 | |
---|
60 | lib : |
---|
61 | @\ |
---|
62 | $(ECHO) "";\ |
---|
63 | $(ECHO) "=====[ lib ]=====================================";\ |
---|
64 | $(ECHO) "";\ |
---|
65 | $(ECHO) " Function unimplemented";\ |
---|
66 | $(ECHO) ""; |
---|
67 | |
---|
68 | # @$(ECHO) " The library is generate into the directory : $(PWD)/$(DIR_LIB)" |
---|
69 | |
---|
70 | #~~~~~[ Maintenance ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
71 | |
---|
72 | clean : |
---|
73 | @\ |
---|
74 | $(ECHO) "";\ |
---|
75 | $(ECHO) "=====[ clean ]===================================";\ |
---|
76 | $(ECHO) "";\ |
---|
77 | $(ECHO) "Delete temporary files "$(PWD);\ |
---|
78 | $(RM) *~; |
---|
79 | # @$(MAKE) clean_rec DIR_CLEAN=. |
---|
80 | |
---|
81 | #Clean recursive |
---|
82 | #clean_rec : |
---|
83 | # @$(ECHO) "Delete temporary files in directory $(DIR_CLEAN)" |
---|
84 | # @$(RM) -f $(DIR_CLEAN)/*~ |
---|
85 | # @ \ |
---|
86 | # if $(TEST) -f $(DIR_CLEAN)/Makefile -a "$(DIR_CLEAN)" != "."; \ |
---|
87 | # then \ |
---|
88 | # ($(CD) $(DIR_CLEAN); $(MAKE) clean;) \ |
---|
89 | # else \ |
---|
90 | # for files in `$(LS) $(DIR_CLEAN)`; do \ |
---|
91 | # if $(TEST) -d $(DIR_CLEAN)/$$files; \ |
---|
92 | # then \ |
---|
93 | # $(MAKE) clean_rec DIR_CLEAN=$(DIR_CLEAN)/$$files; \ |
---|
94 | # fi; \ |
---|
95 | # done; \ |
---|
96 | # fi; |
---|
97 | |
---|
98 | #~~~~~[ Help ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
99 | |
---|
100 | help : |
---|
101 | @\ |
---|
102 | $(ECHO) "";\ |
---|
103 | $(ECHO) "=====[ help ]====================================";\ |
---|
104 | $(ECHO) "";\ |
---|
105 | $(ECHO) " Rules Description";\ |
---|
106 | $(ECHO) "";\ |
---|
107 | $(ECHO) " * all cf rule \"help\"";\ |
---|
108 | $(ECHO) " * clean Delete temporary files";\ |
---|
109 | $(ECHO) " * doc View documentation files";\ |
---|
110 | $(ECHO) " * lib Generate the library to include";\ |
---|
111 | $(ECHO) " * help Print this message";\ |
---|
112 | $(ECHO) " * path Print a little description of each directory";\ |
---|
113 | $(ECHO) ""; |
---|
114 | |
---|