2 # Makefile to compile and install the SUIF compiler
8 # default variables -- these may be overridden
12 SUBDIRS
= basesuif simplesuif suifbuilder baseparsuif fortback suifcookbook suifps suifcallgraph suifvectorizer convertsuif1.1
.0to1.1
.1 reduce suifvisitor cfg graph ipaf fortparse fort2suif fortfront para dave alias_interface speculate cparallel aa checkfort color decomp dlprintsuif gaopt inline mdopt popt preip promotescalar reaching suex suifvbrowser addsync padopt wilbyr wilbyr_lib verisuif
13 SUB_PACKAGES
= basesuif
17 include $(SUIFHOME
)/Makefile.rules
18 # read the standard definitions
19 include $(SUIFHOME
)/Makefile.defs
21 MACHINCL
= $(MACHDIR
)/include
23 source
: Makefile.local Makefile.std Makefile.sub Makefile.rules Makefile.defs \
28 @echo
" Setting up directory structures for SUIF."
30 @
# create the include directory
31 @
# create the machine-specific directories
32 @if
test ! -d
$(MACHDIR
); then mkdir
$(MACHDIR
); else : ; fi
33 @if
test ! -d
$(INCLDIR
); then mkdir
$(INCLDIR
); else : ; fi
34 @if
test ! -d
$(BINDIR
); then mkdir
$(BINDIR
); else : ; fi
35 @if
test ! -d
$(LIBDIR
); then mkdir
$(LIBDIR
); else : ; fi
36 @if
test ! -d
$(SODIR
); then mkdir
$(SODIR
); else : ; fi
37 @if
test ! -d
$(MANDIR
); then mkdir
$(MANDIR
); else : ; fi
38 @if
test ! -d
$(HTMLDIR
); then mkdir
$(HTMLDIR
); else : ; fi
39 @if
test ! -d
$(DOCDIR
); then mkdir
$(DOCDIR
); else : ; fi
40 @if
test ! -d
$(AUTOINITDIR
); then mkdir
$(AUTOINITDIR
); else : ; fi
41 @if
test ! -d
$(VERDATADIR
); then mkdir
$(VERDATADIR
); else : ; fi
42 @if
test ! -d
$(TCLDIR
); then mkdir
$(TCLDIR
); else : ; fi
43 @if
test ! -d
$(SCRIPTDIR
); then mkdir
$(SCRIPTDIR
); else : ; fi
44 @if
test ! -d
$(MACHINCL
); then mkdir
$(MACHINCL
); else : ; fi
45 @
# put the FORTRAN header file in the MACHINCL directory
46 @
# note: other files (e.g. varargs.h) need to go there, too
47 @
# rm -f $(MACHINCL)/sf2c.h
48 @
# ( cd $(MACHINCL); ln -s ../../include/sf2c.h . )
50 @
# There's a chicken-and-egg problem with the basesuif/scripts
51 @
# package: it needs to be installed for packages to install. So
52 @
# we short circuit it by manually installing the scripts here.
53 @if
test -d src
/basesuif
/scripts
; then \
54 (cd src
/basesuif
/scripts
; \
56 rm -f
$(BINDIR
)/$${file}; \
57 cp
$${file} $(BINDIR
); \
58 chmod
775 $(BINDIR
)/$${file}; \
63 @
rm -f
$(BINDIR
)/Makefile
65 reinstall
: show-reinstall
69 show-install show-reinstall-bin show-reinstall
: source
70 @if
test ! -d
$(BINDIR
); then \
72 echo
" The directory structure needed for" \
73 "SUIF has not yet been set up." 1>&2; \
74 echo
" You will have to run \`\`gmake setup''" \
75 "before attempting to install" 1>&2; \
76 echo
" the system. Please see the README" \
77 "file for more critical" 1>&2; \
78 echo
" information on setup and installation." 1>&2; \
84 @if
test ""$(NIGHTLY
) = "" ; then \
86 echo
" The full SUIF compiler system is now being" \
87 "installed. To make it"; \
88 echo
" easier to tell whether there are installation" \
89 "problems and where"; \
90 echo
" they occurred, each subpackage will be installed" \
92 echo
" the full installation details will be recorded" \
94 echo
" "$(LOGFILE
)" in each subdirectory. As each" \
96 echo
" completed, a single line will be printed here" \
98 echo
" success or failure of that particular" \
104 @if
test ""$(NIGHTLY_STATUS
) = master
; then \
105 rm -f
$(NIGHTLYREADYDIR
)/* ; \
109 @
export SUB_PACKAGES
; SUB_PACKAGES
= ; \
110 export PACKAGE_NAME
; PACKAGE_NAME
= ; \
111 export STATIC_LIBNAME
; STATIC_LIBNAME
= ; \
112 export SHARED_LIBNAME
; SHARED_LIBNAME
= ; \
113 export LIBNAME_SET_A
; LIBNAME_SET_A
= ; \
114 export LIBNAME_SET_B
; LIBNAME_SET_B
= ; \
115 export LIBNAME_SET
; LIBNAME_SET
= ; \
116 export SUB_PACKAGES
; SUB_PACKAGES
= ; \
117 for
dir in
$(SUBDIRS
); do \
118 if
test ""$(NIGHTLY_STATUS
) = slave
; then \
119 file_stall
-silent
-name
$$dir $(NIGHTLYREADYDIR
)/$$dir; \
121 if
test -d
$(SUIFHOME
)/RCS
/$$dir ; then \
122 rm -rf
$(WORKDIR
)/$$dir; \
123 if
test ! -d
$(WORKDIR
)/$$dir; then \
124 mkdir
$(WORKDIR
)/$$dir; \
125 ln
-s
$(SUIFHOME
)/RCS
/$$dir $(WORKDIR
)/$$dir/RCS
; \
126 (cd
$(WORKDIR
)/$$dir; co Makefile
> /dev
/null
2>&1); \
129 if
test -d
$(WORKDIR
)/$$dir; then \
130 ( cd
$(WORKDIR
)/$$dir; \
131 $(MAKE
) --no-print-directory
$@
; \
132 $(MAKE
) --no-print-directory
clean 1>> $(LOGFILE
) 2>&1 ); \
134 if
test ""$(NIGHTLY_STATUS
) = master
; then \
135 touch
$(NIGHTLYREADYDIR
)/$$dir; \
141 install-noisy
: source
142 @
export SUB_PACKAGES
; SUB_PACKAGES
= ; \
143 export PACKAGE_NAME
; PACKAGE_NAME
= ; \
144 export STATIC_LIBNAME
; STATIC_LIBNAME
= ; \
145 export SHARED_LIBNAME
; SHARED_LIBNAME
= ; \
146 export LIBNAME_SET_A
; LIBNAME_SET_A
= ; \
147 export LIBNAME_SET_B
; LIBNAME_SET_B
= ; \
148 export LIBNAME_SET
; LIBNAME_SET
= ; \
149 export SUB_PACKAGES
; SUB_PACKAGES
= ; \
150 for
dir in
$(SUBDIRS
); do \
151 if
test -d
$(WORKDIR
)/$$dir; then \
152 ( cd
$(WORKDIR
)/$$dir; \
153 SUB_PACKAGES
= $(MAKE
) --no-print-directory
install ; \
154 $(MAKE
) --no-print-directory
clean ); \
159 @ver_assert_ver_does_not_exist
$(VERSION
)
160 @ver_build_current
$(VERSION
)
163 @
export SUB_PACKAGES
; SUB_PACKAGES
= ; \
164 export PACKAGE_NAME
; PACKAGE_NAME
= ; \
165 export STATIC_LIBNAME
; STATIC_LIBNAME
= ; \
166 export SHARED_LIBNAME
; SHARED_LIBNAME
= ; \
167 export LIBNAME_SET_A
; LIBNAME_SET_A
= ; \
168 export LIBNAME_SET_B
; LIBNAME_SET_B
= ; \
169 export LIBNAME_SET
; LIBNAME_SET
= ; \
170 export SUB_PACKAGES
; SUB_PACKAGES
= ; \
171 for
dir in
$(SUBDIRS
); do \
172 if
test -d
$(WORKDIR
)/$$dir; then \
173 ( cd
$(WORKDIR
)/$$dir; $(MAKE
) --no-print-directory
); \
178 @
-export SUB_PACKAGES
; SUB_PACKAGES
= ; \
179 export PACKAGE_NAME
; PACKAGE_NAME
= ; \
180 export STATIC_LIBNAME
; STATIC_LIBNAME
= ; \
181 export SHARED_LIBNAME
; SHARED_LIBNAME
= ; \
182 export LIBNAME_SET_A
; LIBNAME_SET_A
= ; \
183 export LIBNAME_SET_B
; LIBNAME_SET_B
= ; \
184 export LIBNAME_SET
; LIBNAME_SET
= ; \
185 export SUB_PACKAGES
; SUB_PACKAGES
= ; \
186 for
dir in
$(SUBDIRS
); do \
187 if
test -d
$(WORKDIR
)/$$dir; then \
188 ( cd
$(WORKDIR
)/$$dir; \
189 $(MAKE
) --no-print-directory
clean ); \
194 suif-recursive-make clean-rcs-links
195 if
test -d RCS
; then \
196 rm RCS
> /dev
/null
2>&1 ; \
197 echo
> /dev
/null
2>&1 ; \