/[libml]/libml/src/Makefile
ViewVC logotype

Diff of /libml/src/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by srv89, Tue Oct 28 13:41:02 2003 UTC revision 1.4 by srv89, Mon Nov 10 09:17:47 2003 UTC
# Line 40  include common.Makefile Line 40  include common.Makefile
40    
41  NAME = libml  NAME = libml
42    
43    DIRNAME = src
44    
45  all: $(NAME).cma $(NAME).cmxa  all: $(NAME).cma $(NAME).cmxa
46    
47  # Recompiles everything from scratch  # Recompiles everything from scratch
# Line 49  re: clean all Line 51  re: clean all
51  ######################################  ######################################
52    
53  byte-recursive:  byte-recursive:
54          @echo " /"          @echo " + making $@ in $(DIRNAME) ..."
         @echo " | making bytecode in subdirectories ..."  
         @echo " \\"  
55          @for i in $(SUBDIRS);\          @for i in $(SUBDIRS);\
56          do\          do\
57          ( make -C $$i byte ) || exit 1 ;\          ( make -C $$i byte ) || exit 1 ;\
58          done          done
59    
60  opt-recursive:  opt-recursive:
61          @echo " /"          @echo " + making $@ in $(DIRNAME) ..."
         @echo " | making opt in subdirectories ..."  
         @echo " \\"  
62          @for i in $(SUBDIRS);\          @for i in $(SUBDIRS);\
63          do\          do\
64          ( make -C $$i opt ) || exit 1 ;\          ( make -C $$i opt ) || exit 1 ;\
65          done          done
66    
67  all-recursive:  all-recursive:
68          @echo " /"          @echo " + making $@ in $(DIRNAME) ..."
         @echo " | making all in subdirectories ..."  
         @echo " \\"  
69          @for i in $(SUBDIRS);\          @for i in $(SUBDIRS);\
70          do\          do\
71          ( make -C $$i all ) || exit 1 ;\          ( make -C $$i all ) || exit 1 ;\
72          done          done
73    
74  $(NAME).cma: byte-recursive  $(NAME).cma: byte-recursive
75          @echo " /"          @echo " + building $@ in $(DIRNAME) ..."
         @echo " | building $@ (bytecode library) ..."  
         @echo " \\"  
76          $(OCAMLFIND) $(OCAMLC) $(ALL_CMA_LIB) $(BLFLAGS) -o $@          $(OCAMLFIND) $(OCAMLC) $(ALL_CMA_LIB) $(BLFLAGS) -o $@
77    
78  $(NAME).cmxa: opt-recursive  $(NAME).cmxa: opt-recursive
79          @echo " /"          @echo " + building $@ in $(DIRNAME) ..."
         @echo " | building $@ and $(NAME).a (native code libraries) ..."  
         @echo " \\"  
80          $(OCAMLMKLIB) $(ALL_CMX_LIB) -o $(NAME)          $(OCAMLMKLIB) $(ALL_CMX_LIB) -o $(NAME)
81    
82  $(BYTE): $(NAME).cma  $(BYTE): $(NAME).cma
83    
84  $(OPT): $(NAME).cmxa  $(OPT): $(NAME).cmxa
85    
86  interface:  interface:
87          @echo " /"          @echo " + making $@ in $(DIRNAME) ..."
         @echo " | making $@ in subdirectories ..."  
         @echo " \\"  
