Date: Tue, 16 Sep 1997 14:17:56 -0400 (EDT) From: Matthew Hunt <mph@pobox.com> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: misc/4556: make can't build executable from single Fortran source Message-ID: <199709161817.OAA01592@mph124.rh.psu.edu> Resent-Message-ID: <199709161820.LAA10720@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 4556 >Category: misc >Synopsis: make can't build executable from single Fortran source >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 16 11:20:02 PDT 1997 >Last-Modified: >Originator: Matthew Hunt >Organization: none >Release: FreeBSD 2.2-STABLE i386 >Environment: FreeBSD mph124.rh.psu.edu 2.2-STABLE FreeBSD 2.2-STABLE #0: Thu Sep 11 20:08:28 EDT 1997 hunt@mph124.rh.psu.edu:/usr/src/sys/compile/WOPR i386 # $Id: sys.mk,v 1.16.2.3 1997/04/20 20:16:13 jkh Exp $ >Description: As the legions reported unnecessarily to jkh, some people write Fortran on FreeBSD. It seems that make knows how to build foo.o from foo.f, but cannot build foo from foo.f. Contrast this behavior with C code; make can build a single C source file into a binary. >How-To-Repeat: I have a simple Fortran program contained in prob1.f. No Makefile is present in the current directory. mph124:~/tmp$ ls -l prob1* -rw-r--r-- 1 hunt users 132 Sep 16 14:06 prob1.f mph124:~/tmp$ make prob1 make: don't know how to make prob1. Stop mph124:~/tmp$ make prob1.o f77 -O -c prob1.f prob1.f: MAIN: >Fix: As far as I can tell, it should work! /usr/share/mk/sys.mk has these two rules: .f: ${FC} ${FFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} [...] .f.o: ${FC} ${FFLAGS} -c ${.IMPSRC} I cannot figure out why the second one works, but the first does not. >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709161817.OAA01592>