After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 450604 - Anjuta does not expand variables inside Makefile.am
Anjuta does not expand variables inside Makefile.am
Status: RESOLVED FIXED
Product: gnome-build
Classification: Deprecated
Component: libgbf_am
0.1.x
Other Linux
: Low minor
: ---
Assigned To: gnome-build Maintainers List
gnome-build Maintainers List
Depends on:
Blocks:
 
 
Reported: 2007-06-24 13:27 UTC by administrator
Modified: 2008-01-22 14:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix expanding of SUBDIRS and treatment of variables, remove check_LTLIBRARIES restriction (2.02 KB, patch)
2008-01-22 14:01 UTC, 28872d13
committed Details | Review

Description administrator 2007-06-24 13:27:39 UTC
Hello !

If somebody like I try to build "gphpedit" inside anjuta then the builded programm itself is showed in the Project Window as a executable programm !

http://www.bilder-speicher.de/07062415242617.vollbild.html

However if somebody try to build "gnucash" inside anjuta then the builded programm itself is not showed in the Project Window. 
It even cant be run inside anjuta after successfull building of the programm.

http://www.bilder-speicher.de/07062415558152.vollbild.html

Can somebody confirm that bug in anjuta ?

The way to produce this error is normally

mkdir -p $HOME/development/gnucash
mkdir -p $HOME/development/gnucash/build

cd $HOME/development/gnucash
svn checkout http://svn.gnucash.org/repo/gnucash/trunk

Run autogenerate from Anjuta.
Run configuration from Anjuta.
In the anjuta configuration window write the following config options

"--prefix=$HOME/developemt/gnucash/build --enable-debug --enable-doxygen
--enable-error-on-warning --enable-compile-warnings"

Compile the Programm
Install the Programm

Try to run the Programm inside anjuta !
Comment 1 Naba Kumar 2007-06-24 14:59:08 UTC
(In reply to comment #0)
> Hello !
> 
> If somebody like I try to build "gphpedit" inside anjuta then the builded
> programm itself is showed in the Project Window as a executable programm !
> 
> http://www.bilder-speicher.de/07062415242617.vollbild.html
> 
> However if somebody try to build "gnucash" inside anjuta then the builded
> programm itself is not showed in the Project Window. 
> It even cant be run inside anjuta after successfull building of the programm.
> 
> http://www.bilder-speicher.de/07062415558152.vollbild.html
> 
> Can somebody confirm that bug in anjuta ?
> 
I don't understand the difference. In both cases, you said you are building it inside anjuta. Can you clarify what is the difference? Perhaps give step by step instructions for both the cases.

> "--prefix=$HOME/developemt/gnucash/build --enable-debug --enable-doxygen
> --enable-error-on-warning --enable-compile-warnings"
> 
This won't work inside Anjuta because the dialog won't resolve shell variables. Try using the value of $HOME.
Comment 2 administrator 2007-06-24 16:15:40 UTC
(In reply to comment #1)
> I don't understand the difference. In both cases, you said you are building it
> inside anjuta. Can you clarify what is the difference?

Hello Naba !

The difference is that in the "gphpedit" Project window you have the Binary
for the Programm "gphpedit" showed or better listed and in the "gnucash" Project window you don't have the Binary that was builded inside Anjuta for the Programm "gnucash" even it was builded with anjuta like gphpedit !

Here is the Picture that show in the "gphpedit" Project window the "gphpedit" binary entry !
http://www.bilder-speicher.de/07062415242617.vollbild.html

And here is the Picture that don't show in the "gnucash" Project window the builded Binary entry for GNU-Cash.
Without this entry the Programm itself can't be run from Anjuta.
Try as example Menu->Build->Run Programm to start gnucash from anjuta.
You will fail !
http://www.bilder-speicher.de/07062415558152.vollbild.html

> > "--prefix=$HOME/developemt/gnucash/build --enable-debug --enable-doxygen
> > --enable-error-on-warning --enable-compile-warnings"
> > 
> This won't work inside Anjuta because the dialog won't resolve shell variables.
> Try using the value of $HOME.

Sorry this was a copy & paste error from my side at the time i filled the Bug.
In Anjuta i have allready given the full right path.
Comment 3 administrator 2007-06-24 16:24:16 UTC
What i want also say is
that typing this here in the command line after "gnucash" was successfull builded with anjuta works like expected
"$Home/development/gnucash/build/bin/gnucash"
Comment 4 Naba Kumar 2007-06-24 17:34:52 UTC
I am quoting the email I replied in case of gnucash:

The problem here is that the script only reads Makefile.am. In case of gnucash, those variables are determined later after running configuration. There is currently no reliable way to read those variables before configure. Also after configure, anjuta does not peek inside Makefile and evaluate the variables.

I am afraid this can't be solved in a straight forward manner. You can fix gnucash build to not use variables in SUBDIRS and instead depending on automake conditionals to build directories conditionally. Check out anjuta sources for a similar setup.
Comment 5 administrator 2007-06-24 17:59:16 UTC
From my side of view your comment could be true !
It looks very well that gnome-build is involved in this bug.

If you click on this picture here 
http://www.bilder-speicher.de/07062419131272.vollbild.html

you will see a entry with the following name
"${REALSRCS}"

From my side of view this entry is false.
You can find the text "${REALSRCS}" only in the following
Files

http://svn.gnucash.org/trac/browser/gnucash/trunk/lib/glib28

Makefile
Makefile.in
Makefile.am

The problem is NABA if ANJUTA dont provide the possibility to auto Import Project
without to change the source code of a Project then the amount of users how will
use Anjuta for developing will be very small better limited.

Anjuta should solve this problem other wise anjuta will be only a half working Application !
Comment 6 Naba Kumar 2007-06-24 21:42:45 UTC
It only affects few projects. Reducing priority and severity
Comment 7 Naba Kumar 2007-06-24 21:43:46 UTC
Moving to right component.
Comment 8 Johannes Schmid 2008-01-18 10:02:00 UTC
Changing description. This bug is mostly about comment #5 as this is obviously a gnome-build fault. gnome-build should expand those variables.
Comment 9 28872d13 2008-01-22 13:27:54 UTC
Just a quick note:
This problem is split into three parts:
1. ${REALSRCS} is not resolved. Should be easy to fix.
2. The second if statement in src/Makefile.am overwrites the first one and so GUI_SUBDIRS etc. is ignored. Suggested fix: Ignore the if statement (current behaviour), but append the data only if a variable exists already and preserve the original contents.
3. Variables in SUBDIRS don't get resolved before it is analyzed. Should be easy to fix.
Comment 10 28872d13 2008-01-22 13:52:36 UTC
Ok, it seems like point 2 was wrong: gnome-build already behaves like it should. After fixing points 1 and 3, it complained that check_LTLIBRARIES was wrong - which isn't the case anymore according to [1]. Having removed this restriction, I think that all targets correctly show up in anjuta now.
Comment 11 28872d13 2008-01-22 14:01:11 UTC
Created attachment 103438 [details] [review]
Fix expanding of SUBDIRS and treatment of variables, remove check_LTLIBRARIES restriction
Comment 12 28872d13 2008-01-22 14:02:04 UTC
(In reply to comment #10)
> wrong - which isn't the case anymore according to [1]. Having removed this
Oops.

[1] http://sourceware.org/ml/automake/1999-04/msg00135.html
Comment 13 Johannes Schmid 2008-01-22 14:25:23 UTC
Thanks for the patch. gnucash-trunk seems now be shown correctly here. Marking this as fixed!