|
View:
New views
18 Messages
—
Rating Filter:
Alert me
|
|
|
removing a source file for the dist ruleHey, we have added an option to our configuration stuff that concatenates all the source files, creates another from one from them, and compiles it. The problem is that this new source file is automatically added to the source files that are added in the tar ball. We have modified DIST_SOURCES so that it contains only the requested files to add in the tar ball, but automake gives a warning about DIST_SOURCES and that variable is not described in the automake manual (using it works, though). So I would like to kow how i can remove that new file from the files added to the tar ball, or what is the good way to specify the files to add (as DIST_SOURCES seems to not be to good way) thank you Vincent Torri |
|
|
Re: removing a source file for the dist ruleHello Vincent,
* Vincent Torri wrote on Wed, Nov 04, 2009 at 07:52:17PM CET: > we have added an option to our configuration stuff that concatenates > all the source files, creates another from one from them, and > compiles it. The problem is that this new source file is > automatically added to the source files that are added in the tar > ball. > > We have modified DIST_SOURCES so that it contains only the requested > files to add in the tar ball, but automake gives a warning about > DIST_SOURCES and that variable is not described in the automake > manual (using it works, though). Can you just show a small example setup instead of complicated words to describe it? Thanks. > So I would like to kow how i can remove that new file from the files > added to the tar ball, or what is the good way to specify the files > to add (as DIST_SOURCES seems to not be to good way) You can do lots of things with a dist-hook. Cheers, Ralf |
|
|
Re: removing a source file for the dist ruleOn Wed, 4 Nov 2009, Ralf Wildenhues wrote: > Hello Vincent, > > * Vincent Torri wrote on Wed, Nov 04, 2009 at 07:52:17PM CET: >> we have added an option to our configuration stuff that concatenates >> all the source files, creates another from one from them, and >> compiles it. The problem is that this new source file is >> automatically added to the source files that are added in the tar >> ball. >> >> We have modified DIST_SOURCES so that it contains only the requested >> files to add in the tar ball, but automake gives a warning about >> DIST_SOURCES and that variable is not described in the automake >> manual (using it works, though). > > Can you just show a small example setup instead of complicated words > to describe it? Thanks. http://pastebin.ca/1657110 It's the Makefile.am file we use and is not that big. Vincent Torri |
|
|
Re: removing a source file for the dist rule* Vincent Torri wrote on Wed, Nov 04, 2009 at 08:05:34PM CET:
> On Wed, 4 Nov 2009, Ralf Wildenhues wrote: > >* Vincent Torri wrote on Wed, Nov 04, 2009 at 07:52:17PM CET: > >>we have added an option to our configuration stuff that concatenates > >>all the source files, creates another from one from them, and > >>compiles it. The problem is that this new source file is > >>automatically added to the source files that are added in the tar > >>ball. > >> > >>We have modified DIST_SOURCES so that it contains only the requested > >>files to add in the tar ball, but automake gives a warning about > >>DIST_SOURCES and that variable is not described in the automake > >>manual (using it works, though). > > > >Can you just show a small example setup instead of complicated words > >to describe it? Thanks. > > http://pastebin.ca/1657110 > > It's the Makefile.am file we use and is not that big. pastebins suck a bit because somebody reading this thread some months down the road will not be able to see it. Anyway. You can simply add the generated file to nodist_libeet_la_SOURCES instead of to libeet_la_SOURCES. If I were you, I'd replace the first half of the generated file eet_amalgamation.c with an #include "header-for-the-big-source-file.h" and then I'd try to get my other headers to be idempotent so that you can replace the rest with a loop for f in $(libeet_la_SOURCES); do \ case $$f in \ *.c) echo '#include "$$f"' >> $@;; \ esac; \ done and if you don't need to cater to lots of different compiler versions, then I'd just use a compiler/linker that can do whole-program/link-time optimization (like GCC 4.5 will, and some others also do), and forget about this hack. Cheers, Ralf |
|
|
Re: removing a source file for the dist ruleOn Wed, 4 Nov 2009, Ralf Wildenhues wrote: > * Vincent Torri wrote on Wed, Nov 04, 2009 at 08:05:34PM CET: >> On Wed, 4 Nov 2009, Ralf Wildenhues wrote: >>> * Vincent Torri wrote on Wed, Nov 04, 2009 at 07:52:17PM CET: >>>> we have added an option to our configuration stuff that concatenates >>>> all the source files, creates another from one from them, and >>>> compiles it. The problem is that this new source file is >>>> automatically added to the source files that are added in the tar >>>> ball. >>>> >>>> We have modified DIST_SOURCES so that it contains only the requested >>>> files to add in the tar ball, but automake gives a warning about >>>> DIST_SOURCES and that variable is not described in the automake >>>> manual (using it works, though). >>> >>> Can you just show a small example setup instead of complicated words >>> to describe it? Thanks. >> >> http://pastebin.ca/1657110 >> >> It's the Makefile.am file we use and is not that big. > > pastebins suck a bit because somebody reading this thread some months > down the road will not be able to see it. Anyway. ok, i'll not do it in the future. > You can simply add the generated file to nodist_libeet_la_SOURCES > instead of to libeet_la_SOURCES. indeed. Actually, i used nodistcheck_libeet_la_SOURCES so that make distcheck passes too. > If I were you, I'd replace the first half of the generated file > eet_amalgamation.c with an > #include "header-for-the-big-source-file.h" > > and then I'd try to get my other headers to be idempotent so that you > can replace the rest with a loop > for f in $(libeet_la_SOURCES); do \ > case $$f in \ > *.c) echo '#include "$$f"' >> $@;; \ > esac; \ > done I'll check that. > and if you don't need to cater to lots of different compiler versions, > then I'd just use a compiler/linker that can do whole-program/link-time > optimization (like GCC 4.5 will, and some others also do), and forget > about this hack. Yes, I know that gcc 4.5 will make that hack useless. But it is not available and will not during the next 5 months, i think (it's still in stage 3). As the libraries can be compiled on Windows with mingw, and as the mingw guys will not provide gcc 4.5 in the next 10 years, we keep it (but disabled by default). In addition, it speeds up the compilation with MSYS a *lot* (of course). thank you very much Vincent Torri |
|
|
Re: removing a source file for the dist ruleOn Wed, 4 Nov 2009, Vincent Torri wrote: > > > On Wed, 4 Nov 2009, Ralf Wildenhues wrote: > >> You can simply add the generated file to nodist_libeet_la_SOURCES >> instead of to libeet_la_SOURCES. > > indeed. Actually, i used nodistcheck_libeet_la_SOURCES so that make distcheck > passes too. Actually, it seems that automake does not like nodistcheck_libeet_la_SOURCES : src/lib/Makefile.am:152: variable `nodistcheck_libeet_la_SOURCES' is defined but no program or src/lib/Makefile.am:152: library has `nodistcheck_libeet_la' as canonical name (possible typo) is there a better way to do that ? Vincent Torri |
|
|
Re: removing a source file for the dist rule* Vincent Torri wrote on Wed, Nov 04, 2009 at 10:30:08PM CET:
> >On Wed, 4 Nov 2009, Ralf Wildenhues wrote: > > > >>You can simply add the generated file to nodist_libeet_la_SOURCES > >>instead of to libeet_la_SOURCES. > > > >indeed. Actually, i used nodistcheck_libeet_la_SOURCES so that > >make distcheck passes too. > > Actually, it seems that automake does not like > nodistcheck_libeet_la_SOURCES : nodist_, not nodistcheck_. Please, read the manual, info Automake "Fine-grained Distribution Control" |
|
|
Re: removing a source file for the dist ruleOn Wed, 4 Nov 2009, Ralf Wildenhues wrote: > * Vincent Torri wrote on Wed, Nov 04, 2009 at 10:30:08PM CET: >>> On Wed, 4 Nov 2009, Ralf Wildenhues wrote: >>> >>>> You can simply add the generated file to nodist_libeet_la_SOURCES >>>> instead of to libeet_la_SOURCES. >>> >>> indeed. Actually, i used nodistcheck_libeet_la_SOURCES so that >>> make distcheck passes too. >> >> Actually, it seems that automake does not like >> nodistcheck_libeet_la_SOURCES : > > nodist_, not nodistcheck_. Please, read the manual, > info Automake "Fine-grained Distribution Control" yes, i've remarked that after having seen the automake warning. But using just nodist_ is not sufficient : make distcheck fails: make[2]: *** No rule to make target `eet_amalgamation.c', needed by `distdir'. Stop. Vincent Torri |
|
|
Re: removing a source file for the dist rule* Vincent Torri wrote on Wed, Nov 04, 2009 at 10:48:33PM CET:
> yes, i've remarked that after having seen the automake warning. But > using just nodist_ is not sufficient : make distcheck fails: > > make[2]: *** No rule to make target `eet_amalgamation.c', needed by `distdir'. Stop. We need to see the exact Makefile.am corresponding to this warning (or a small reproducible example) to be able to help. Cheers, Ralf |
|
|
Re: removing a source file for the dist ruleOn Thu, 5 Nov 2009, Ralf Wildenhues wrote: > * Vincent Torri wrote on Wed, Nov 04, 2009 at 10:48:33PM CET: >> yes, i've remarked that after having seen the automake warning. But >> using just nodist_ is not sufficient : make distcheck fails: >> >> make[2]: *** No rule to make target `eet_amalgamation.c', needed by `distdir'. Stop. > > We need to see the exact Makefile.am corresponding to this warning (or a > small reproducible example) to be able to help. The code is below. I have run: make distclean ./configure make distcheck and the error above appears. Vincent Torri MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_builddir)/src/lib \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @EVIL_CFLAGS@ \ @EINA_CFLAGS@ \ @EET_CPPFLAGS@ \ @EFL_EET_BUILD@ \ @EFL_COVERAGE_CFLAGS@ \ @OPENSSL_CFLAGS@ \ @GNUTLS_CFLAGS@ include_HEADERS = Eet.h lib_LTLIBRARIES = libeet.la base_sources = \ eet_lib.c \ eet_data.c \ eet_image.c \ eet_cipher.c \ eet_dictionary.c \ eet_node.c \ eet_utils.c if EET_AMALGAMATION eet_sources_used = eet_amalgamation.c BUILT_SOURCES = eet_amalgamation.c eet_amalgamation.c: $(base_sources) Makefile -rm -f eet_amalgamation.c @echo "foo" >> eet_amalgamation.c else eet_sources_used = $(base_sources) endif nodist_libeet_la_SOURCES = eet_amalgamation.c libeet_la_SOURCES = $(eet_sources_used) libeet_la_CFLAGS = @EET_CFLAGS@ @DEBUG_CFLAGS@ libeet_la_LIBADD = @GNUTLS_LIBS@ @OPENSSL_LIBS@ @EFL_COVERAGE_LIBS@ @EET_LIBS@ @EINA_LIBS@ @EVIL_LIBS@ -lz -ljpeg -lm libeet_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ EXTRA_DIST = Eet_private.h clean-local: @rm -rf *.gcno eet_amalgamation.c |
|
|
Re: removing a source file for the dist rule* Vincent Torri wrote on Thu, Nov 05, 2009 at 08:06:51AM CET:
> >>using just nodist_ is not sufficient : make distcheck fails: > >> > >>make[2]: *** No rule to make target `eet_amalgamation.c', needed by `distdir'. Stop. > if EET_AMALGAMATION > eet_sources_used = eet_amalgamation.c > BUILT_SOURCES = eet_amalgamation.c > > eet_amalgamation.c: $(base_sources) Makefile > -rm -f eet_amalgamation.c > > @echo "foo" >> eet_amalgamation.c > > else > eet_sources_used = $(base_sources) > endif > > nodist_libeet_la_SOURCES = eet_amalgamation.c Put this line inside the 'if EET_AMALGAMATION'. Cheers, Ralf |
|
|
Re: removing a source file for the dist ruleOn Thu, 5 Nov 2009, Ralf Wildenhues wrote: > * Vincent Torri wrote on Thu, Nov 05, 2009 at 08:06:51AM CET: >>>> using just nodist_ is not sufficient : make distcheck fails: >>>> >>>> make[2]: *** No rule to make target `eet_amalgamation.c', needed by `distdir'. Stop. > >> if EET_AMALGAMATION >> eet_sources_used = eet_amalgamation.c >> BUILT_SOURCES = eet_amalgamation.c >> >> eet_amalgamation.c: $(base_sources) Makefile >> -rm -f eet_amalgamation.c >> >> @echo "foo" >> eet_amalgamation.c >> >> else >> eet_sources_used = $(base_sources) >> endif >> >> nodist_libeet_la_SOURCES = eet_amalgamation.c > > Put this line inside the 'if EET_AMALGAMATION'. Same error Vincent Torri |
|
|
Re: removing a source file for the dist rule* Vincent Torri wrote on Thu, Nov 05, 2009 at 10:23:38AM CET:
> On Thu, 5 Nov 2009, Ralf Wildenhues wrote: > >* Vincent Torri wrote on Thu, Nov 05, 2009 at 08:06:51AM CET: > >>>>using just nodist_ is not sufficient : make distcheck fails: > >>>> > >>>>make[2]: *** No rule to make target `eet_amalgamation.c', needed by `distdir'. Stop. [...] > >>nodist_libeet_la_SOURCES = eet_amalgamation.c > > > >Put this line inside the 'if EET_AMALGAMATION'. > > Same error Oops. Sorry about that, that was untested. By this: if EET_AMALGAMATION eet_sources_used = eet_amalgamation.c [...] else eet_sources_used = $(base_sources) endif nodist_libeet_la_SOURCES = eet_amalgamation.c libeet_la_SOURCES = $(eet_sources_used) you are adding eet_amalgamation.c to $(libeet_la_SOURCES) even if EET_AMALGAMATION is true, which means it should be distributed. Let's add it only to nodist_libeet_la_SOURCES. Also, BUILT_SOURCES is only strictly necessary for included files (where in the first round, make cannot know what they are needed for), so you can simplify to something like this: base_sources = ... if EET_AMALGAMATION libeet_la_SOURCES = eet_amalgamation.c eet_amalgamation.c: Makefile rule to make it ... else libeet_la_SOURCES = $(base_sources) endif Also, note that eet_amalgamation.c does not need to depend on $(base_sources) if you managed to change the code to #include all the .c files (instead of grepping their code). Cheers, Ralf |
|
|
Re: removing a source file for the dist ruleOn Thu, 5 Nov 2009, Ralf Wildenhues wrote: >>>>>> make[2]: *** No rule to make target `eet_amalgamation.c', needed by `distdir'. Stop. > [...] > > base_sources = ... > if EET_AMALGAMATION > libeet_la_SOURCES = eet_amalgamation.c > eet_amalgamation.c: Makefile > rule to make it ... > > else > libeet_la_SOURCES = $(base_sources) > endif still no luck :) I paste the code below. I did a make maintainer-clean, then ./autogen.sh, then make distcheck, to be sure that i restart from something clean. Vincent Torri base_sources = \ eet_lib.c \ eet_data.c \ eet_image.c \ eet_cipher.c \ eet_dictionary.c \ eet_node.c \ eet_utils.c if EET_AMALGAMATION libeet_la_SOURCES = eet_amalgamation.c eet_amalgamation.c: $(base_sources) Makefile -rm -f eet_amalgamation.c @echo "foo" >> eet_amalgamation.c else libeet_la_SOURCES = $(base_sources) endif libeet_la_CFLAGS = @EET_CFLAGS@ @DEBUG_CFLAGS@ libeet_la_LIBADD = @GNUTLS_LIBS@ @OPENSSL_LIBS@ @EFL_COVERAGE_LIBS@ @EET_LIBS@ @EINA_LIBS@ @EVIL_LIBS@ -lz -ljpeg -lm libeet_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ |
|
|
Re: removing a source file for the dist rule* Vincent Torri wrote on Thu, Nov 05, 2009 at 11:38:52PM CET:
> still no luck :) I paste the code below. I did a make > maintainer-clean, then ./autogen.sh, then make distcheck, to be sure > that i restart from something clean. > base_sources = \ [...] > if EET_AMALGAMATION > libeet_la_SOURCES = eet_amalgamation.c nodist_ missing here. With that it should work. I did test the source before the last message, but must have made an error when replying. Sorry. > eet_amalgamation.c: $(base_sources) Makefile > -rm -f eet_amalgamation.c > > @echo "foo" >> eet_amalgamation.c > > else > libeet_la_SOURCES = $(base_sources) > endif |
|
|
Re: removing a source file for the dist ruleOn Thu, 5 Nov 2009, Ralf Wildenhues wrote: > * Vincent Torri wrote on Thu, Nov 05, 2009 at 11:38:52PM CET: >> still no luck :) I paste the code below. I did a make >> maintainer-clean, then ./autogen.sh, then make distcheck, to be sure >> that i restart from something clean. > >> base_sources = \ > [...] >> if EET_AMALGAMATION >> libeet_la_SOURCES = eet_amalgamation.c > > nodist_ missing here. With that it should work. I did test the source > before the last message, but must have made an error when replying. still the same error with if EET_AMALGAMATION libeet_la_SOURCES = eet_amalgamation.c nodist_libeet_la_SOURCES = eet_amalgamation.c i also put nodist_ everywhere (in the else part, outside), and i still have the error. Vincent Torri |
|
|
Re: removing a source file for the dist rule* Vincent Torri wrote on Fri, Nov 06, 2009 at 12:57:43AM CET:
> On Thu, 5 Nov 2009, Ralf Wildenhues wrote: > >* Vincent Torri wrote on Thu, Nov 05, 2009 at 11:38:52PM CET: > >>base_sources = \ > >[...] > >>if EET_AMALGAMATION > >>libeet_la_SOURCES = eet_amalgamation.c > > > >nodist_ missing here. With that it should work. I did test the source > >before the last message, but must have made an error when replying. > > still the same error with > > if EET_AMALGAMATION > libeet_la_SOURCES = eet_amalgamation.c > nodist_libeet_la_SOURCES = eet_amalgamation.c > > i also put nodist_ everywhere (in the else part, outside), and i > still have the error. No, I meant that eet_amalgamation.c should *only* be listed in the nodist_libeet_la_SOURCES = eet_amalgamation.c line, not in the libeet_la_SOURCES variable. |
|
|
Re: removing a source file for the dist ruleOn Fri, 6 Nov 2009, Ralf Wildenhues wrote: > * Vincent Torri wrote on Fri, Nov 06, 2009 at 12:57:43AM CET: >> On Thu, 5 Nov 2009, Ralf Wildenhues wrote: >>> * Vincent Torri wrote on Thu, Nov 05, 2009 at 11:38:52PM CET: >>>> base_sources = \ >>> [...] >>>> if EET_AMALGAMATION >>>> libeet_la_SOURCES = eet_amalgamation.c >>> >>> nodist_ missing here. With that it should work. I did test the source >>> before the last message, but must have made an error when replying. >> >> still the same error with >> >> if EET_AMALGAMATION >> libeet_la_SOURCES = eet_amalgamation.c >> nodist_libeet_la_SOURCES = eet_amalgamation.c >> >> i also put nodist_ everywhere (in the else part, outside), and i >> still have the error. > > No, I meant that eet_amalgamation.c should *only* be listed in the > nodist_libeet_la_SOURCES = eet_amalgamation.c > > line, not in the libeet_la_SOURCES variable. haaaaa, ok ! It works ! finally :) thank you very much Vincent Torri |
| Free embeddable forum powered by Nabble | Forum Help |