bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #27396] add version of include that treats paths as relative to the


From: anonymous
Subject: [bug #27396] add version of include that treats paths as relative to the included file's directory
Date: Mon, 07 Sep 2009 17:47:47 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1

URL:
  <http://savannah.gnu.org/bugs/?27396>

                 Summary: add version of include that treats paths as
relative to the included file's directory
                 Project: make
            Submitted by: None
            Submitted on: Mon 07 Sep 2009 05:47:46 PM UTC
                Severity: 3 - Normal
              Item Group: Enhancement
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 3.81
        Operating System: Any
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

Consider the following Makefile:

-----
lib1.a: lib1.a(foo.o) lib1.a(bar.o)

foo.o: lib.h
bar.o: lib.h bar.h
-----

In another directory I'd like to be able to do the following:

-----
all: prog

prog: main.o ../lib/lib1.a

@include ../lib/Makefile
-----

The @include would treat all the relative pathnames in ../lib/Makefile as
relative to ../lib, yielding the equivalent of:

-----
../lib/lib1.a: ../lib/lib1.a(../lib/foo.o) ../lib/lib1.a(../lib/bar.o)

../lib/foo.o: ../lib/lib.h
../lib/bar.o: ../lib/lib.h ../lib/bar.h
-----

The syntax of @include could be something else - maybe include
@../lib/Makefile, or some other idea.  It should work with -include, so
@-include or address@hidden if you want both (or -include @../lib/Makefile for 
that
syntax).

This is intended to make non-recursive build trees easier to create.  You'd
still need to use target-specific variables and such, but this would make
things easier.  In particular, you could @include a gcc-generated dependency
file and have it do the right thing.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27396>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]