88          @for i in $(SUBDIRS);\          @for i in $(SUBDIRS);\
89          do\          do\
90          ( make -C $$i $@ ) || exit 1;\          ( make -C $$i $@ ) || exit 1;\
91          done          done
92    
93    # install / uninstall
94    #####################
95    
96    install:
97            @echo " + installing LibML ..."
98            files=$$( \
99                for f in $(ALL_CMI_INSTALL) $(ALL_MLI_INSTALL) $(ALL_CMX_INSTALL) $(NAME).cma $(NAME).cmxa $(NAME).a ./META; do \
100                    if [ -f "$$f" ]; then echo $$f; fi; \
101                done; \
102            ) && \
103            $(OCAMLFIND) install $(NAME) $$files
104    
105    uninstall:
106            @echo " + uninstalling LibML ..."
107            $(OCAMLFIND) remove $(NAME)
108    
109  # documentation  # documentation
110  ###############  ###############
111    
112  .PHONY: doc  .PHONY: doc
113    
114  doc:  doc:
115          @echo " /"          @echo " + making $@ in $(DIRNAME) ..."
116          @echo " | making $@ in subdirectories ..."          @for i in $(SUBDIRS);\
117          @echo " \\"          do\
118            ( make -C $$i $@ ) || exit 1 ;\
119            done
120    
121    man:
122            @echo " + making $@ in $(DIRNAME) ..."
123            @for i in $(SUBDIRS);\
124            do\
125            ( make -C $$i $@ ) || exit 1 ;\
126            done
127    
128    html:
129            @echo " + making $@ in $(DIRNAME) ..."
130            @for i in $(SUBDIRS);\
131            do\
132            ( make -C $$i $@ ) || exit 1 ;\
133            done
134    
135    dvi:
136            @echo " + making $@ in $(DIRNAME) ..."
137            @for i in $(SUBDIRS);\
138            do\
139            ( make -C $$i $@ ) || exit 1 ;\
140            done
141    
142    pdf:
143            @echo " + making $@ in $(DIRNAME) ..."
144            @for i in $(SUBDIRS);\
145            do\
146            ( make -C $$i $@ ) || exit 1 ;\
147            done
148    
149    ps:
150            @echo " + making $@ in $(DIRNAME) ..."
151          @for i in $(SUBDIRS);\          @for i in $(SUBDIRS);\
152          do\          do\
153          ( make -C $$i $@ ) || exit 1 ;\          ( make -C $$i $@ ) || exit 1 ;\
# Line 118  doc: Line 157  doc:
157  #######  #######
158    
159  clean: default-clean  clean: default-clean
160          @echo " /"          @echo " + making $@ in $(DIRNAME) ..."
         @echo " | making $@ in subdirectories ..."  
         @echo " \\"  
161          @for i in $(SUBDIRS);\          @for i in $(SUBDIRS);\
162          do\          do\
163          ( make -C $$i $@ ) || exit 1 ;\          ( make -C $$i $@ ) || exit 1 ;\
164          done          done
         @echo " /"  
         @echo " | cleaning src/ ..."  
         @echo " \\"  
         @$(RM) $(NAME).{cma,cmxa,a}  
165    
166  default-clean:  default-clean:
167          @$(RM) *.cm[iox] *.o *~ \#*          @$(RM) *.cm[iox] *.o *~ \#*
168    
169  doc-clean:  doc-clean:
170          @echo " /"          @echo " + making $@ in $(DIRNAME) ..."
         @echo " |        making $@ in subdirectories ..."  
         @echo " \\"  
171          @for i in $(SUBDIRS);\          @for i in $(SUBDIRS);\
172          do\          do\
173          ( make -C $$i $@ ) || exit 1 ;\          ( make -C $$i $@ ) || exit 1 ;\
174          done          done
         @echo " /"  
         @echo " | cleaning doc/ ..."  
         @echo " \\"  
         @$(RM) -R ../doc/{dvi,html,latex,man,texi,pdf,ps,texi2html}  
175    
176  dist-clean distclean:: clean doc-clean  dist-clean distclean: clean doc-clean
177          @echo " + making $@ ..."          @echo " + making $@ in $(DIRNAME) ..."
178          @$(RM) config.cache config.log config.status .depend common.Makefile configure */Makefile          @$(RM) config.cache config.log config.status .depend common.Makefile \
179  # TODO: remove CVS stuff          configure */Makefile $(NAME).{cma,cmxa,a}
180    
181  # check  # check
182  #######  #######

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26