From owner-freebsd-hackers@freebsd.org Wed May 11 20:09:16 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7716AB37BE2 for ; Wed, 11 May 2016 20:09:16 +0000 (UTC) (envelope-from dsiluanius@gmail.com) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13E8510F3 for ; Wed, 11 May 2016 20:09:16 +0000 (UTC) (envelope-from dsiluanius@gmail.com) Received: by mail-wm0-x22e.google.com with SMTP id g17so101431712wme.1 for ; Wed, 11 May 2016 13:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=GYmSrk0DfwbwpqRdMp+hOzJiqdfcUy7wododfB6Qjk0=; b=EYx1qf3OGJ4DWThwWUz0qs/3cquMu/caeoipccUzBT02bJl0/lZ5kbR7aQxf3GAi1C /tKqFyoWaaIagJqyj/dUt8cQe1Xid7hx2O0IlZQnT9DH9H/Ycgi3s7iW7YmdIvsDpDj5 Acjf0XnqfQAwPXU2XQvzEC5IFV02Dm6s4V/yKz1Rq6nNdXIJAG7AF4tNoYRxqurXxmEO 5KeVxeKoBSzWbQLATgiBMhv3f282geIP2JRWYf6ZZ8+CWhFCYxDKJdQ2HuMueDjUHdMd HNnZUsSnjiTG52+6TKNx0tXLrZpT5tqK0Mh89KVbwPGY3BJXyKJZxMNXBTm3zfXWMKvd u1DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=GYmSrk0DfwbwpqRdMp+hOzJiqdfcUy7wododfB6Qjk0=; b=dvXH7x1cE4bnupULVsGoR57OLx3UWM3R3drT9Dg+5mDuhLfzLw5nNoOJiEGT9kZQSw zElgKja6N9dEWBhwD/904/ON+uN2W5jkZcHK1d6uJ2gXQApOAWK+L74n+fqjVuevPnGC twD9bMQkJhJe40/qHowjFANuK0Oz7UsjyAO7CsXO7y9aYqG/M/6az3mxKRb0dTmAblnP /M6d9CRx1sd4y9hBue/jcGdYxiuyDN0Z5IbSc8tEsby/1j9vm0pyg+QFGs2YQn9/d+T6 SyuUbuGTFd0M32ppmxmi82BqJJ8BiNc/NxQeh+XMbkdhdkm0+lL0eBuwaaq6P4eWvoGL TrAQ== X-Gm-Message-State: AOPr4FWmY/MsWcRu+Lzg0sn4Ny/qq9QOsNKJToG1TGxcglmnoUEnzT0urf/4vPW6/pDdHQ/Crcl3IkjgRRQzbA== X-Received: by 10.28.94.193 with SMTP id s184mr6113822wmb.57.1462997354600; Wed, 11 May 2016 13:09:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.63.178 with HTTP; Wed, 11 May 2016 13:08:55 -0700 (PDT) From: Demetrius Siluanius Date: Wed, 11 May 2016 23:08:55 +0300 Message-ID: Subject: bsd.incs.mk: include subdirectories To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2016 20:09:16 -0000 Hello everyone! Recently I started porting a number of my projects to BSD world. I realized it would be great if I could use a native make(1) tool instead of GNU make. I'm really impressed how easy it is to create a makefile for a library with almost a single '.include bsd.lib.mk' statement. Thank you guys for such an amazing build system! The only thing I couldn't deal with is when headers must be placed into subdirectories. For simplicity let's assume that project's headers hierarchy is the following one: include/ mylib/ A/ A0.h A1.h B/ B0.h B1.h base.h The only header that will be used is "mylib/base.h", but it includes other headers using statements '#include "A/A0.h". What should I do to install files like this? I can't really understand what's happening inside of bsd.incs.mk file, but I guess there should be something simpler than overriding the default 'installincludes' target. I could't find any relevant information; I tried to find an example Makefile which could have a similar headers hierarchy, but didn't succeed. Could you help me, please? Thank you!