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