General improvement on viewing wide and long slog2 files. This added features needed...
[mpe.git] / Makefile.in
1 ALL: all
2
3 MAKE   = @MAKE@
4 SHELL  = @SHELL@
5 MKDIR  = @MKDIR@
6 RM     = @RM@
7 CP     = @CPRP@
8
9 top_srcdir        = @top_srcdir@
10 srcdir            = @srcdir@
11
12 # Build directories
13 includebuild_dir  = @includebuild_dir@
14 libbuild_dir      = @libbuild_dir@
15 binbuild_dir      = @binbuild_dir@
16 sbinbuild_dir     = @sbinbuild_dir@
17 etcbuild_dir      = @etcbuild_dir@
18
19 # Building Fortran to C interface
20 MPE_BUILD_FORTRAN2C  = @MPE_BUILD_FORTRAN2C@
21 # MPI implementation: used to turn on/off of certain feature
22 MPI_IMPL             = @MPI_IMPL@
23 # MPE header files that are needed by endusers
24 MPE_HEADERS          = mpe.h mpe_misc.h mpe_callstack.h mpe_log.h mpe_graphics.h
25
26 # The empty string, "", in PKGS is needed to avoid /bin/sh from complaining
27 # when PKGS is really empty.
28 PKGS = "" @subdirs@
29
30 all-redirect: 
31 all: build_include
32         $(MAKE) $(MAKEOPTS) build_lib_bin
33
34 #######  Building from the source
35 build_include:
36         -@if [ -n "$(includebuild_dir)" ] ; then \
37               if [ ! -d $(includebuild_dir) ] ; then \
38                   $(MKDIR) -p $(includebuild_dir) ; \
39               fi ; \
40               cd $(top_srcdir)/include && \
41               for file in $(MPE_HEADERS) ; do \
42                   if [ ! -f $(includebuild_dir)/$$file ] ; then \
43                       if [ -f $$file ] ; then \
44                           $(CP) $$file $(includebuild_dir) ; \
45                       else \
46                           echo "/* This empty MPE header will be replaced by the correct header if the corresponding subpackage is configured successfully. */" > $(includebuild_dir)/$$file ; \
47                       fi ; \
48                   fi ; \
49               done ; \
50           fi
51
52 build_lib_bin:
53         @for pkg in $(PKGS) ; do \
54              if [ -n "$$pkg" -a -s $$pkg/Makefile ] ; then \
55                  echo ; echo "**** Making $$pkg ...." ; \
56                  ( cd $$pkg && $(MAKE) $(MAKEOPTS) ) ; \
57                  sleep 1 ; \
58              fi ; \
59          done
60
61 build_check:
62         @if [ -n "$(MPERUN)" ] ; then \
63              ./sbin/mpecheckbuild -run="$(MPERUN)" ; \
64          else \
65              ./sbin/mpecheckbuild -run ; \
66          fi ; \
67
68 check : build_check
69
70 FORCE_TARGET:
71
72 ########  Installing
73 install: FORCE_TARGET
74         @installopts="-dmode=" ; \
75          if [ -n "$(PACKAGE)" ] ; then \
76              installopts="-package=$(PACKAGE) $$installopts" ; \
77          fi ; \
78          if [ -n "$(PREFIX)" ] ; then \
79              installopts="-prefix=$(PREFIX) $$installopts" ; \
80          fi ; \
81          if [ -n "$(prefix)" ] ; then \
82              installopts="-prefix=$(prefix) $$installopts" ; \
83          fi ; \
84          ./sbin/mpeinstall $$installopts
85
86 installcheck:
87         @installopts="" ; \
88          if [ -n "$(PACKAGE)" ] ; then \
89              installopts="-package=$(PACKAGE) $$installopts" ; \
90          fi ; \
91          if [ -n "$(PREFIX)" ] ; then \
92              installopts="-prefix=$(PREFIX) $$installopts" ; \
93          fi ; \
94          if [ -n "$(prefix)" ] ; then \
95              installopts="-prefix=$(prefix) $$installopts" ; \
96          fi ; \
97          ./sbin/mpecheckinstall $$installopts
98
99 installcheck-all:
100         @installopts="" ; \
101          if [ -n "$(MPERUN)" ] ; then \
102              installopts="-run=$(MPERUN) $$installopts" ; \
103          else \
104              installopts="-run $$installopts" ; \
105          fi ; \
106          if [ -n "$(PACKAGE)" ] ; then \
107              installopts="-package=$(PACKAGE) $$installopts" ; \
108          fi ; \
109          if [ -n "$(PREFIX)" ] ; then \
110              installopts="-prefix=$(PREFIX) $$installopts" ; \
111          fi ; \
112          if [ -n "$(prefix)" ] ; then \
113              installopts="-prefix=$(prefix) $$installopts" ; \
114          fi ; \
115          ./sbin/mpecheckinstall $$installopts
116
117 uninstall:
118         @./sbin/mpeuninstall
119
120 ########  Cleaning
121 # when "$(top_srcdir)" = ".", it is a non-VPATH build.
122 clean_include:
123         @-if [ -n "$(includebuild_dir)" -a "$(top_srcdir)" != "." \
124                -a "$(includebuild_dir)" != "$(top_srcdir)/include" ] ; then \
125               for file in $(MPE_HEADERS) ; do \
126                   $(RM) -f $(includebuild_dir)/$$file ; \
127               done ; \
128           fi
129
130 clean_bin:
131         @-for file in $(binbuild_dir)/* ; do \
132               case "$$file" in \
133                   *.in) ;; \
134                   *) $(RM) -f $$file ;; \
135               esac ; \
136           done
137
138 clean_lib:
139          -$(RM) -f $(libbuild_dir)/lib*
140          -$(RM) -f $(libbuild_dir)/*.jar
141          -$(RM) -f $(libbuild_dir)/*.o
142
143 clean_etc:
144          -$(RM) -f $(etcbuild_dir)/*.conf
145
146 clean: clean_lib
147         @-for pkg in $(PKGS) ; do \
148               if [ -n "$$pkg" -a -s $$pkg/Makefile ] ; then \
149                   ( cd $$pkg && $(MAKE) $(MAKEOPTS) clean ) ; \
150               fi ; \
151           done
152         @-$(RM) -f work.pc work.pcl
153
154 distclean-misc: clean_include clean_etc
155         @-$(RM) -f sbin/mpetestlink sbin/mpetestexec sbin/mpetestexeclog
156         @-$(RM) -f sbin/mpecheckinstall sbin/mpecheckbuild
157         @-$(RM) -f sbin/mpeinstall sbin/mpeuninstall
158         @-$(RM) -f Makefile
159         @-$(RM) -f mpe_conf.h
160         @-$(RM) -r f77tmpdir
161         @-$(RM) -f config.log config.status
162         @-$(RM) -rf autom4te*.cache
163
164 distclean: clean_bin clean_lib distclean-misc
165         @-for pkg in $(PKGS) ; do \
166               if [ -n "$$pkg" -a -s $$pkg/Makefile ] ; then \
167                   ( cd $$pkg && $(MAKE) $(MAKEOPTS) distclean ) ; \
168               fi ; \
169           done
170
171 maintainer-clean: clean_bin clean_lib distclean-misc
172         @-for pkg in $(PKGS) ; do \
173               if [ -n "$$pkg" -a -s $$pkg/Makefile ] ; then \
174                   ( cd $$pkg && $(MAKE) $(MAKEOPTS) maintainer-clean ) ; \
175               fi ; \
176           done
177         @-$(RM) -f mpe_conf.h.in
178
179 owner-clean: clean_bin clean_lib distclean-misc
180         @-for pkg in $(PKGS) ; do \
181               if [ -n "$$pkg" -a -s $$pkg/Makefile ] ; then \
182                   ( cd $$pkg && $(MAKE) $(MAKEOPTS) owner-clean ) ; \
183               fi ; \
184           done
185         @-$(RM) -f mpe_conf.h.in
186         @-$(RM) -f configure
187
188 configure: configure.in aclocal_core.m4 aclocal_f77.m4 aclocal_make.m4 \
189         aclocal_mpi.m4 aclocal.m4
190         autoheader
191         autoconf
192
193 # Allow dependencies target
194 dependencies:
195
196 # Allow a coverage target
197 coverage:
198
199 # Allow a tags target
200 tags: TAGS
201 TAGS: