Gnu Make Two Step

Find Tips and tricks on how to better use the Zeus editor. Feel free to post your
own tips but please do not post bug reports, feature requests or questions here.
bfmitch
Posts: 1
Joined: Mon Jun 13, 2005 5:04 pm

Gnu Make Two Step

Postby bfmitch » Mon Jun 13, 2005 5:17 pm

I am using this with the WinARM toolset. It's an expansion on someone else's suggestion for getting output from Gnu Make. Since I had the same problem as Gnu Make, I figure this should fix it for that too.

First. Create two files.
mymake.cmd and mymake.bat

mymake.cmd looks like this:

Code: Select all

@echo off
command /c mymake.bat %1


If you happen to have 4NT or 4DOS, you can use them instead of command.exe.

mymake.bat looks like this:

Code: Select all

@echo off
if [%1]==[all] make all
if [%1]==[program] make program
if [%1]==[clean] make clean
exit


In my workspace options I have:
Make Command Line = mymake.cmd program
Rebuild Command Line = mymake.cmd all
Clean Command Line = mymake.cmd clean

For you ARM folks, this even works when the lpc21isp.exe program is called from within the makefile. I just have to click in the screen for the Project Make tab to have the interactive prompts show up.

jussij
Site Admin
Posts: 2229
Joined: Fri Aug 13, 2004 5:10 pm

Postby jussij » Fri Dec 25, 2009 12:10 am

Here are the details about the reported problem with the GNU make utility, with an alternative but less effective work around ;)

Cheers Jussi

engicoder
Posts: 10
Joined: Wed May 18, 2011 1:54 pm

cmd.exe

Postby engicoder » Thu May 19, 2011 5:36 am

As command.exe is no more, here is yet another two step method that will work with Gnu Make and cmd.exe

As with bfmitch's method, create two files (my names are different :D ):

gnumake.cmd

Code: Select all

@echo off
start /min /w gnumake2.cmd %1 %2
type gnumake.out
del gnumake.out


gnumake2.cmd

Code: Select all

@echo off
make -f %1 %2 > gnumake.out
exit


In the Workspace Options Dialog, the command line is:
    Make Command Line: gnumake project.mak all

where project.mak is the makefile and all is the make target.

Caveat: The output does not appear in Zeus until make has completed. To see a running status of make, remove the /min switch from the start command. This will result in a new CMD window opening and displaying make execution and output.

This modified two step works because the start command gives make its own environment, and handles, so that it does not corrupt the output capture of Zeus. As such, this method should work with any tool that generates the DuplicateHandle(In) failed (e=6) error.

Ben
Last edited by engicoder on Thu May 19, 2011 1:05 pm, edited 1 time in total.

jussij
Site Admin
Posts: 2229
Joined: Fri Aug 13, 2004 5:10 pm

Postby jussij » Thu May 19, 2011 7:08 am

Hi Ben,

Thank you for taking the time to updating this post with your more up to date information.

Much appreciated :)

Cheers Jussi


Return to “Tutorials, Tips and Tricks”

Who is online

Users browsing this forum: vticaohoyb, vytuhcljv and 0 guests