From owner-freebsd-bugs Tue Sep 16 11:20:10 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA10745 for bugs-outgoing; Tue, 16 Sep 1997 11:20:10 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA10720; Tue, 16 Sep 1997 11:20:04 -0700 (PDT) Resent-Date: Tue, 16 Sep 1997 11:20:04 -0700 (PDT) Resent-Message-Id: <199709161820.LAA10720@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, Matthew Hunt Received: from mph124.rh.psu.edu (hunt@MPH124.rh.psu.edu [128.118.126.83]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA10514 for ; Tue, 16 Sep 1997 11:17:57 -0700 (PDT) Received: (from hunt@localhost) by mph124.rh.psu.edu (8.8.7/8.8.7) id OAA01592; Tue, 16 Sep 1997 14:17:56 -0400 (EDT) Message-Id: <199709161817.OAA01592@mph124.rh.psu.edu> Date: Tue, 16 Sep 1997 14:17:56 -0400 (EDT) From: Matthew Hunt To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: misc/4556: make can't build executable from single Fortran source Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >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: