help-make
[Top][All Lists]
Advanced

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

How to resolve implicit dependencies


From: Adrian Muresan
Subject: How to resolve implicit dependencies
Date: Thu, 14 Jul 2016 15:46:17 +0000

I have a makefile(s) that runs fine with --jobs=1 but when I run with --jobs=X 
(X>1) it fails.

I know exactly why; it's because I have entries like this:


t1:

    mkdir d1

    create_makefile.bat > ./d1/makefile


t2:

    cd d1

    make -f makefile


Target t2 depends on t1 but that's not stated in the makefile.

With -j1, this runs fine (because of the order of the targets in the makefile).

However with -jX X>1, I eventually get an error due to race conditions.


I have dozens of makefiles so I need an automated solution to detect these 
implicit dependencies.


The `--print-data-base` doesn't help me because make doesn't detect 
filesystem-level actions i.e.

the `--print-data-base` entry for `t1` won't tell me that `t1` created a 
directory `d1` and a makefile `./d1/makefile` and yes,

I understand that this functionality is outside the scope of `make` but hoping 
that someone has an idea how to solve this.


What I need is an OS utility that will detect every read/write action my build 
performs AND the ability to attribute

those filesystem-level operations to the makefile target that performs them.


I'm in Windows so I found Sysinternals Process Monitor


https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx


but I still need to figure out how to synchronize the two (make and process 
monitor).

Process monitor outputs every single event with microsecond accuracy but I have 
no way of timestamping my targets.


Anyone have a more elegant solution?


There exists a paid solution already - Huddle by Electric-Cloud - but would be 
nice for a free one also.





reply via email to

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