[Gambas-devel] Adding files to component projects

Benoît Minisini gambas at ...1...
Thu Feb 2 11:55:22 CET 2012


Le 02/02/2012 11:39, Randall Morgan a écrit :
> Good morning Benoit,
>
> I do have an understanding of autotools at a very high level.
>
> I understand that the Makefile contains rules for the files to be
> compiled. But I have worked with only the simplest of makefiles, all
> written by hand .  I did do a little research before asking this
> question. I always try to locate the answers myself first. However, I do
> not have a good grasp of the m4 scripting language or it's use in these
> makefiles. I am also a bit paranoid of screwing something else up.... In
> my mind a simple ./reconf should have done it as it looks to me like the
> m4 scripts try to locate all the .c and .h files, and reconf runs
> autoconf. But I did not get an object file, c_complex.o file, when I did
> this. The only dependency on c_complex.c is in the main file's CLASSES
> array. So what have I missed?
>
> Thanks,
>
> Randall
>

You never modify Makefiles or any generated file. This is the job of 
autoconf and automake.

What you must modify is the Makefile.am file. Each time you add a source 
file (*.c, *.cpp or *.h) you must add it to the list of sources files in 
the Makefile.am file, at the line beginning with "gb_gsl_la_SOURCES ="

Then you must regenerate the files, either by running automake or doing 
a './reconf' in the 'gb.gsl' directory. The './reconf' is heavier, as it 
does everything from scratch, but you are sure that everything is 
correctly regenerated.

Regards,

-- 
Benoît Minisini




More information about the Devel mailing list