??? 02/12/08 15:44 Read: times |
#150661 - reply and an example Responding to: ???'s previous message |
Erik Malund said:
I have 47 different makes from the same source. Actually, don't you have 47 different .bat files? nope, see below With make, you could parameterise a single makefile to build all your variants - though, of course, that may well end up more complicated than just having 47 different .bat files... two issues 1) I, most often, only want to make one 2) I also have a .bat that makes them all erik an example @echo off call wipes cd ..\bs @ECHO OFF if not exist cmplst.txt goto nocmdl del cmplst.txt :nocmdl xcopy ..\ss\*.c *.* >..\trash\trashbin xcopy ..\ss\*.h *.* >..\trash\trashbin xcopy ..\ss\*.a51 *.* >..\trash\trashbin xcopy ..\ss\*.inc *.* >..\trash\trashbin REM XX xcopy C:\ams\*.h *.* >..\trash\trashbin REM XX rem xcopy C:\ams\*.inc *.* >..\trash\trashbin xcopy C:\aglobal\keil.h *.* >..\trash\trashbin xcopy C:\aglobal\cyf120.h *.* >..\trash\trashbin xcopy C:\aglobal\cyf120.inc *.* >..\trash\trashbin xcopy C:\aglobal\c51s.lib *.* >..\trash\trashbin if "%MUSDEB%"=="0" goto setmdb goto setno :setmdb @ECHO ON REM ********** DEBUG INFO IN FILE ********** @ECHO OFF copy ..\ss\cond\dbgflad.h dbgflga.inc >..\trash\trashbin copy ..\ss\cond\dbgflcd.h debflgc.h >..\trash\trashbin goto setdn f :setno copy ..\ss\cond\dbgflan.h dbgflga.inc >..\trash\trashbin copy ..\ss\cond\dbgflcn.h debflgc.h >..\trash\trashbin :setdn if "%MUSTYP%"=="a" goto typac if "%MUSTYP%"=="t" goto typsa goto typmiss :typac copy ..\ss\fmt\typa.h typ.h >..\trash\trashbin @echo on rem ACTIVE CONVERTER 50 MHz @ECHO OFF copy ..\ssa\SACports.h Sports.h >..\trash\trashbin copy ..\ssa\SACdefs.h Sdefs.h >..\trash\trashbin copy ..\ssa\MSrecs.h *.* >..\trash\trashbin copy ..\ssa\SACstart.a51 *.* >..\trash\trashbin copy ..\ssa\SACisr.c *.* >..\trash\trashbin copy ..\ssa\SACiic.c *.* >..\trash\trashbin copy ..\ssa\SACmain.c *.* >..\trash\trashbin copy ..\ssa\SACccode.c *.* >..\trash\trashbin copy ..\ssa\SACcrout.c *.* >..\trash\trashbin copy ..\ssa\SACselect.h Sselect.h >..\trash\trashbin copy ..\ssa\SACxdata.a51 *.* >..\trash\trashbin copy ..\ssa\SACzdata.a51 *.* >..\trash\trashbin copy ..\ssa\SACarout.a51 *.* >..\trash\trashbin copy ..\ssa\SACacode.a51 *.* >..\trash\trashbin copy ..\ssa\SACfmtbs.c *.* >..\trash\trashbin goto fetbrd :typsa copy ..\ss\fmt\typm.h typ.h >..\trash\trashbin @echo on rem STAL232 @ECHO OFF copy ..\sstal\STAports.h Sports.h >..\trash\trashbin copy ..\sstal\STAfstru.h *.* >..\trash\trashbin copy ..\sstal\STAccode.c >..\trash\trashbin copy ..\sstal\STAacode.a51 Sacode.a51 >..\trash\trashbin copy ..\sstal\STAcrout.c *.* >..\trash\trashbin copy ..\sstal\STAxdata.a51 *.* >..\trash\trashbin copy ..\sstal\STAzdata.a51 *.* >..\trash\trashbin copy ..\sstal\STAarout.a51 *.* >..\trash\trashbin copy ..\sstal\STAfmtbs.c *.* >..\trash\trashbin copy ..\sstal\*.h *.* >..\trash\trashbin copy ..\sstal\STAdefs.h Sdefs.h >..\trash\trashbin copy ..\sstal\STAselect.h Sselect.h >..\trash\trashbin REM XX copy ..\sstal\STAgchar.c STAgchar.c >..\trash\trashbin copy ..\sstal\STAbmap.c STAbmap.c >..\trash\trashbin copy ..\sstal\STAstart.a51 STAstart.a51 >..\trash\trashbin copy ..\sstal\STAisr.c STAisr.c >..\trash\trashbin copy ..\sstal\STAiic.c STAiic.c >..\trash\trashbin copy ..\sstal\STAmain.c STAmain.c >..\trash\trashbin goto fetbrd :fetbrd if "%MUSMFG%"=="a" goto setac if "%MUSMFG%"=="m" goto setml rem if "%MUSMFG%"=="n" goto setla if "%MUSMFG%"=="o" goto setma if "%MUSMFG%"=="p" goto setaa goto mfmiss :setac copy ..\ss\fmt\mfga.h mfg.h >..\trash\trashbin @echo on rem AMELI COLOR REM XX @ECHO OFF goto fetwdt :setml copy ..\ss\fmt\mfgm.h mfg.h >..\trash\trashbin @echo on rem MIXED SIGN AMELI COLOR AMELI_AMBER @ECHO OFF goto fetwdt REM XX :setla REM XX xcopy ..\ss\fmt\mfgn.h mfg.h >..\trash\trashbin REM XX @echo on REM XX rem LV_COLOR (DEAD FORMAT) REM XX @ECHO OFF REM XX goto fetwdt REM XX :setma copy ..\ss\fmt\mfgo.h mfg.h >..\trash\trashbin @echo on rem LV amber @ECHO OFF goto fetwdt :setaa copy ..\ss\fmt\mfgp.h mfg.h >..\trash\trashbin @echo on rem AMELI_AMBER @ECHO OFF goto fetwdt :fetwdt REM XX if "%MUSWDT%"=="a" goto setwa REM XX if "%MUSWDT%"=="b" goto setwb if "%MUSWDT%"=="c" goto setwc if "%MUSWDT%"=="d" goto setwd if "%MUSWDT%"=="e" goto setwe if "%MUSWDT%"=="f" goto setwf if "%MUSWDT%"=="g" goto setwg if "%MUSWDT%"=="h" goto setwh if "%MUSWDT%"=="i" goto setwi if "%MUSWDT%"=="j" goto setwj if "%MUSWDT%"=="k" goto setwk REM XX if "%MUSWDT%"=="l" goto setwl if "%MUSWDT%"=="z" goto setwz goto wdtmiss REM XX REM XX :setwa REM XX xcopy ..\ss\fmt\wdta.h wdt.h >..\trash\trashbin REM XX @echo on REM XX rem WIDTH = 160, TWO PLUGS REM XX rem HUH ????????????????/ width = a REM XX SET musspl=2 REM XX @ECHO OFF REM XX goto fethgt REM XX REM XX :setwb REM XX copy ..\ss\fmt\wdtb.h wdt.h >..\trash\trashbin REM XX @echo on REM XX rem WIDTH = 96, ONE PLUG REM XX rem HUH ??????????????????? width =96 REM XX pause REM XX goto getout :setwc copy ..\ss\fmt\wdtc.h wdt.h >..\trash\trashbin @echo on rem WIDTH = 72, ONE PLUG @ECHO OFF SET musspl=1 goto fethgt :setwd copy ..\ss\fmt\wdtd.h wdt.h >..\trash\trashbin @echo on rem WIDTH = 28, ONE PLUG @ECHO OFF SET musspl=1 goto fethgt :setwe copy ..\ss\fmt\wdte.h wdt.h >..\trash\trashbin @echo on rem WIDTH = 40, ONE PLUG @ECHO OFF SET musspl=1 goto fethgt :setwf copy ..\ss\fmt\wdtf.h wdt.h >..\trash\trashbin @echo on rem WIDTH = 112, TWO PLUGS REM XX @ECHO OFF SET musspl=2 goto fethgt :setwg copy ..\ss\fmt\wdtg.h wdt.h >..\trash\trashbin @echo on rem WIDTH = 24, ONE PLUG @ECHO OFF SET musspl=1 goto fethgt :setwh copy ..\ss\fmt\wdth.h wdt.h >..\trash\trashbin @echo on rem WIDTH = 56, ONE PLUG @ECHO OFF SET musspl=1 goto fethgt :setwi copy ..\ss\fmt\wdti.h wdt.h >..\trash\trashbin @echo on rem WIDTH = 48, ONE PLUG @ECHO OFF SET musspl=1 goto fethgt :setwj copy ..\ss\fmt\wdtj.h wdt.h >..\trash\trashbin @echo on rem WIDTH = 200, TWO PLUGS @ECHO OFF SET musspl=1 goto fethgt :setwk copy ..\ss\fmt\wdtk.h wdt.h >..\trash\trashbin @echo on rem WIDTH = 108, ONE PLUG @ECHO OFF SET musspl=1 goto fethgt REM XX :setwl REM XX copy ..\ss\fmt\wdtl.h wdt.h >..\trash\trashbin REM XX @echo on REM XX rem WIDTH = 84, ONE PLUG REM XX @ECHO OFF REM XX SET musspl=1 REM XX goto fethgt :setwz copy ..\ss\fmt\wdtz.h wdt.h >..\trash\trashbin @echo on rem WIDTH = 156, TWO PLUGs MIXED @ECHO OFF SET musspl=3 goto fethgt :fethgt if "%MUSHGT%"=="a" goto setha if "%MUSHGT%"=="b" goto sethb if "%MUSHGT%"=="c" goto sethc if "%MUSHGT%"=="d" goto sethd REM XX if "%MUSHGT%"=="z" goto sethz REM XX goto hgtmiss REM XX REM XX :setha copy ..\ss\fmt\hgta.h hgt.h >..\trash\trashbin @echo on rem Height = 16, VERT SPLIT @ECHO OFF if "%MUSMFG%"=="a" goto set88xc @echo on rem BAD FORMAT 05 ???????????????????????????????????????? @ECHO OFF goto set88xa :set88xc if "%MUSSPL%"=="1" goto set881c if "%MUSSPL%"=="2" goto set882c @echo on rem BAD FORMAT 10 pause goto getout :set881c xcopy ..\sfmt\SSF881c.a51 *.* >..\trash\trashbin call batasm SSF881C goto fetcomm :set882c xcopy ..\sfmt\SSF882c.a51 *.* >..\trash\trashbin call batasm SSF882C goto fetcomm REM XX :set88xa REM XX if "%MUSSPL%"=="1" goto set881a REM XX if "%MUSSPL%"=="2" goto set882a REM XX @echo on REM XX rem BAD FORMAT 10 REM XX pause REM XX goto getout REM XX REM XX :set881a REM XX copy ..\sfmt\SSF881a.a51 *.* >..\trash\trashbin REM XX call batasm SSF881A REM XX goto fetcomm REM XX REM XX :set882a REM XX copy ..\sfmt\SSF882a.a51 *.* >..\trash\trashbin REM XX call batasm SSF882A REM XX goto fetcomm :sethb copy ..\ss\fmt\hgtb.h hgt.h >..\trash\trashbin @echo on rem Height = 24, VERT SPLIT @ECHO OFF if "%MUSMFG%"=="a" goto setc24m1 if "%MUSMFG%"=="p" goto setc24m5 @echo on rem BAD FORMAT 25 pause goto getout :setc24m5 copy ..\sfmt\SSFcc1a.a51 *.* >..\trash\trashbin call batasm SSFcc1a goto fetcomm :setc24m1 copy ..\sfmt\SSFcc1c.a51 *.* >..\trash\trashbin call batasm SSFcc1C goto fetcomm REM XX :sethc copy ..\ss\fmt\hgtc.h hgt.h >..\trash\trashbin copy ..\sfmt\SSF771a.a51 *.* >..\trash\trashbin call batasm SSF771a @echo on rem Height = 14, NO VERT SPLIT @ECHO OFF goto fetcomm :sethd copy ..\ss\fmt\hgtd.h hgt.h >..\trash\trashbin @echo on rem Height = 9, NO VERT SPLIT @ECHO OFF if "%MUSMFG%"=="a" goto set901c @echo on rem BAD FORMAT 30 pause goto getout :set901c xcopy ..\sfmt\SSF901c.a51 *.* >..\trash\trashbin call batasm SSF901C goto fetcomm :sethz copy ..\ss\fmt\hgtz.h hgt.h >..\trash\trashbin @echo on rem Amber height = 16, Color height =16 @ECHO OFF if "%MUSMFG%"=="m" goto set88xm @echo on rem BAD FORMAT 40 pause goto getout :set88xm if "%MUSSPL%"=="3" goto set882m @echo on rem BAD FORMAT 45 pause goto getout :set882m xcopy ..\sfmt\SSF882m.a51 *.* >..\trash\trashbin call batasm SSF882m goto fetcomm :fetcomm call batasm SZfsn call batasm SZbsn call batasm SZfsc call batasm SZbsc call batasm Sfmtbm if "%MUSTYP%"=="a" goto casac if "%MUSTYP%"=="t" goto cassa rem WHAT 47 goto getout :casac REM XX call batasm Sacode call batcmp SACccode call batasm SACxdata call batasm SACzdata call batasm SACarout call batasm SACacode call batcmp SACcrout call batcmp SACfmtbs call batcmp SACmain call batcmp SACisr call batcmp SACiic call batasm SACstart goto notot :cassa call batasm Sacode call batcmp STAccode call batasm STAxdata call batasm STAzdata call batasm STAarout call batcmp STAcrout call batcmp STAfmtbs call batcmp STAmain call batcmp STAisr call batcmp STAiic REM XX call batcmp STAgchar call batcmp STAbmap call batasm STAstart goto notot :notot if not exist cmplst.txt goto naser @echo on REM ///////////////////////////////// REM ///////// COMPILE ERRORS //////// REM ///////////////////////////////// type cmplst.txt | more REM saved in file cmplst.txt pause @ECHO OFF :naser if not exist as.lib goto usliex del as.lib :usliex c:\tools\keil\c51\bin\lib51 c as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SSF881C.obj to as.lib >..\trash\trashbin REM XX c:\tools\keil\c51\bin\lib51 a SSF882A.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SSF882C.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SSF882M.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SSFcc1C.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SSFcc1A.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SSF771A.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SSF901C.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a Sfmtbm.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SZfsn.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SZbsn.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SZfsc.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SZbsc.obj to as.lib >..\trash\trashbin if "%MUSTYP%"=="a" goto lnkac if "%MUSTYP%"=="t" goto lnksa echo on rem WHAT 47 goto getout :lnkac c:\tools\keil\c51\bin\lib51 a SACacode.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SACccode.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SACcrout.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SACarout.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a SACfmtbs.obj to as.lib >..\trash\trashbin REM XX c:\tools\keil\c51\bin\lib51 a S485.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\bl51 SACstart.obj, SACisr.obj, SACiic.obj, SACmain.obj, SACxdata.obj, SACzdata.obj, as.lib, c51s.lib TO as.omf RS(256) IX >protl.log goto lnkdn :lnksa c:\tools\keil\c51\bin\lib51 a Sacode.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a STAccode.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a STAcrout.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a STAarout.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a S485.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a STAfmtbs.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a STAgchar.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a STAbmap.obj to as.lib >..\trash\trashbin c:\tools\keil\c51\bin\bl51 STAstart.obj, STAisr.obj, STAiic.obj, STAmain.obj, STAxdata.obj, STAzdata.obj, as.lib, c51s.lib TO as.omf RS(256) IX >protl.log goto lnkdn :lnkdn IF errorlevel=2 GOTO tell goto show :tell echo on REM //////////////////////////////////////// REM //////////// linker ERRORS ///////////// REM //////////////////////////////////////// REM errors and warnings are in protl.log REM link map is in as.m51 pause :show echo on type protl.log | more pause REM YY @ECHO OFF if "%NODEL%"=="0" goto nodel del *.lst del *.obj del *.lib del *.log :nodel if "%MUSDEB%"=="0" goto dexc1 :hexc1 c:\tools\keil\c51\bin\oh51 as.omf HEXFILE (..\hex\%MUSTYP%%MUSMFG%%MUSWDT%%MUSHGT%%1.hex) echo on fc ..\hex\%MUSTYP%%MUSMFG%%MUSWDT%%MUSHGT%%1.hex ..\mtc\%MUSTYP%%MUSMFG%%MUSWDT%%MUSHGT%%1.hex goto hexit :setdbw :dexc1 c:\tools\keil\c51\bin\oh51 as.omf HEXFILE (..\hex\%MUSTYP%%MUSMFG%%MUSWDT%%MUSHGT%DBG.hex) echo on fc ..\hex\%MUSTYP%%MUSMFG%%MUSWDT%%MUSHGT%DBG.hex ..\mtc\%MUSTYP%%MUSMFG%%MUSWDT%%MUSHGT%DBG.hex goto hexit :hexit pause type x.log goto getout :typmiss echo on rem ERROR !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! rem parm1 = a : active converter rem parm1 = s : slave goto getout :mfmiss echo on rem ERROR !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! goto getout :wdtmiss echo on rem ERROR !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! goto getout :hgtmiss echo on rem ERROR !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :getout cd ..\mk |
Topic | Author | Date |
Let's have a rant about IDEs... | 01/01/70 00:00 | |
re Eclipse | 01/01/70 00:00 | |
You got further than me, then! | 01/01/70 00:00 | |
re looking at Eclipse | 01/01/70 00:00 | |
Eclipse | 01/01/70 00:00 | |
What do you want integrated in your IDE? | 01/01/70 00:00 | |
More than that! | 01/01/70 00:00 | |
How about ... | 01/01/70 00:00 | |
you want ... | 01/01/70 00:00 | |
What I want from my IDE | 01/01/70 00:00 | |
no, it is not | 01/01/70 00:00 | |
not inherently | 01/01/70 00:00 | |
reply and an example | 01/01/70 00:00 | |
Multiple targets with make | 01/01/70 00:00 | |
true, but | 01/01/70 00:00 | |
IDE's | 01/01/70 00:00 | |
true! | 01/01/70 00:00 | |
make vs. batch | 01/01/70 00:00 | |
That's a key! | 01/01/70 00:00 | |
.. and make one, two or all? | 01/01/70 00:00 | |
make of it what you will | 01/01/70 00:00 | |
Don't start from here! | 01/01/70 00:00 | |
what's the difference? | 01/01/70 00:00 | |
The right tool for the job | 01/01/70 00:00 | |
please e-mail me or post a copy | 01/01/70 00:00 | |
Make with 3 targets | 01/01/70 00:00 | |
make????? | 01/01/70 00:00 |