GNOME Bugzilla – Bug 450604
Anjuta does not expand variables inside Makefile.am
Last modified: 2008-01-22 14:25:23 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 !
(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.
(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.
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"
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.
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 !
It only affects few projects. Reducing priority and severity
Moving to right component.
Changing description. This bug is mostly about comment #5 as this is obviously a gnome-build fault. gnome-build should expand those variables.
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.
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.
Created attachment 103438 [details] [review] Fix expanding of SUBDIRS and treatment of variables, remove check_LTLIBRARIES restriction
(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
Thanks for the patch. gnucash-trunk seems now be shown correctly here. Marking this as fixed!