38 |
# main target |
# main target |
39 |
############# |
############# |
40 |
|
|
41 |
all_real: $(BYTE) $(OPT) |
_all_real: $(BYTE) $(OPT) |
42 |
|
|
43 |
all: |
all: |
44 |
@echo " + making $(BYTE) $(OPT) in $(SUBDIR_NAME_DIR) ..." |
@echo " + making $(BYTE) $(OPT) in $(SUBDIR_NAME_DIR) ..." |
45 |
@make all_real |
@make _all_real |
46 |
|
|
47 |
# Recompiles everything from scratch |
# Recompiles everything from scratch |
48 |
re: |
re: |
52 |
# bytecode and native-code compilation |
# bytecode and native-code compilation |
53 |
###################################### |
###################################### |
54 |
|
|
|
NAME = $(SUBDIR_NAME_DIR) |
|
|
|
|
55 |
# main targets: |
# main targets: |
56 |
|
|
57 |
ML = $(SUBDIR_NAME_ML) |
ML = $(SUBDIR_NAME_ML) |
65 |
|
|
66 |
$(BYTE): interface |
$(BYTE): interface |
67 |
@echo " + making byte in $(SUBDIR_NAME_DIR) ..." |
@echo " + making byte in $(SUBDIR_NAME_DIR) ..." |
68 |
@make lib$(NAME).cma |
@make lib$(SUBDIR_NAME_DIR).cma |
69 |
|
|
70 |
$(OPT): interface |
$(OPT): interface |
71 |
@echo " + making opt in $(SUBDIR_NAME_DIR) ..." |
@echo " + making opt in $(SUBDIR_NAME_DIR) ..." |
77 |
|
|
78 |
interface_real: $(CMI) |
interface_real: $(CMI) |
79 |
|
|
80 |
lib$(NAME).cma: $(CMO) |
lib$(SUBDIR_NAME_DIR).cma: $(CMO) |
81 |
@echo " + building $@ (bytecode library) in $(SUBDIR_NAME_DIR) ..." |
@echo " + building $@ (bytecode library) in $(SUBDIR_NAME_DIR) ..." |
82 |
$(OCAMLFIND) $(OCAMLC) $(CMO) $(BFLAGS) $(BLFLAGS) -o $@ |
$(OCAMLFIND) $(OCAMLC) $(CMO) $(BFLAGS) $(BLFLAGS) -o $@ |
83 |
|
|
86 |
|
|
87 |
DOCPATH = ../../doc |
DOCPATH = ../../doc |
88 |
|
|
89 |
PDF = $(DOCPATH)/pdf/lib$(NAME)_code_documentation.pdf |
PDF = $(DOCPATH)/pdf/lib$(SUBDIR_NAME_DIR)_code_documentation.pdf |
90 |
PS = $(DOCPATH)/ps/lib$(NAME)_code_documentation.ps |
PS = $(DOCPATH)/ps/lib$(SUBDIR_NAME_DIR)_code_documentation.ps |
91 |
LATEX_SHORT = lib$(NAME)_code_documentation.tex |
LATEX_SHORT = lib$(SUBDIR_NAME_DIR)_code_documentation.tex |
92 |
LATEX = $(DOCPATH)/latex/$(LATEX_SHORT) |
LATEX = $(DOCPATH)/latex/$(LATEX_SHORT) |
93 |
DVI_SHORT = lib$(NAME)_code_documentation.dvi |
DVI_SHORT = lib$(SUBDIR_NAME_DIR)_code_documentation.dvi |
94 |
DVI = $(DOCPATH)/dvi/$(DVI_SHORT) |
DVI = $(DOCPATH)/dvi/$(DVI_SHORT) |
95 |
TEXI_SHORT = lib$(NAME)_code_documentation.texi |
TEXI_SHORT = lib$(SUBDIR_NAME_DIR)_code_documentation.texi |
96 |
TEXI = $(DOCPATH)/texi/$(TEXI_SHORT) |
TEXI = $(DOCPATH)/texi/$(TEXI_SHORT) |
97 |
TEXI2HTML = $(DOCPATH)/texi2html/lib$(NAME)_code_documentation.html |
TEXI2HTML = $(DOCPATH)/texi2html/lib$(SUBDIR_NAME_DIR)_code_documentation.html |
98 |
MAN_PATH = $(DOCPATH)/man/$(SUBDIR_NAME_DIR) |
MAN_PATH = $(DOCPATH)/man/$(SUBDIR_NAME_DIR) |
99 |
HTML_PATH = $(DOCPATH)/html/$(SUBDIR_NAME_DIR) |
HTML_PATH = $(DOCPATH)/html/$(SUBDIR_NAME_DIR) |
100 |
|
|
105 |
@echo " + making latex in $(SUBDIR_NAME_DIR) ..." |
@echo " + making latex in $(SUBDIR_NAME_DIR) ..." |
106 |
@mkdir -p $(DOCPATH)/latex |
@mkdir -p $(DOCPATH)/latex |
107 |
@$(OCAMLDOC) $(INCLUDES) -o $(LATEX) -latex \ |
@$(OCAMLDOC) $(INCLUDES) -o $(LATEX) -latex \ |
108 |
-t 'lib$(NAME) code documentation' \ |
-t 'lib$(SUBDIR_NAME_DIR) code documentation' \ |
109 |
$(MLI) \ |
$(MLI) \ |
110 |
$(ML) \ |
$(ML) \ |
111 |
`if [ -f ./ocamldoc_options ]; then cat ./ocamldoc_options; fi` |
`if [ -f ./ocamldoc_options ]; then cat ./ocamldoc_options; fi` |
113 |
$(DVI): $(LATEX) |
$(DVI): $(LATEX) |
114 |
@echo " + making dvi in $(SUBDIR_NAME_DIR) ..." |
@echo " + making dvi in $(SUBDIR_NAME_DIR) ..." |
115 |
@mkdir -p $(DOCPATH)/dvi |
@mkdir -p $(DOCPATH)/dvi |
116 |
( cp $(LATEX) $(TMP); \ |
@$(RM) -R $(TMP) |
117 |
|
@mkdir -p $(TMP) |
118 |
|
@( cp $(LATEX) $(TMP); \ |
119 |
cd $(TMP); \ |
cd $(TMP); \ |
120 |
latex $(LATEX_SHORT); \ |
latex $(LATEX_SHORT); \ |
121 |
latex $(LATEX_SHORT); \ |
latex $(LATEX_SHORT); \ |
122 |
|
$(RM) $(TMP)/lib$(SUBDIR_NAME_DIR)_code_documentation.{log,toc,aux}; \ |
123 |
cd -; \ |
cd -; \ |
124 |
cp $(TMP)/$(DVI_SHORT) $(DVI) ) |
cp $(TMP)/$(DVI_SHORT) $(DVI); \ |
125 |
|
$(RM) $(TMP)/$(DVI_SHORT) $(TMP)/$(LATEX_SHORT) ) |
126 |
|
@rmdir $(TMP) |
127 |
|
|
128 |
$(PDF): $(DVI) |
$(PDF): $(DVI) |
129 |
@mkdir -p $(DOCPATH)/pdf |
@mkdir -p $(DOCPATH)/pdf |
139 |
@echo " + making texi in $(SUBDIR_NAME_DIR) ..." |
@echo " + making texi in $(SUBDIR_NAME_DIR) ..." |
140 |
@mkdir -p $(DOCPATH)/texi |
@mkdir -p $(DOCPATH)/texi |
141 |
@$(OCAMLDOC) $(INCLUDES) -texi -o $(TEXI) \ |
@$(OCAMLDOC) $(INCLUDES) -texi -o $(TEXI) \ |
142 |
-t 'lib$(NAME) code documentation' \ |
-t 'lib$(SUBDIR_NAME_DIR) code documentation' \ |
143 |
$(MLI) \ |
$(MLI) \ |
144 |
$(ML) \ |
$(ML) \ |
145 |
`if [ -f ./ocamldoc_options ]; then cat ./ocamldoc_options; fi` |
`if [ -f ./ocamldoc_options ]; then cat ./ocamldoc_options; fi` |
159 |
@echo " + making $@ in $(SUBDIR_NAME_DIR) ..." |
@echo " + making $@ in $(SUBDIR_NAME_DIR) ..." |
160 |
@mkdir -p $(HTML_PATH) |
@mkdir -p $(HTML_PATH) |
161 |
@$(OCAMLDOC) $(INCLUDES) -html -d $(HTML_PATH) -all-params \ |
@$(OCAMLDOC) $(INCLUDES) -html -d $(HTML_PATH) -all-params \ |
162 |
-colorize-code -t 'lib$(NAME) code documentation'\ |
-colorize-code -t 'lib$(SUBDIR_NAME_DIR) code documentation'\ |
163 |
$(MLI) \ |
$(MLI) \ |
164 |
$(ML) \ |
$(ML) \ |
165 |
`if [ -f ./ocamldoc_options ]; then cat ./ocamldoc_options; fi` |
`if [ -f ./ocamldoc_options ]; then cat ./ocamldoc_options; fi` |
166 |
|
@$(RM) $(HTML_PATH)/style.css |
167 |
|
@cp ../../doc/style.css $(HTML_PATH)/style.css |
168 |
|
|
169 |
man: $(BYTE) ocamldoc_options |
man: $(BYTE) ocamldoc_options |
170 |
@echo " + making $@ in $(SUBDIR_NAME_DIR) ..." |
@echo " + making $@ in $(SUBDIR_NAME_DIR) ..." |
171 |
@mkdir -p $(MAN_PATH) |
@mkdir -p $(MAN_PATH) |
172 |
@$(OCAMLDOC) $(INCLUDES) -man -d $(MAN_PATH) -man-mini \ |
@$(OCAMLDOC) $(INCLUDES) -man -d $(MAN_PATH) -man-mini \ |
173 |
-man-suffix 'txt' -t 'lib$(NAME) code documentation'\ |
-man-suffix 'txt' -t 'lib$(SUBDIR_NAME_DIR) code documentation'\ |
174 |
$(MLI) \ |
$(MLI) \ |
175 |
$(ML) \ |
$(ML) \ |
176 |
`if [ -f ./ocamldoc_options ]; then cat ./ocamldoc_options; fi` |
`if [ -f ./ocamldoc_options ]; then cat ./ocamldoc_options; fi` |
206 |
# clean |
# clean |
207 |
####### |
####### |
208 |
|
|
209 |
clean: check-clean |
clean: clean-check clean-basic |
210 |
@echo " + making $@ in $(SUBDIR_NAME_DIR) ..." |
@echo " + making $@ in $(SUBDIR_NAME_DIR) ..." |
211 |
@$(RM) *.cm[iox] *.o *~ \#* lib$(NAME).cma |
@$(RM) *.cm[iox] *.o lib$(SUBDIR_NAME_DIR).cma |
212 |
|
|
213 |
doc-clean: |
clean-doc: |
214 |
@echo " + making $@ in $(SUBDIR_NAME_DIR) ..." |
@echo " + making $@ in $(SUBDIR_NAME_DIR) ..." |
215 |
@$(RM) $(PDF) \ |
@$(RM) $(PDF) \ |
216 |
$(PS) \ |
$(PS) \ |
224 |
dist-clean distclean: clean |
dist-clean distclean: clean |
225 |
@echo " + making $@ in $(SUBDIR_NAME_DIR) ..." |
@echo " + making $@ in $(SUBDIR_NAME_DIR) ..." |
226 |
|
|
227 |
|
clean-cvs: clean-cvs-default |
228 |
|
|
229 |
.PHONY: ocamldoc_options |
.PHONY: ocamldoc_options |
230 |
|
|
231 |
include ./check.Makefile |
include ./check.Makefile |