bug-make
[Top][All Lists]
Advanced

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

[Newbie] Getting involved


From: Måns Ansgariusson
Subject: [Newbie] Getting involved
Date: Wed, 19 Sep 2018 18:30:18 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

Hello! 

I have an idea of some features I'd like to see in make. I'm no expert at all
regarding make so I hope I don't reinvent the wheel or come with to stupid
ideas.
I'd be happy to implement it but I'm not sure if these are desirable
features or where to start.

Proposed features:
1. Saving build information
    I recently started to work more with embedded development and interact more
    with make files. One thing that I think can be improved is that make files
    has no idea of the previous build state.
    An example:
    ....
    CFLAGS = -Wall -Wextra -std=c99 -Wno-format -Wno-parentheses
    ....
    debug: CFLAGS += -DDEBUG -g
    debug: all 
    .....
    If I would want to switch between the debug and "release" build I'd have to
    remove all *.o files(clean) and recompile. This is needed because Make only
    looks on the time stamps of the last write to the affected *.c files and *.o
    files, if I have understood this correctly. If Make were to include a
    feature that saved the build information of the affected files we would not
    need to have a "clean" recipe since Make would be able to determine what
    needs to be rebuild because of new dependencies, build flags or exported
    variables.

2. Command execution should inherit from the previous shells in its dependency
graph
    Another example:
    .... FAIL
    all:
        export TEST="string"
        @echo $$TEST
    .... Works
    all:
        export TEST="string"; echo $$TEST
    ....
    A friend of mine started to use make when working with Golang and he needed
    to export some variables and it didn't work since make, again not sure, most
    likely starts a new shell for each command execution which loses all
    previous environment variables which isn't part of the original shell from
    which the make command were executed.
3. Target a specific subsystem
    I'm a really lazy bastard and this might be going against the original idea
    of make but here it goes. What if we could target just one subsystem with a
    specific rule given an input parameter to make.  
    An example:
    ....
    CFLAGS = -Wall -Wextra -std=c99 -Wno-format -Wno-parentheses
    ....
    debug: CFLAGS += -DDEBUG -g
    debug: all 
    .....
    make debug --src=src/subsystem
    .....
    Given I have a large software project and I know I have a bug in
    a specific subsystem I would like to be able to add the debug options only
    to that specific build system. Again this is perhaps more of a software
    solution that the software project by itself take care of but I'm just
    throwing the idea out there.


I'm, as the subject describes, a newbie so hope I don't waste your time with
this email! Also I'd like to help in the development of make, if I can, since I
really like make as a build system!

Best regards,
Måns Ansgariusson



reply via email to

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