This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 197975

Summary: Projects from 6.9 do not build because of invalid $(MAKE) reference
Product: cnd Reporter: mwisnicki <mwisnicki>
Component: ProjectAssignee: Vladimir Voskresensky <vv159170>
Status: VERIFIED FIXED    
Severity: normal CC: apepin, dbrank0
Priority: P2    
Version: 7.0   
Hardware: PC   
OS: Other   
Issue Type: DEFECT Exception Reporter:
Attachments: the project to reproduce the bug
project created with nb 6.9.1

Description mwisnicki 2011-04-22 00:00:15 UTC
Upgraded from 6.9 to 7.0 now my remote project does not build:

 exec: $(MAKE): not found

Going to project properties and resetting make commands to default turns $(MAKE) into ${MAKE} and now everything works.
Comment 1 Vladimir Voskresensky 2011-04-22 15:49:39 UTC
Thomas, please, looks like we forgot to convert parens into curlies when loading pre-70 projects
Comment 2 Thomas Preisler 2011-04-22 21:30:08 UTC
Problem confirmed: if you in NB 6.9.1 and earlier versions create a Project with existing Sources (Automatic mode), the build commands uses $(MAKE) (regular parenthesis) which is not a problem in these versions of NB but in NB 7.0 the build commands are now executed as shell commands and the make macro syntax is causing problems for the shell. In 7.0 we use curly parenthesizes which is accepted by both make and shell but 7.0 doesn't work with a 6.9.1 project. 

Work-around is to manually change $(MAKE) to ${MAKE} in the project properties and things should be fine.

I will implement a fix that automatically detects the former style in build commands and convert them into the latter.

I also found two cases (qt projects) where we still used $(MAKE) in 7.0. I fixed both.
Comment 3 Thomas Preisler 2011-04-22 23:22:02 UTC
Fixed:


changeset:   192879:9e8a18e984c6
user:        Thomas Preisler <thp@netbeans.org>
date:        Fri Apr 22 16:20:23 2011 -0700
summary:     #197975 - Projects from 6.9 do not build because of invalid $(MAKE) reference
Comment 4 Thomas Preisler 2011-04-27 18:06:12 UTC
*** Bug 197937 has been marked as a duplicate of this bug. ***
Comment 5 Alexander Pepin 2011-05-13 12:27:19 UTC
fix failed in trunk build 20110513
Thomas, please fix it ASAP.
Comment 6 Thomas Preisler 2011-05-13 20:03:15 UTC
My fix is in trunk (just verified it) and it also does work for me. At least my test case works. Two questions:

What are the fill build/clean command? Pls copy/paste into here.

What is the project version number?

Can you pls attach the project that is failing?
Comment 7 Thomas Preisler 2011-05-13 20:28:54 UTC
Here is how I have tested it:

- Create Project With Existing Sources with a NB 6.9. Project has (MAKE) in build command. Project version is 69.
- Open the project with latest trunk build and the build command should automatically been converted to use {MAKE}. Check the properties. 
- Build the project, and it should build fine.
Comment 8 Alexander Pepin 2011-05-16 10:04:25 UTC
Created attachment 108313 [details]
the project to reproduce the bug
Comment 9 Alexander Pepin 2011-05-16 10:06:07 UTC
Thomas, I use absolutely the same steps as you do. I use nb 6.9.1 to create a project with existing source then open it using the latest NB from trunk or even from branch 7.0.1 and the project version is changing from 69 to 79. But in my case
Build Command: $(MAKE) -f Makefile
Clean Command: $(Make) -f Makefile Clean

I've attached my project.
Comment 10 Alexander Pepin 2011-05-17 10:54:47 UTC
Created attachment 108351 [details]
project created with nb 6.9.1

Here is the makefile based project created on my Ubuntu using NB 6.9.1
Comment 11 Vladimir Voskresensky 2011-05-17 11:18:32 UTC
Looks like Thomas have not pushed fix mentioned in http://netbeans.org/bugzilla/show_bug.cgi?id=197975#c3
Comment 12 Vladimir Voskresensky 2011-05-17 11:20:14 UTC
http://hg.netbeans.org/releases/rev/1c26e8429af7

Please, verify in 7.0.1
Comment 13 Vladimir Voskresensky 2011-05-17 11:23:06 UTC
i18
http://hg.netbeans.org/releases/rev/092f00549594
Comment 14 Alexander Pepin 2011-05-17 12:13:07 UTC
verified in dev cnd build #5382 on 20110517
Please push the fix into patch branch.
Comment 15 Vladimir Voskresensky 2011-05-17 15:05:02 UTC
Thomas,
Please, review the fix.
Comment 16 Vladimir Voskresensky 2011-05-17 17:54:44 UTC
1c26e8429af7 transplanted to 151e5c6e10dd
092f00549594 transplanted to 7c9b60624b04
spec version:
http://hg.netbeans.org/releases/rev/db29546cb780
Comment 17 Quality Engineering 2011-05-20 08:53:19 UTC
Integrated into 'main-golden', will be available in build *201105200400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/24c2db60dcad
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #197975 - Projects from 6.9 do not build because of invalid $(MAKE) reference
(transplanted from 1c26e8429af702ca65d3c9c70cc233ba09f61863)
Comment 18 Alexander Pepin 2011-05-20 10:10:44 UTC
verified in patch1 candidate
Comment 19 Alexander Pepin 2011-07-06 13:55:43 UTC
Should be added to test scenarios.