# Each language makefile fragment must provide the following targets:
#
# foo.all.cross, foo.start.encap, foo.rest.encap,
-# foo.info
-# foo.install-common, foo.install-info, foo.install-man,
-# foo.uninstall, foo.install-info, foo.dvi, foo.html,
-# foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean,
+# 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.
# 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
fortran/match.o fortran/matchexp.o fortran/misc.o fortran/module.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/symbol.o fortran/target-memory.o
F95_OBJS = $(F95_PARSER_OBJS) \
fortran/convert.o fortran/dependency.o fortran/f95-lang.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)
-
#\f
# Define the names for selecting gfortran in LANGUAGES.
fortran: f951$(exeext)
# The compiler itself is called f951.
f951$(exeext): $(F95_OBJS) \
- $(BACKEND) $(LIBDEPS)
+ $(BACKEND) $(LIBDEPS) attribs.o
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
- $(F95_OBJS) $(BACKEND) $(F95_LIBS)
+ $(F95_OBJS) $(BACKEND) $(LIBS) attribs.o
gt-fortran-trans.h : s-gtype; @true
#\f
cd $(srcdir)/fortran; etags -o TAGS.sub *.c *.h; \
etags --include TAGS.sub --include ../TAGS.sub
-fortran.info: doc/gfortran.info
-fortran.dvi: doc/gfortran.dvi
+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
fortran.man: $(F95_MANFILES)
# 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 \
doc/gfortran.dvi: $(GFORTRAN_TEXI)
$(TEXI2DVI) -I $(srcdir)/fortran -I $(abs_docdir)/include -o $@ $<
+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)/*
gfortran.pod: $(GFORTRAN_TEXI)
-$(TEXI2POD) < $(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
-rm -rf $(DESTDIR)$(libsubdir)/finclude
# TODO: Add dependencies on the backend/tree header files
$(F95_PARSER_OBJS): fortran/gfortran.h fortran/intrinsic.h fortran/match.h \
- fortran/parse.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 \
$(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) \
$(BUILTINS_DEF) fortran/types.def
fortran/scanner.o: toplev.h
fortran/convert.o: $(GFORTRAN_TRANS_DEPS)
fortran/trans.o: $(GFORTRAN_TRANS_DEPS)
fortran/trans-decl.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-decl.h \
- cgraph.h $(TARGET_H) function.h $(FLAGS_H) $(RTL_H) tree-gimple.h \
- tree-dump.h
+ $(CGRAPH_H) $(TARGET_H) $(FUNCTION_H) $(FLAGS_H) $(RTL_H) $(TREE_GIMPLE_H) \
+ $(TREE_DUMP_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)
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/dependency.h
fortran/dependency.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h
fortran/trans-common.o: $(GFORTRAN_TRANS_DEPS) $(TARGET_H) $(RTL_H)
fortran/resolve.o: fortran/dependency.h
-fortran/options.o: $(TARGET_H)
+fortran/options.o: $(PARAMS_H) $(TARGET_H)