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.
Try to set following macros: USAGE_LICENSE= "[-author?A]" "[-copyright?C]" "[-license?W]" Project system does not support macros value. Example was taken from OpenSolaris project. Command line for compiling with the macros likes to: cc -DUSAGE_LICENSE=' "[-author?A]" "[-copyright?C]" "[-license?W]" ' .... Usage of macros in cource code like this: static const char usage[] = "[-?\n@(#)$Id: msgcpp (AT&T Research) 2002-03-11 $\n]" USAGE_LICENSE "[+NAME?msgcpp - C language message catalog preprocessor]" ;
I'm not I understand in what context you mean. What are the steps that goes wrong? If I go to the Preprocessor Definitions in the properties and set USAGE_LICENSE=' "[-author?A]" "[-copyright?C]" "[-license?W]" ' it compiles the ode like this: gcc -c -g -DUSAGE_LICENSE=' "[-author?A]" "[-copyright?C]" "[-license?W]" ' -o build/Debug/GNU-MacOSX/src/args.o src/args.c It seems correct to me. So, where is it it goes wrong?
If macros value is USAGE_LICENSE= "[-author?A]" "[-copyright?C]" "[-license?W]" Project system return two macros: USAGE_LICENSE= "[-author?A]" "[-copyright?C]" "[-license?W]" If macros value is USAGE_LICENSE=' "[-author?A]" "[-copyright?C]" "[-license?W]" ' Project system returns USAGE_LICENSE=' "[-author?A]" "[-copyright?C]" "[-license?W]" ' It wrong too because macros value does not contain beginning and ending quotes.
See return vector in method Item.getUserMacroDefinitions() I think that project should change interface to keep macros. 1. String as macros storage is a bad idea. I propose a list of pairs (String,String). 2. Macros persistence should change macros delimiter. For example new line is more suitable for delimiter. Now macros storage do not provide a clear method for setting macros with single and double quotes.
Fixed: changeset 6a4a75d29872 in main details: http://hg.netbeans.org/main?cmd=changeset;node=6a4a75d29872 changeset e3683bc6fba2 in main details: http://hg.netbeans.org/main?cmd=changeset;node=e3683bc6fba2 changeset 199dd55063ac in main details: http://hg.netbeans.org/main?cmd=changeset;node=199dd55063ac Changed macros from StringConfiguration to VectorConfiguration. Macros are now stored as a list of single macros instead of a combined string and project system don't parse the values (that's where it went wrong). To keep old API (used by ProjectBridge) getCCCompilerConfiguration().getPreprocessorConfiguration().setValue((String)macros) I added the following method VectorConfiguration.setValue(String s) but deprecated it. The following API should be used instead to avoid re-parsing of the macros: VectorConfiguration.setValue(Vector v) getCCCompilerConfiguration().getPreprocessorConfiguration().setValue(Vector v)
As this is an API contract (called by external client), please, change Vector to List in interface (and Vector to ArrayList in impl to prevent expensive syncronization of Vector class)
Done: changeset 9f7fdca54a09 in main details: http://hg.netbeans.org/main?cmd=changeset;node=9f7fdca54a09 changeset febe562d1ff5 in main details: http://hg.netbeans.org/main?cmd=changeset;node=febe562d1ff5
fix duplicated strings in configuration: changeset fd7ced5eb54d in main details: http://hg.netbeans.org/main?cmd=changeset;node=fd7ced5eb54d