Re: no rule to make asm targets
Hello, On Fri, Dec 08, 2006 at 01:05:14PM +0200, Jari Strand wrote: > I am sorry that I have to post again but I am still stuck with this > problem. Was it so that the problem should have been fixed after changing > the code to use the global target flags? I hope I have just done something > wrong now, but I need to know in order to figure what to try next. > > Do you have any suggestion for solving this issue, can I post other files? when I saw your last reply, I tried to look to your original post, but I was not able to identify any other problem which I could look at. So I suggest that you make a tarball that shows where you are right now, put it somewhere and post an URL. (Or you can attach it to your mail, if it is small.) It might help if you simplify the example, but it is not necessary. It is much more important that you make the example as self-contained as you can, with a clear description which commands to invoke, what is the result you observe and what is the expected result. List all dependencies on the installed packages, so that it is possible to reproduce your problem. And then hope that a reader of this list will find spare time to look at the issue. (Yes, there is no guarantee that the work you invest into formulating the question will pay off, unfortunately. :-( ) Sorry that we were not able to provide better help. (At least not yet.) Have a nice day, Stepan Kasal
Re: no rule to make asm targets
Hello again, I am sorry that I have to post again but I am still stuck with this problem. Was it so that the problem should have been fixed after changing the code to use the global target flags? I hope I have just done something wrong now, but I need to know in order to figure what to try next. Do you have any suggestion for solving this issue, can I post other files? Thank you. Jari. From: Stepan Kasal <[EMAIL PROTECTED]> To: Jari Strand <[EMAIL PROTECTED]> CC: automake@gnu.org Subject: Re: no rule to make asm targets Date: Wed, 6 Dec 2006 11:52:19 +0100 Hello, On Wed, Dec 06, 2006 at 06:21:09AM +0200, Jari Strand wrote: > >For example, does bin_PROGRAMS really contain only one program? > > Yes, [...] OK, in that case there is no need to use per-target flags. Let me show an example: bin_PROGRAMS = first second third first_SOURCES = first.c second_SOURCES = second.c third_SOURCES = third.c AM_CFLAGS = ... second_CFLAGS = ... In this example, `AM_CFLAGS' is used for all programs, with one exception: when compiling program `third', `third_CFLAGS' is used instead. This `third_CFLAGS' is called per-target variable, and overrides the corresponding general one AM_CFLAGS. The mechanism is the same in your case, when you are using *_CPPFLAGS instead of *_CFLAGS. Since you have only one program, you can set `AM_CPPFLAGS' as needed for the program `editorD', and there is no need to use the override mechanism. Then, because of some internal mechanisms of Automake, the suffix rule `.asm.o' will be used, and you can redefine it if you like. Start with the following code, adding back the things you removed to simplify the example. > >bin_PROGRAMS = editorD > >TLIB_PATH = /home > >AM_CPPFLAGS = -I$(TLIB_PATH)/openal/LINUX -I$(TLIB_PATH)/lungif \ > > -I$(TLIB_PATH)/lungif -I$(TLIB_PATH)/opengl2d3d \ > > -I$(TLIB_PATH)/zlib -I$(TLIB_PATH)/lpng -I$(TLIB_PATH)/ljpeg \ > > -I$(TLIB_PATH)/vorbis/include -DEDITOR_BUILD > >editorD_SOURCES = someSource.cc someAsm.asm > >.asm.o: > > $(NASM_PATH) -o $@ -f elf -dLINUX $< Have a nice day, Stepan Kasal _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Re: no rule to make asm targets
Hello, From: Stepan Kasal <[EMAIL PROTECTED]> To: Jari Strand <[EMAIL PROTECTED]> CC: automake@gnu.org Subject: Re: no rule to make asm targets Date: Wed, 6 Dec 2006 11:52:19 +0100 Hello, On Wed, Dec 06, 2006 at 06:21:09AM +0200, Jari Strand wrote: > >For example, does bin_PROGRAMS really contain only one program? > > Yes, [...] OK, in that case there is no need to use per-target flags. Alright, I was actually planning on supporting more targets later on and now that this didnt work I didnt want rush to add support for more targets. I have now however changed it to not to use the per-target settings but the global (AM_) target. Let me show an example: bin_PROGRAMS = first second third first_SOURCES = first.c second_SOURCES = second.c third_SOURCES = third.c AM_CFLAGS = ... second_CFLAGS = ... In this example, `AM_CFLAGS' is used for all programs, with one exception: when compiling program `third', `third_CFLAGS' is used instead. Thanks for the demonstration! I suppose you meant "second" as that's what you typed but I understand. This `third_CFLAGS' is called per-target variable, and overrides the corresponding general one AM_CFLAGS. The mechanism is the same in your case, when you are using *_CPPFLAGS instead of *_CFLAGS. Since you have only one program, you can set `AM_CPPFLAGS' as needed for the program `editorD', and there is no need to use the override mechanism. Then, because of some internal mechanisms of Automake, the suffix rule `.asm.o' will be used, and you can redefine it if you like. Start with the following code, adding back the things you removed to simplify the example. > >bin_PROGRAMS = editorD > >TLIB_PATH = /home > >AM_CPPFLAGS = -I$(TLIB_PATH)/openal/LINUX -I$(TLIB_PATH)/lungif \ > > -I$(TLIB_PATH)/lungif -I$(TLIB_PATH)/opengl2d3d \ > > -I$(TLIB_PATH)/zlib -I$(TLIB_PATH)/lpng -I$(TLIB_PATH)/ljpeg \ > > -I$(TLIB_PATH)/vorbis/include -DEDITOR_BUILD > >editorD_SOURCES = someSource.cc someAsm.asm > >.asm.o: > > $(NASM_PATH) -o $@ -f elf -dLINUX $< Ok it's changed now and the new object files were built. Unfortunately this did not solve the asm object file problem but the error remains the same. Have a nice day, Stepan Kasal Thank you, good day to you too. Jari. _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Re: no rule to make asm targets
Hello, On Wed, Dec 06, 2006 at 06:21:09AM +0200, Jari Strand wrote: > >For example, does bin_PROGRAMS really contain only one program? > > Yes, [...] OK, in that case there is no need to use per-target flags. Let me show an example: bin_PROGRAMS = first second third first_SOURCES = first.c second_SOURCES = second.c third_SOURCES = third.c AM_CFLAGS = ... second_CFLAGS = ... In this example, `AM_CFLAGS' is used for all programs, with one exception: when compiling program `third', `third_CFLAGS' is used instead. This `third_CFLAGS' is called per-target variable, and overrides the corresponding general one AM_CFLAGS. The mechanism is the same in your case, when you are using *_CPPFLAGS instead of *_CFLAGS. Since you have only one program, you can set `AM_CPPFLAGS' as needed for the program `editorD', and there is no need to use the override mechanism. Then, because of some internal mechanisms of Automake, the suffix rule `.asm.o' will be used, and you can redefine it if you like. Start with the following code, adding back the things you removed to simplify the example. > >bin_PROGRAMS = editorD > >TLIB_PATH = /home > >AM_CPPFLAGS = -I$(TLIB_PATH)/openal/LINUX -I$(TLIB_PATH)/lungif \ > > -I$(TLIB_PATH)/lungif -I$(TLIB_PATH)/opengl2d3d \ > > -I$(TLIB_PATH)/zlib -I$(TLIB_PATH)/lpng -I$(TLIB_PATH)/ljpeg \ > > -I$(TLIB_PATH)/vorbis/include -DEDITOR_BUILD > >editorD_SOURCES = someSource.cc someAsm.asm > >.asm.o: > > $(NASM_PATH) -o $@ -f elf -dLINUX $< Have a nice day, Stepan Kasal
Re: no rule to make asm targets
Hi, From: Stepan Kasal <[EMAIL PROTECTED]> To: Jari Strand <[EMAIL PROTECTED]> CC: automake@gnu.org Subject: Re: no rule to make asm targets Date: Tue, 5 Dec 2006 20:59:50 +0100 Hello, On Tue, Dec 05, 2006 at 07:28:28PM +0200, Jari Strand wrote: > Ralf wrote: > >Generally, you could > >- avoid per-target flags here to avoid the renamed object files, or > >- write manual rules for all those objects, or > >- write the target dependencies on the objects yourself, to control > > the object file names, or > >- use Automake 1.10, and just use its builtin support for assembly > > (but then your source files need to be named *.s/*.S, and you need > > CCAS/CCASFLAGS/AM_CCASFLAGS, and the AM_PROG_AS macro; see the manual) [...] > Ok here is the Slightly modified Makefile.am: well, it depends how much modified it is. For example, does bin_PROGRAMS really contain only one program? Yes, I only changed remove the full path where TLIB_PATH was pointing and removed the files from editorD_SOURCES and added those two imaginary entries and removed many defines from editorD_CPPFLAGS to make it more clear. I could have also removed all the lib paths in AM_CPPFLAGS to make it even more clearer. > bin_PROGRAMS = editorD > > TLIB_PATH = /home > > AM_CPPFLAGS = -I$(TLIB_PATH)/openal/LINUX -I$(TLIB_PATH)/lungif > -I$(TLIB_PATH)/lungif -I$(TLIB_PATH)/opengl2d3d -I$(TLIB_PATH)/zlib > -I$(TLIB_PATH)/lpng -I$(TLIB_PATH)/ljpeg -I$(TLIB_PATH)/vorbis/include > > > CPLUS_INCLUDE_PATH = /usr/include > > editorD_CPPFLAGS = $(AM_CPPFLAGS) -DEDITOR_BUILD > > editorD_SOURCES = \ > someSource.cc \ > someAsm.asm > > SUFFIXES = .asm.o > > ..asm.o: $(NASM_PATH) -o $@ -f elf -dLINUX $< As I said, the `SUFFIXES' variable is redundant in this case. But when it is used, you have to separate the suffixes by whitespace: SUFFIXES = .asm .o Back to your Makefile.am. If it really is that simple, you can apply any of the advices given by Ralf. For example: > - avoid per-target flags here to avoid the renamed object files bin_PROGRAMS = editorD TLIB_PATH = /home AM_CPPFLAGS = -I$(TLIB_PATH)/openal/LINUX -I$(TLIB_PATH)/lungif \ -I$(TLIB_PATH)/lungif -I$(TLIB_PATH)/opengl2d3d \ -I$(TLIB_PATH)/zlib -I$(TLIB_PATH)/lpng -I$(TLIB_PATH)/ljpeg \ -I$(TLIB_PATH)/vorbis/include -DEDITOR_BUILD editorD_SOURCES = someSource.cc someAsm.asm .asm.o: $(NASM_PATH) -o $@ -f elf -dLINUX $< > - write manual rules for all those objects bin_PROGRAMS = editorD TLIB_PATH = /home AM_CPPFLAGS = -I$(TLIB_PATH)/openal/LINUX -I$(TLIB_PATH)/lungif \ -I$(TLIB_PATH)/lungif -I$(TLIB_PATH)/opengl2d3d \ -I$(TLIB_PATH)/zlib -I$(TLIB_PATH)/lpng -I$(TLIB_PATH)/ljpeg \ -I$(TLIB_PATH)/vorbis/include editorD_CPPFLAGS = $(AM_CPPFLAGS) -DEDITOR_BUILD editorD_SOURCES = someSource.cc someAsm.asm editorD-someAsm.o: someAsm.asm $(NASM_PATH) -o $@ -f elf -dLINUX $< If you think that these advices are not appliable in your case, post a less simplified version of Makefile.am. Alright, I can do that but could you tell me how to use global-target flags, instead of the per-target? Because this is the only way I have learned to do things from a tutorial. > PS: I hope I got that Cc right now? Yes, you did. Have a nice day, Stepan Kasal Thanks for the help! Jari. _ Don't just search. Find. Check out the new MSN Search! http://search.msn.com/
Re: no rule to make asm targets
Hello, On Tue, Dec 05, 2006 at 07:28:28PM +0200, Jari Strand wrote: > Ralf wrote: > >Generally, you could > >- avoid per-target flags here to avoid the renamed object files, or > >- write manual rules for all those objects, or > >- write the target dependencies on the objects yourself, to control > > the object file names, or > >- use Automake 1.10, and just use its builtin support for assembly > > (but then your source files need to be named *.s/*.S, and you need > > CCAS/CCASFLAGS/AM_CCASFLAGS, and the AM_PROG_AS macro; see the manual) [...] > Ok here is the Slightly modified Makefile.am: well, it depends how much modified it is. For example, does bin_PROGRAMS really contain only one program? > bin_PROGRAMS = editorD > > TLIB_PATH = /home > > AM_CPPFLAGS = -I$(TLIB_PATH)/openal/LINUX -I$(TLIB_PATH)/lungif > -I$(TLIB_PATH)/lungif -I$(TLIB_PATH)/opengl2d3d -I$(TLIB_PATH)/zlib > -I$(TLIB_PATH)/lpng -I$(TLIB_PATH)/ljpeg -I$(TLIB_PATH)/vorbis/include > > > CPLUS_INCLUDE_PATH = /usr/include > > editorD_CPPFLAGS = $(AM_CPPFLAGS) -DEDITOR_BUILD > > editorD_SOURCES = \ > someSource.cc \ > someAsm.asm > > SUFFIXES = .asm.o > > ..asm.o: $(NASM_PATH) -o $@ -f elf -dLINUX $< As I said, the `SUFFIXES' variable is redundant in this case. But when it is used, you have to separate the suffixes by whitespace: SUFFIXES = .asm .o Back to your Makefile.am. If it really is that simple, you can apply any of the advices given by Ralf. For example: > - avoid per-target flags here to avoid the renamed object files bin_PROGRAMS = editorD TLIB_PATH = /home AM_CPPFLAGS = -I$(TLIB_PATH)/openal/LINUX -I$(TLIB_PATH)/lungif \ -I$(TLIB_PATH)/lungif -I$(TLIB_PATH)/opengl2d3d \ -I$(TLIB_PATH)/zlib -I$(TLIB_PATH)/lpng -I$(TLIB_PATH)/ljpeg \ -I$(TLIB_PATH)/vorbis/include -DEDITOR_BUILD editorD_SOURCES = someSource.cc someAsm.asm .asm.o: $(NASM_PATH) -o $@ -f elf -dLINUX $< > - write manual rules for all those objects bin_PROGRAMS = editorD TLIB_PATH = /home AM_CPPFLAGS = -I$(TLIB_PATH)/openal/LINUX -I$(TLIB_PATH)/lungif \ -I$(TLIB_PATH)/lungif -I$(TLIB_PATH)/opengl2d3d \ -I$(TLIB_PATH)/zlib -I$(TLIB_PATH)/lpng -I$(TLIB_PATH)/ljpeg \ -I$(TLIB_PATH)/vorbis/include editorD_CPPFLAGS = $(AM_CPPFLAGS) -DEDITOR_BUILD editorD_SOURCES = someSource.cc someAsm.asm editorD-someAsm.o: someAsm.asm $(NASM_PATH) -o $@ -f elf -dLINUX $< If you think that these advices are not appliable in your case, post a less simplified version of Makefile.am. > PS: I hope I got that Cc right now? Yes, you did. Have a nice day, Stepan Kasal
Re: no rule to make asm targets
From: Ralf Wildenhues <[EMAIL PROTECTED]> To: Jari Strand <[EMAIL PROTECTED]> CC: automake@gnu.org Subject: Re: no rule to make asm targets Date: Tue, 5 Dec 2006 07:32:34 +0100 * Jari Strand wrote on Tue, Dec 05, 2006 at 04:03:01AM CET: > >From: Ralf Wildenhues <[EMAIL PROTECTED]> > > > >Please keep the mailing list in Cc:. Thanks. > > I am sorry because I don't know what Cc means? It means that, when you reply, you should also send a copy of the message to the automake mailing list. That way, everyone can look at the discussion, help, learn, and I can find old messages easily. > >* Jari Strand wrote on Mon, Dec 04, 2006 at 02:09:10PM CET: > >> Are you saying that there should be no identation after the > >> .asm.o: line? > > > >No. The error you made was the doubled period. Instead of writing > >this: > >..asm.o: > >You should be writing this: > >.asm.o: > I see thank you, that was actually just a typo, it was correctly typed in > the Makefile.am. OK. > >SUFFIXES = .asm .o > > > >This helps automake detect the list of suffixes; it will then set it > >correctly for make. > > Alright I have put that SUFFICES line in but it did not help. (I assume that this is yet another typo, right? SUFFIXES vs. SUFFICES.) Right it was a typo ,sorry about those. > I wonder what is wrong and it bugs me that all of the .o files generate are > name like buildName-fileName.o instead of just filename.o . It probably > doesnt matter but I thought that I should ask at the same time if it's > possible to set the output location of the generated .o files? Ahh. Now we're getting closer. You have per-target compilation flags, right? Then an inference rule won't do. Please post your Makefile.am, that may help pointing out ways out. That makes sense. Generally, you could - avoid per-target flags here to avoid the renamed object files, or - write manual rules for all those objects, or - write the target dependencies on the objects yourself, to control the object file names, or - use Automake 1.10, and just use its builtin support for assembly (but then your source files need to be named *.s/*.S, and you need CCAS/CCASFLAGS/AM_CCASFLAGS, and the AM_PROG_AS macro; see the manual) Hope that helps. Cheers, Ralf Ok here is the Slightly modified Makefile.am: bin_PROGRAMS = editorD TLIB_PATH = /home AM_CPPFLAGS = -I$(TLIB_PATH)/openal/LINUX -I$(TLIB_PATH)/lungif -I$(TLIB_PATH)/lungif -I$(TLIB_PATH)/opengl2d3d -I$(TLIB_PATH)/zlib -I$(TLIB_PATH)/lpng -I$(TLIB_PATH)/ljpeg -I$(TLIB_PATH)/vorbis/include CPLUS_INCLUDE_PATH = /usr/include editorD_CPPFLAGS = $(AM_CPPFLAGS) -DEDITOR_BUILD editorD_SOURCES = \ someSource.cc \ someAsm.asm SUFFIXES = .asm.o ..asm.o: $(NASM_PATH) -o $@ -f elf -dLINUX $< that's located in sub directory called engine and in the root dir I have Makefile.am that has only one line: SUBDIRS = engine Thanks! PS: I hope I got that Cc right now? _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Re: no rule to make asm targets
* Jari Strand wrote on Tue, Dec 05, 2006 at 04:03:01AM CET: > >From: Ralf Wildenhues <[EMAIL PROTECTED]> > > > >Please keep the mailing list in Cc:. Thanks. > > I am sorry because I don't know what Cc means? It means that, when you reply, you should also send a copy of the message to the automake mailing list. That way, everyone can look at the discussion, help, learn, and I can find old messages easily. > >* Jari Strand wrote on Mon, Dec 04, 2006 at 02:09:10PM CET: > >> Are you saying that there should be no identation after the > >> .asm.o: line? > > > >No. The error you made was the doubled period. Instead of writing > >this: > >..asm.o: > >You should be writing this: > >.asm.o: > I see thank you, that was actually just a typo, it was correctly typed in > the Makefile.am. OK. > >SUFFIXES = .asm .o > > > >This helps automake detect the list of suffixes; it will then set it > >correctly for make. > > Alright I have put that SUFFICES line in but it did not help. (I assume that this is yet another typo, right? SUFFIXES vs. SUFFICES.) > I wonder what is wrong and it bugs me that all of the .o files generate are > name like buildName-fileName.o instead of just filename.o . It probably > doesnt matter but I thought that I should ask at the same time if it's > possible to set the output location of the generated .o files? Ahh. Now we're getting closer. You have per-target compilation flags, right? Then an inference rule won't do. Please post your Makefile.am, that may help pointing out ways out. Generally, you could - avoid per-target flags here to avoid the renamed object files, or - write manual rules for all those objects, or - write the target dependencies on the objects yourself, to control the object file names, or - use Automake 1.10, and just use its builtin support for assembly (but then your source files need to be named *.s/*.S, and you need CCAS/CCASFLAGS/AM_CCASFLAGS, and the AM_PROG_AS macro; see the manual) Hope that helps. Cheers, Ralf
Re: no rule to make asm targets
Hello, On Mon, Dec 04, 2006 at 02:19:35PM +0100, Ralf Wildenhues wrote: > In a plain Makefile, you'd do that with this line: > > .SUFFIXES: .asm .o > > In a Makefile.am, you instead write this: > > SUFFIXES = .asm .o but it is not necessary in normal cases[*], Automake can deduce the suffixes from the rules, and generate the .SUFFIXES: line. Have a nice day, Stepan Kasal Footnote: [*] "Normal case" means here that each suffix starts with a dot and does not contain any other dot.
Re: no rule to make asm targets
Hello Jari, Please keep the mailing list in Cc:. Thanks. * Jari Strand wrote on Mon, Dec 04, 2006 at 02:09:10PM CET: > >From: Ralf Wildenhues <[EMAIL PROTECTED]> > >* Jari Strand wrote on Sun, Dec 03, 2006 at 08:08:04PM CET: > >> > >> ..asm.o: > > > >This line should be (minus the indentation): > > .asm.o: > >>nasm -o $@ -f elf -dLINUX $< > > > >If you do the effort of defining NASM_PATH above, then you should use it > >here, no? > >$(NASM_PATH) -o $@ -f elf -dLINUX $< > > > > Are you saying that there should be no identation after the > .asm.o: line? No. The error you made was the doubled period. Instead of writing this: ..asm.o: $(NASM_PATH) -o $@ -f elf -dLINUX $< You should be writing this: .asm.o: $(NASM_PATH) -o $@ -f elf -dLINUX $< (I was merely trying to point out that my post contained indentation). And it seems I forgot to add that you need to set the suffixes list. In a plain Makefile, you'd do that with this line: .SUFFIXES: .asm .o In a Makefile.am, you instead write this: SUFFIXES = .asm .o This helps automake detect the list of suffixes; it will then set it correctly for make. Hope that helps. Cheers, Ralf
Re: no rule to make asm targets
Hello Jari, * Jari Strand wrote on Sun, Dec 03, 2006 at 08:08:04PM CET: > > dnl Check for nasm > AC_PATH_PROG(NASM_PATH, nasm, no) > AC_SUBST(NASM_PATH) > if test x$NASM_PATH = xno; then > AC_MSG_WARN(Couldn't find nasm) > HAVE_NASM="no" > else AC_DEFINE(HAVE_NASM, 1, [Define if NASM, the netwide assembler, is > available]) > HAVE_NASM="yes" > fi > > AM_CONDITIONAL(HAVE_NASM, test "x$HAVE_NASM" = "xyes") > And this is what I have in Makefile.am: > > ..asm.o: This line should be (minus the indentation): .asm.o: > nasm -o $@ -f elf -dLINUX $< If you do the effort of defining NASM_PATH above, then you should use it here, no? $(NASM_PATH) -o $@ -f elf -dLINUX $< But hard-coding elf and LINUX won't make your package very portable (in case that's what you're intending). Hope that helps. Cheers, Ralf