Bug 36385

Summary: crunchgen(1) does not handle Makefiles with includes properly
Product: Base System Reporter: Sam Leffler <sam>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
kientzle_crunchgen.diff none

Description Sam Leffler 2002-03-27 21:10:01 UTC
     crunchgen does not properly handle Makefiles that have relative includes because it runs the Makefile from the current directory instead of the source directory when generating the list of object files

Fix: 

A patch can be found in http://www.errno.com/patches/crunchgen.patch.  This causes the make command used to generate the obj list to be done in the srcdir.  This patch also includes a -d option to aid in debugging problems like this and support for PR misc/33778.
How-To-Repeat:       Try to run crunchgen on /usr/ports/security/isakmpd; notice that it does not get the value of SRCS set properly because the .include's of features/<mumble> fail (silently because the Makefile checks if the file exists before including it). This is because crunchgen generates a temp Makefile in /tmp and then does make -f <temp makefile> from the current working directory.
Comment 1 Murray Stokely freebsd_committer freebsd_triage 2002-03-28 11:27:54 UTC
Responsible Changed
From-To: freebsd-bugs->murray

I would very much like to see something like this added so we can 
clean up the ugliness I added to src/sbin/dhclient/Makefile in 
-CURRENT.
Comment 2 Murray Stokely freebsd_committer freebsd_triage 2002-04-14 14:10:01 UTC
Responsible Changed
From-To: murray->luigi

Luigi imported a similar change to -CURRENT.  Can you please look to 
see how this interacts with the work you are doing in this area, 
Luigi?
Comment 3 kientzle 2002-11-20 04:49:57 UTC
Luigi,

I sent this patch in to Nate before
I noticed the open PR on this issue.
I think the attached diff fixes it.
Would you please try it?

Among other issues, this bug makes
it impossible to build a crunchgen
binary containing 'csh', which is
necessary for a project I'm working
on.  The attached patch seems to
address that.

Tim Kientzle
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:51 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped