bugmake - Bugs: bug #38827, Make tool does not work for...


bug #38827: Make tool does not work for pre-build steps with parallel build option

Submitted by:  Sluvy <python12>
Submitted on:  Thu 25 Apr 2013 02:23:24 PM UTC  
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.82Operating System: Any
Fixed Release: NoneTriage Status: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sat 27 Apr 2013 04:39:14 PM UTC, comment #1:

This is not a bug. By declaring dummyfolder to be a prerequisite of my-main-rule, make must either build it or it must already exist. It doesn't exist, and there's no rule to build it (make has no way to know that the pre-build rule will create the dummyfolder target).

Further, although my-main-rule will not start until after pre-build and dummyfolder are both built, there is nothing at all here that says that dummyfolder can't start as soon as possible, before pre-build is complete. So make tries to build dummyfolder and fails.

In general it's best if you never try to have rules do tricky things like build targets which are not specifically declared in makefiles. However, the bug tracker is not the best place for these kinds of discussions. Please request assistance on the -unavailable- mailing list.

Paul D. Smith <psmith>
Project Administrator
Thu 25 Apr 2013 02:23:24 PM UTC, original submission:

Here is a simple makefile to reproduce the bug:

# invoke this makefile with parallel jobs:
# make -j8 all
# 1. the my-main-rule rule has a dependency on the dummyfolder
# 2. the dummyfolder is created during pre-build step
# 3. pre-build rule is a prerequisite for the my-main-rule which means
# my-main-rule executes only if pre-build step finished
# It fails to execute make -j8 all:
# mingw32-make: *** No rule to make target `dummyfolder', needed by `my-main-rule'. Stop.
# mingw32-make: *** Waiting for unfinished jobs....
# ' Before executing PRE BUILD step '
# mkdir dummyfolder
# ' After executing PRE BUILD step '

all: main-build

main-build: pre-build my-main-rule

# Tool invocations
my-main-rule: dummyfolder | pre-build
@echo 'Building target'

-@echo ' Before executing PRE BUILD step '
-mkdir dummyfolder
-@echo ' After executing PRE BUILD step '

Sluvy <python12>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #27938:  makefile added by python12 (880B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by python12 (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 27 Apr 2013 04:39:14 PM UTCpsmithStatusNone=>Not A Bug
    Thu 25 Apr 2013 02:23:24 PM UTCpython12Attached File-=>Added makefile, #27938

    Back to the top

    Powered by Savane 3.1-cleanup