From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 16:11:45 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59800106564A; Sun, 30 Oct 2011 16:11:45 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 06A138FC0C; Sun, 30 Oct 2011 16:11:44 +0000 (UTC) Received: by gyb11 with SMTP id 11so759633gyb.13 for ; Sun, 30 Oct 2011 09:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=XqmjsD/KYA8l0zOLVC3K+CkOsudDZFm+9CAQewL+H+Q=; b=g1bbk6xpHROCVZOLvTy539PQXyhmF5TFgnhsJchB/qpO8VKAyaVRd45O1iZSc/kG9+ QMrv0X6z2Xf7bfk11jtq/Hb2JmXweZ2ziSvBtx4HWAFCdKZvvM4hh6UgKStGZobM2Ye9 mAR4fay207l7pP/1M6w4Avm/hwjVSe/Q9MuY4= MIME-Version: 1.0 Received: by 10.68.15.232 with SMTP id a8mr17443518pbd.129.1319991103773; Sun, 30 Oct 2011 09:11:43 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.57.40 with HTTP; Sun, 30 Oct 2011 09:11:43 -0700 (PDT) In-Reply-To: <627176903.20111030200150@serebryakov.spb.ru> References: <627176903.20111030200150@serebryakov.spb.ru> Date: Sun, 30 Oct 2011 09:11:43 -0700 X-Google-Sender-Auth: 4BvsuPQzYUxh9UkaKea9ijxjCw4 Message-ID: From: mdf@FreeBSD.org To: lev@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: How to express inter-directory dependencies in infrastructure? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2011 16:11:45 -0000 2011/10/30 Lev Serebryakov : > Hello, Hackers. > > =A0(SORRY FOR SENDING INCOMPLETE MESSAGE) > > =A0How to express inter-directory dependencies in infrastructu= re? > > =A0I have project, which has two subdirectories: "lib" and "bin". > =A0Top-level Makefile is simple one, looks like this: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > SUBDIR=3D lib \ > =A0 =A0 =A0 =A0bin > > .include > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > =A0"lib" subdirectory has Makefile with "" included, and > =A0"bin" -- with included. > > =A0But how could I express, that PROG in bin depends on LIB from lib, to > cause rebuilding of PROG when LIB is changed (when I call "make" on > top level)? Normally I'd expect the dependency to be handled by make depend; that is, the source for the binary should be #including header files from the library. If the interfaces change, make depend will handle this. I guess the problem comes if you are using static linking and just implementation details internal to the library change. There is a DPADD makefile variable that seems to be used; I'm not sure though if this handles the type of dependency you're wanting. Cheers, matthew