X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ffortran%2FMake-lang.in;h=0ac9bb2262b45798c8c3d7898a56c6c679d0e033;hb=b3154a1fe8d994ac93925dc544f36284631adba3;hp=5d3a0e0ef5fcff3be42d038fa0a81b548ff84ad1;hpb=60c514ba498cf233e786eea1bae3b77af2ee4356;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in index 5d3a0e0ef5f..0ac9bb2262b 100644 --- a/gcc/fortran/Make-lang.in +++ b/gcc/fortran/Make-lang.in @@ -1,6 +1,7 @@ # -*- makefile -*- # Top level makefile fragment for GNU gfortran, the GNU Fortran 95 compiler. -# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# Foundation, Inc. # Contributed by Paul Brook @@ -8,7 +9,7 @@ #GCC is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by -#the Free Software Foundation; either version 2, or (at your option) +#the Free Software Foundation; either version 3, or (at your option) #any later version. #GCC is distributed in the hope that it will be useful, @@ -17,18 +18,16 @@ #GNU General Public License for more details. #You should have received a copy of the GNU General Public License -#along with GCC; see the file COPYING. If not, write to -#the Free Software Foundation, 51 Franklin Street, Fifth Floor, -#Boston, MA 02110-1301, USA. +#along with GCC; see the file COPYING3. If not see +#. # This file provides the language dependent support in the main Makefile. # Each language makefile fragment must provide the following targets: # -# foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap, -# foo.info -# foo.install-normal, foo.install-common, foo.install-info, foo.install-man, -# foo.uninstall, foo.distdir, -# foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean, +# foo.all.cross, foo.start.encap, foo.rest.encap, +# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf, +# foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall, +# foo.mostlyclean, foo.clean, foo.distclean, # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4 # # where `foo' is the name of the language. @@ -49,52 +48,45 @@ GFORTRAN_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gfortran|sed # Use strict warnings for this front end. fortran-warn = $(STRICT_WARN) -# These files get warnings from an inline function in GMP saying: -# "control may reach end of non-void function '__gmpz_get_ui' being inlined" -fortran/expr.o-warn = -Wno-error -fortran/resolve.o-warn = -Wno-error -fortran/simplify.o-warn = -Wno-error -fortran/trans-common.o-warn = -Wno-error - # These are the groups of object files we have. The F95_PARSER_OBJS are # all the front end files, the F95_OBJS are the files for the translation # from the parse tree to GENERIC F95_PARSER_OBJS = fortran/arith.o fortran/array.o fortran/bbt.o \ - fortran/check.o fortran/data.o fortran/decl.o fortran/dump-parse-tree.o \ - fortran/error.o fortran/expr.o fortran/interface.o \ - fortran/intrinsic.o fortran/io.o fortran/iresolve.o \ + fortran/check.o fortran/cpp.o fortran/data.o fortran/decl.o \ + fortran/dump-parse-tree.o fortran/error.o fortran/expr.o \ + fortran/interface.o fortran/intrinsic.o fortran/io.o fortran/iresolve.o \ fortran/match.o fortran/matchexp.o fortran/misc.o fortran/module.o \ - fortran/options.o fortran/parse.o fortran/primary.o fortran/resolve.o \ - fortran/scanner.o fortran/simplify.o fortran/st.o fortran/symbol.o + fortran/openmp.o fortran/options.o fortran/parse.o fortran/primary.o \ + fortran/resolve.o fortran/scanner.o fortran/simplify.o fortran/st.o \ + fortran/symbol.o fortran/target-memory.o -F95_OBJS = $(F95_PARSER_OBJS) \ +F95_OBJS = $(F95_PARSER_OBJS) $(FORTRAN_TARGET_OBJS) \ fortran/convert.o fortran/dependency.o fortran/f95-lang.o \ fortran/trans.o fortran/trans-array.o fortran/trans-common.o \ fortran/trans-const.o fortran/trans-decl.o fortran/trans-expr.o \ - fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-stmt.o \ - fortran/trans-types.o + fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-openmp.o \ + fortran/trans-stmt.o fortran/trans-types.o -# GFORTRAN uses GMP for its internal arithmetics. -F95_LIBS = $(GMPLIBS) $(LIBS) +fortran_OBJS = $(F95_OBJS) gfortranspec.o # # Define the names for selecting gfortran in LANGUAGES. -FORTRAN fortran: f951$(exeext) +fortran: f951$(exeext) # Tell GNU make to ignore files by these names if they exist. -.PHONY: F95 f95 +.PHONY: fortran -gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) $(CONFIG_H) - (SHLIB_LINK='$(SHLIB_LINK)' \ - SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \ - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \ +gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) \ + $(CONFIG_H) coretypes.h intl.h + (SHLIB_LINK='$(SHLIB_LINK)'; \ + $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \ $(INCLUDES) $(srcdir)/fortran/gfortranspec.c) # Create the compiler driver gfortran. -GFORTRAN_D_OBJS = gcc.o gfortranspec.o version.o prefix.o intl.o +GFORTRAN_D_OBJS = $(GCC_OBJS) gfortranspec.o version.o prefix.o intl.o gfortran$(exeext): $(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ + $(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ $(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) $(LIBS) # Create a version of the gfortran driver which calls the cross-compiler. @@ -104,19 +96,14 @@ gfortran-cross$(exeext): gfortran$(exeext) # The compiler itself is called f951. f951$(exeext): $(F95_OBJS) \ - $(BACKEND) $(LIBDEPS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ - $(F95_OBJS) $(BACKEND) $(F95_LIBS) - -gt-fortran-f95-lang.h gtype-fortran.h : s-gtype; @true -gt-fortran-trans-decl.h gt-fortran-trans.h : s-gtype; @true -gt-fortran-trans-io.h gt-fortran-trans-types.h: s-gtype; @true -gt-fortran-trans-intrinsic.h : s-gtype; @true + $(BACKEND) $(LIBDEPS) attribs.o + $(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ + $(F95_OBJS) $(BACKEND) $(LIBS) attribs.o $(BACKENDLIBS) +gt-fortran-trans.h : s-gtype; @true # # Build hooks: -fortran.all.build: gfortran$(exeext) fortran.all.cross: gfortran-cross$(exeext) fortran.start.encap: gfortran$(exeext) @@ -129,9 +116,23 @@ fortran.tags: force cd $(srcdir)/fortran; etags -o TAGS.sub *.c *.h; \ etags --include TAGS.sub --include ../TAGS.sub -fortran.info: doc/gfortran.info -dvi:: doc/gfortran.dvi -html:: $(htmldir)/gfortran/index.html +fortran.info: doc/gfortran.info doc/gfc-internals.info +fortran.dvi: doc/gfortran.dvi doc/gfc-internals.dvi +fortran.html: $(build_htmldir)/gfortran/index.html + +F95_PDFFILES = doc/gfortran.pdf + +fortran.pdf: $(F95_PDFFILES) doc/gfc-internals.pdf + +fortran.install-pdf: $(F95_PDFFILES) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)/gcc" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)/gcc" + @list='$(F95_PDFFILES)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(pdf__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/gcc/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/gcc/$$f"; \ + done F95_MANFILES = doc/gfortran.1 @@ -144,14 +145,22 @@ fortran.srcextra: check-f95 : check-gfortran check-fortran : check-gfortran +check-f95-subtargets : check-gfortran-subtargets +check-fortran-subtargets : check-gfortran-subtargets lang_checks += check-gfortran +lang_checks_parallelized += check-gfortran +# For description see comment above check_gcc_parallelize in gcc/Makefile.in. +check_gfortran_parallelize = dg.exp=gfortran.dg/\[a-cA-C\]* \ + dg.exp=gfortran.dg/\[d-mD-M\]* \ + dg.exp=gfortran.dg/\[n-zN-Z0-9\]* # GFORTRAN documentation. GFORTRAN_TEXI = \ $(srcdir)/fortran/gfortran.texi \ + $(srcdir)/fortran/intrinsic.texi \ $(srcdir)/fortran/invoke.texi \ $(srcdir)/doc/include/fdl.texi \ - $(srcdir)/doc/include/gpl.texi \ + $(srcdir)/doc/include/gpl_v3.texi \ $(srcdir)/doc/include/funding.texi \ $(srcdir)/doc/include/gcc-common.texi \ gcc-vers.texi @@ -166,26 +175,50 @@ doc/gfortran.info: $(GFORTRAN_TEXI) doc/gfortran.dvi: $(GFORTRAN_TEXI) $(TEXI2DVI) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $< -$(htmldir)/gfortran/index.html: $(GFORTRAN_TEXI) +doc/gfortran.pdf: $(GFORTRAN_TEXI) + $(TEXI2PDF) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $< + +$(build_htmldir)/gfortran/index.html: $(GFORTRAN_TEXI) $(mkinstalldirs) $(@D) rm -f $(@D)/* - $(TEXI2HTML) -I $(docdir)/include -I $(srcdir)/fortran -o $(@D) $< + $(TEXI2HTML) -I $(gcc_docdir)/include -I $(srcdir)/fortran -o $(@D) $< .INTERMEDIATE: gfortran.pod gfortran.pod: $(GFORTRAN_TEXI) - -$(TEXI2POD) < $(srcdir)/fortran/invoke.texi > $@ + -$(TEXI2POD) -DBUGURL="$(BUGURL_TEXI)" \ + < $(srcdir)/fortran/invoke.texi > $@ + +# GFORTRAN internals documentation. +GFC_INTERNALS_TEXI = \ + $(srcdir)/fortran/gfc-internals.texi \ + $(srcdir)/doc/include/fdl.texi \ + $(srcdir)/doc/include/gcc-common.texi \ + gcc-vers.texi +doc/gfc-internals.info: $(GFC_INTERNALS_TEXI) + if [ x$(BUILD_INFO) = xinfo ]; then \ + rm -f doc/gfc-internals.info-*; \ + $(MAKEINFO) -I $(srcdir)/doc/include -I $(srcdir)/fortran \ + -o $@ $<; \ + else true; fi + +doc/gfc-internals.dvi: $(GFC_INTERNALS_TEXI) + $(TEXI2DVI) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $< + +doc/gfc-internals.pdf: $(GFC_INTERNALS_TEXI) + $(TEXI2PDF) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $< + +# Create or recreate the gfortran private include file directory. +install-finclude-dir: installdirs + $(mkinstalldirs) -m 0755 $(DESTDIR)$(libsubdir)/finclude # # Install hooks: # f951 is installed elsewhere as part of $(COMPILERS). -# Nothing to do here. -fortran.install-normal: - # Install the driver program as $(target)-gfortran # and also as either gfortran (if native) or $(tooldir)/bin/gfortran. -fortran.install-common: installdirs +fortran.install-common: install-finclude-dir installdirs -if [ -f f951$(exeext) ] ; then \ rm -f $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \ $(INSTALL_PROGRAM) gfortran$(exeext) $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \ @@ -201,7 +234,7 @@ fortran.install-common: installdirs fi ; \ fi -install-info:: $(DESTDIR)$(infodir)/gfortran.info +fortran.install-info: $(DESTDIR)$(infodir)/gfortran.info fortran.install-man: $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext) @@ -264,34 +297,46 @@ fortran.stagefeedback: stageprofile-start # which objects depend on what. FIXME # TODO: Add dependencies on the backend/tree header files -$(F95_PARSER_OBJS): fortran/gfortran.h fortran/intrinsic.h fortran/match.h \ - fortran/parse.h \ +$(F95_PARSER_OBJS): fortran/gfortran.h fortran/libgfortran.h \ + fortran/intrinsic.h fortran/match.h \ + fortran/parse.h fortran/arith.h fortran/target-memory.h \ $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TM_P_H) coretypes.h \ $(RTL_H) $(TREE_H) $(TREE_DUMP_H) $(GGC_H) $(EXPR_H) \ - flags.h output.h diagnostic.h errors.h function.h + $(FLAGS_H) output.h $(DIAGNOSTIC_H) errors.h $(FUNCTION_H) +fortran/openmp.o: pointer-set.h $(TARGET_H) toplev.h -GFORTRAN_TRANS_DEPS = fortran/gfortran.h fortran/intrinsic.h fortran/trans-array.h \ +GFORTRAN_TRANS_DEPS = fortran/gfortran.h fortran/libgfortran.h \ + fortran/intrinsic.h fortran/trans-array.h \ fortran/trans-const.h fortran/trans-const.h fortran/trans.h \ fortran/trans-stmt.h fortran/trans-types.h \ $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_H) coretypes.h $(GGC_H) fortran/f95-lang.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \ - gt-fortran-f95-lang.h gtype-fortran.h cgraph.h $(TARGET_H) + gt-fortran-f95-lang.h gtype-fortran.h $(CGRAPH_H) $(TARGET_H) fortran/cpp.h \ + $(BUILTINS_DEF) fortran/types.def \ + libfuncs.h expr.h except.h +fortran/scanner.o: toplev.h fortran/cpp.h fortran/convert.o: $(GFORTRAN_TRANS_DEPS) -fortran/trans.o: $(GFORTRAN_TRANS_DEPS) +fortran/trans.o: $(GFORTRAN_TRANS_DEPS) tree-iterator.h fortran/trans-decl.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-decl.h \ - cgraph.h $(TARGET_H) function.h $(FLAGS_H) tree-gimple.h \ - tree-dump.h + $(CGRAPH_H) $(TARGET_H) $(FUNCTION_H) $(FLAGS_H) $(RTL_H) $(GIMPLE_H) \ + $(TREE_DUMP_H) debug.h pointer-set.h fortran/trans-types.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-types.h \ - real.h toplev.h $(TARGET_H) + $(REAL_H) toplev.h $(TARGET_H) $(FLAGS_H) dwarf2out.h fortran/trans-const.o: $(GFORTRAN_TRANS_DEPS) fortran/trans-expr.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h -fortran/trans-stmt.o: $(GFORTRAN_TRANS_DEPS) +fortran/trans-stmt.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h +fortran/trans-openmp.o: $(GFORTRAN_TRANS_DEPS) fortran/trans-io.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-io.h \ fortran/ioparm.def fortran/trans-array.o: $(GFORTRAN_TRANS_DEPS) fortran/trans-intrinsic.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \ gt-fortran-trans-intrinsic.h fortran/dependency.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h -fortran/trans-common.o: $(GFORTRAN_TRANS_DEPS) - +fortran/trans-common.o: $(GFORTRAN_TRANS_DEPS) $(TARGET_H) $(RTL_H) +fortran/resolve.o: fortran/dependency.h fortran/data.h fortran/target-memory.h +fortran/data.o: fortran/data.h +fortran/options.o: $(PARAMS_H) $(TARGET_H) fortran/cpp.h +fortran/cpp.o: fortran/cpp.c $(BASEVER) incpath.h incpath.o + $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \ + -DBASEVER=$(BASEVER_s) $< $(OUTPUT_OPTION)