*BSD News Article 38396


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yarrina.connect.com.au!werple.apana.org.au!otis.apana.org.au!serval.net.wsu.edu!netnews.nwnet.net!oracle.pnl.gov!osi-east2.es.net!lll-winken.llnl.gov!uwm.edu!spool.mu.edu!bloom-beacon.mit.edu!pad-thai.cam.ov.com!usenet
From: jik@cam.ov.com (Jonathan I. Kamens)
Newsgroups: comp.os.386bsd.development
Subject: FreeBSD Make and order of dependency building
Date: 22 Nov 1994 17:43:24 GMT
Organization: OpenVision Technologies, Inc.
Lines: 22
Message-ID: <3atajs$bch@pad-thai.cam.ov.com>
NNTP-Posting-Host: gza-client1.cam.ov.com

The Imakefile that's shipped with the XRN program produces a Makefile the
first dependency of which is "all:: mesg_strings.h"; mesg_strings.h is a
generated file for which there is a rule in the Makefile.  Later on in the
same Makefile is "all:: xrn".  Some of the object files that build "xrn" also
depend on mesg_strings.h, but the dependencies aren't explicitly put into the
Makefile unless the user runs "make depend".

On most systems, when the user runs "make", Make builds mesg_strings.h before
building anything else.  However, I have a report from a user of XRN that on
FreeBSD 1.1.5, running "make" causes Make to try to build the xrn object files
before building mesg_strings.h, and some of them fail because they can't
include mesg_strings.h.

I'm trying to figure out why this is happening.  My best guess is that the
Make shipped with FreeBSD doesn't promise to build "::" dependencies in the
order they appear in the Makefile.  Can anyone confirm or deny that?  If the
latter, can anyone suggest another explanation for why mesg_strings.h doesn't
get built first when the user runs "make"?

Thanks,
-- 
Jonathan Kamens  |  OpenVision Technologies, Inc.  |   jik@cam.ov.com