c++.command-line - make vs. smake
- Laurentiu Pancescu (15/15) Sep 08 2001 Which should I use, smake or make? Are there any issues
- Walter (9/24) Sep 08 2001 smake is most useful if you're used to Microsoft nmake. I tend to use ma...
- Laurentiu Pancescu (18/24) Sep 10 2001 I already knew about this solution, it's widely used (NASM
- Jan Knepper (5/32) Sep 10 2001 I think the & problem can be fixed by prefixing them with ^, thus use
- Laurentiu Pancescu (3/7) Sep 10 2001 Thanks, it worked!! :)
- Jan Knepper (5/13) Sep 11 2001 Cool!
- Walter (2/39) Sep 10 2001
- Rajiv Bhagwat (8/53) Sep 11 2001 The linker responce file also requires a blank line (for missing additio...
- Walter (2/58) Sep 11 2001
- Rajiv Bhagwat (17/18) Sep 11 2001 Ha! That one worked. ;) Cheating the linker with 2 non-existing librarie...
- Walter (3/22) Sep 12 2001 just
Which should I use, smake or make? Are there any issues related to using smake, like copyright, or maybe people using the free version not having it? smake has a very useful option for inline generating of response files, with <<. For example: OBJS: file1.obj file2.obj test.exe: $(OBJS) sc -o$ << $(OBJS) << If I have very many files, the command line limit may be exceeded, so automatic generation of linker response files, like above, is very useful. How can I do this in make? Not by "echo file1.obj >> link.lst", or similar, of course... ;-) Laurentiu
Sep 08 2001
smake is most useful if you're used to Microsoft nmake. I tend to use make myself because it is simpler, and I write simple makefiles. To get make to generate response files: foo.exe : foo.obj bar.obj foo.rsp link foo.rsp foo.rsp: makefile echo foo,foo+ >foo.rsp echo bar; >>foo.rsp Laurentiu Pancescu wrote in message <9ne4v6$d6j$1 digitaldaemon.com>...Which should I use, smake or make? Are there any issues related to using smake, like copyright, or maybe people using the free version not having it? smake has a very useful option for inline generating of response files, with <<. For example: OBJS: file1.obj file2.obj test.exe: $(OBJS) sc -o$ << $(OBJS) << If I have very many files, the command line limit may be exceeded, so automatic generation of linker response files, like above, is very useful. How can I do this in make? Not by "echo file1.obj >> link.lst", or similar, of course... ;-) Laurentiu
Sep 08 2001
"Walter" <walter digitalmars.com> wrote:To get make to generate response files: foo.exe : foo.obj bar.obj foo.rsp link foo.rsp foo.rsp: makefile echo foo,foo+ >foo.rsp echo bar; >>foo.rspI already knew about this solution, it's widely used (NASM makefile for lcc-win32 uses it, for example: they even have a cute comment about repeated spawning of COMMAND.COM slowing things down :) - thanks anyway! The problem I encountered is with V, which needs to call LIB. Unfortunately, the echo approach doesn't work in this case: LIB response files want & as a continuation character, and you just can't create this with echo! '&' seems to have some special meaning to MS shell (at least Win2k's CMD.EXE), and I wasn't able to produce it in an echo-ed file (not with %&, \&, &&, nothing helped). Would it be a too much effort to add SMAKE style automatic file generation to your MAKE? Borland's MAKE also has it, and I think it's a nice feature. Of course, I could use SMAKE, but it happens that I like your MAKE better... ;) Regards, Laurentiu
Sep 10 2001
I think the & problem can be fixed by prefixing them with ^, thus use ^& (That's what I vaguely remember) Jan Laurentiu Pancescu wrote:"Walter" <walter digitalmars.com> wrote:To get make to generate response files: foo.exe : foo.obj bar.obj foo.rsp link foo.rsp foo.rsp: makefile echo foo,foo+ >foo.rsp echo bar; >>foo.rspI already knew about this solution, it's widely used (NASM makefile for lcc-win32 uses it, for example: they even have a cute comment about repeated spawning of COMMAND.COM slowing things down :) - thanks anyway! The problem I encountered is with V, which needs to call LIB. Unfortunately, the echo approach doesn't work in this case: LIB response files want & as a continuation character, and you just can't create this with echo! '&' seems to have some special meaning to MS shell (at least Win2k's CMD.EXE), and I wasn't able to produce it in an echo-ed file (not with %&, \&, &&, nothing helped). Would it be a too much effort to add SMAKE style automatic file generation to your MAKE? Borland's MAKE also has it, and I think it's a nice feature. Of course, I could use SMAKE, but it happens that I like your MAKE better... ;) Regards, Laurentiu
Sep 10 2001
Jan Knepper <jan smartsoft.cc> wrote:I think the & problem can be fixed by prefixing them with ^, thus use ^& (That's what I vaguely remember) JanThanks, it worked!! :) Laurentiu
Sep 10 2001
Cool! I didn't even take drugs to remember it! Or may be I did remember it because I never took drugs! <g> Jan Laurentiu Pancescu wrote:Jan Knepper <jan smartsoft.cc> wrote:I think the & problem can be fixed by prefixing them with ^, thus use ^& (That's what I vaguely remember) JanThanks, it worked!! :) Laurentiu
Sep 11 2001
The ^& works in my tests. -Walter Jan Knepper wrote in message <3B9D0FA7.30F56E7D smartsoft.cc>...I think the & problem can be fixed by prefixing them with ^, thus use ^& (That's what I vaguely remember) Jan Laurentiu Pancescu wrote:"Walter" <walter digitalmars.com> wrote:To get make to generate response files: foo.exe : foo.obj bar.obj foo.rsp link foo.rsp foo.rsp: makefile echo foo,foo+ >foo.rsp echo bar; >>foo.rspI already knew about this solution, it's widely used (NASM makefile for lcc-win32 uses it, for example: they even have a cute comment about repeated spawning of COMMAND.COM slowing things down :) - thanks anyway! The problem I encountered is with V, which needs to call LIB. Unfortunately, the echo approach doesn't work in this case: LIB response files want & as a continuation character, and you just can't create this with echo! '&' seems to have some special meaning to MS shell (at least Win2k's CMD.EXE), and I wasn't able to produce it in an echo-ed file (not with %&, \&, &&, nothing helped). Would it be a too much effort to add SMAKE style automatic file generation to your MAKE? Borland's MAKE also has it, and I think it's a nice feature. Of course, I could use SMAKE, but it happens that I like your MAKE better... ;) Regards, Laurentiu
Sep 10 2001
The linker responce file also requires a blank line (for missing additional libs). How do you get that one? echo >> file echo "" >> file etc does not work. - Rajiv Walter <walter digitalmars.com> wrote in message news:9njsqd$iis$2 digitaldaemon.com...The ^& works in my tests. -Walter Jan Knepper wrote in message <3B9D0FA7.30F56E7D smartsoft.cc>...I think the & problem can be fixed by prefixing them with ^, thus use ^& (That's what I vaguely remember) Jan Laurentiu Pancescu wrote:"Walter" <walter digitalmars.com> wrote:To get make to generate response files: foo.exe : foo.obj bar.obj foo.rsp link foo.rsp foo.rsp: makefile echo foo,foo+ >foo.rsp echo bar; >>foo.rspI already knew about this solution, it's widely used (NASM makefile for lcc-win32 uses it, for example: they even have a cute comment about repeated spawning of COMMAND.COM slowing things down :) - thanks anyway! The problem I encountered is with V, which needs to call LIB. Unfortunately, the echo approach doesn't work in this case: LIB response files want & as a continuation character, and you just can't create this with echo! '&' seems to have some special meaning to MS shell (at least Win2k's CMD.EXE), and I wasn't able to produce it in an echo-ed file (not with %&, \&, &&, nothing helped). Would it be a too much effort to add SMAKE style automatic file generation to your MAKE? Borland's MAKE also has it, and I think it's a nice feature. Of course, I could use SMAKE, but it happens that I like your MAKE better... ;) Regards, Laurentiu
Sep 11 2001
Just use a comma, not a blank line. -Walter Rajiv Bhagwat wrote in message <9nkf33$tpm$1 digitaldaemon.com>...The linker responce file also requires a blank line (for missing additional libs). How do you get that one? echo >> file echo "" >> file etc does not work. - Rajiv Walter <walter digitalmars.com> wrote in message news:9njsqd$iis$2 digitaldaemon.com...The ^& works in my tests. -Walter Jan Knepper wrote in message <3B9D0FA7.30F56E7D smartsoft.cc>...I think the & problem can be fixed by prefixing them with ^, thus use ^& (That's what I vaguely remember) Jan Laurentiu Pancescu wrote:"Walter" <walter digitalmars.com> wrote:To get make to generate response files: foo.exe : foo.obj bar.obj foo.rsp link foo.rsp foo.rsp: makefile echo foo,foo+ >foo.rsp echo bar; >>foo.rspI already knew about this solution, it's widely used (NASM makefile for lcc-win32 uses it, for example: they even have a cute comment about repeated spawning of COMMAND.COM slowing things down :) - thanks anyway! The problem I encountered is with V, which needs to call LIB. Unfortunately, the echo approach doesn't work in this case: LIB response files want & as a continuation character, and you just can't create this with echo! '&' seems to have some special meaning to MS shell (at least Win2k's CMD.EXE), and I wasn't able to produce it in an echo-ed file (not with %&, \&, &&, nothing helped). Would it be a too much effort to add SMAKE style automatic file generation to your MAKE? Borland's MAKE also has it, and I think it's a nice feature. Of course, I could use SMAKE, but it happens that I like your MAKE better... ;) Regards, Laurentiu
Sep 11 2001
Ha! That one worked. ;) Cheating the linker with 2 non-existing libraries, uh? Thanks. For record, I could use the 'echo' for creating detail lines for IMPORTS section of a .def file, (these lines start with spaces or tabs) as echo just eats up the first space and copies everything out. With 'echo' being an in-built command, I guess this has to be the portable (and efficient) way of creating uniform makefiles. All these days I was using an ancient Borland 'maker' for sc projects, with yet another way for creating response files. Thanks for all the clarifications. -- Rajiv Oh: It looks like 'echo' is not always a built in command for 'make', some versions use the shell? Walter <walter digitalmars.com> wrote in message news:9nl9o2$1cbd$1 digitaldaemon.com...Just use a comma, not a blank line. -Walter---- clipped ---
Sep 11 2001
In MAKE, the echo command is implemented with system(). Rajiv Bhagwat wrote in message <9nmtnq$27vs$1 digitaldaemon.com>...Ha! That one worked. ;) Cheating the linker with 2 non-existing libraries, uh? Thanks. For record, I could use the 'echo' for creating detail lines for IMPORTS section of a .def file, (these lines start with spaces or tabs) as echojusteats up the first space and copies everything out. With 'echo' being an in-built command, I guess this has to be the portable (and efficient) way of creating uniform makefiles. All these days I was using an ancient Borland 'maker' for sc projects, with yet another way for creating response files. Thanks for all the clarifications. -- Rajiv Oh: It looks like 'echo' is not always a built in command for 'make', some versions use the shell? Walter <walter digitalmars.com> wrote in message news:9nl9o2$1cbd$1 digitaldaemon.com...Just use a comma, not a blank line. -Walter---- clipped ---
Sep 12 2001