Skip to content

Commit 5e41f37

Browse files
jmalakPerditionC
authored andcommitted
build: fix make tool command line handling
unify main make file name to makefile.mak now make tool command line is handled by MAKE environment variable (fix issue with space after -f for Turbo C)
1 parent 2a14686 commit 5e41f37

File tree

21 files changed

+66
-66
lines changed

21 files changed

+66
-66
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ tools/icmd_1.icd
306306
tools/icmd_2.icd
307307
tools/icmd_3.icd
308308
tools/kssf.com
309-
tools/tools.mak
309+
tools/makefile.mak
310310
tools/vspawn.com
311311
tools/watcomc.cfg
312312
utils/watcomc.cfg

build.bat

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set SWAP=YES-DXMS-SWAP____________________
44
if NOT "%SWAP%"=="YES-DXMS-SWAP____________________" goto err1
55
: BEGIN Internal stuff for ska -- If one of these three commands
66
: fail for you, your distribution is broken! Please report.
7-
for %%a in (lib\lib.mak cmd\cmd.mak shell\command.mak) do if not exist %%a set SWAP=NO
7+
for %%a in (lib\makefile.mak cmd\makefile.mak shell\makefile.mak) do if not exist %%a set SWAP=NO
88
if "%SWAP%"=="NO" set XMS_SWAP=
99
if "%SWAP%"=="NO" call dmake dist
1010
: END
@@ -83,10 +83,10 @@ echo Building FreeCOM for language %LNG%
8383

8484
if not "%MAKE%" == "" goto skip_make
8585

86-
if "%COMPILER%" == "TC2" set MAKE=%TC2_BASE%\make -f
87-
if "%COMPILER%" == "TURBOCPP" set MAKE=%TP1_BASE%\bin\make -f
88-
if "%COMPILER%" == "BC5" set MAKE=%BC5_BASE%\bin\make -f
89-
if "%COMPILER%" == "WATCOM" set MAKE=wmake -ms -h -f
86+
if "%COMPILER%" == "TC2" set MAKE=%TC2_BASE%\make -fmakefile.mak
87+
if "%COMPILER%" == "TURBOCPP" set MAKE=%TP1_BASE%\bin\make -f makefile.mak
88+
if "%COMPILER%" == "BC5" set MAKE=%BC5_BASE%\bin\make -f makefile.mak
89+
if "%COMPILER%" == "WATCOM" set MAKE=wmake -ms -h -f makefile.mak
9090

9191
echo Make is %MAKE%.
9292

@@ -97,10 +97,10 @@ echo Checking SUPPL library
9797
cd suppl
9898
if exist skip goto endSuppl
9999
echo Building SUPPL library
100-
%MAKE% suppl.mak all
100+
%MAKE% all
101101
if errorlevel 1 goto ende
102102
cd src
103-
%MAKE% suppl.mak all
103+
%MAKE% all
104104
if errorlevel 1 goto ende
105105
cd ..
106106
:endSuppl
@@ -110,50 +110,50 @@ echo.
110110
echo Making basic utilities for build process
111111
echo.
112112
cd utils
113-
%MAKE% utils.mak all
113+
%MAKE% all
114114
if errorlevel 1 goto ende
115115
cd ..
116116

117117
echo.
118118
echo Making STRINGS resource
119119
echo.
120120
cd strings
121-
%MAKE% strings.mak all
121+
%MAKE% all
122122
if errorlevel 1 goto ende
123123
cd strings
124-
%MAKE% strings.mak all
124+
%MAKE% all
125125
if errorlevel 1 goto ende
126126
cd ..\..
127127

128128
echo.
129129
echo Making CRITER resource
130130
echo.
131131
cd criter
132-
%MAKE% criter.mak all
132+
%MAKE% all
133133
if errorlevel 1 goto ende
134134
cd ..
135135

136136
echo.
137137
echo Making misc library
138138
echo.
139139
cd lib
140-
%MAKE% lib.mak all
140+
%MAKE% all
141141
if errorlevel 1 goto ende
142142
cd ..
143143

144144
echo.
145145
echo Making commands library
146146
echo.
147147
cd cmd
148-
%MAKE% cmd.mak all
148+
%MAKE% all
149149
if errorlevel 1 goto ende
150150
cd ..
151151

152152
echo.
153153
echo Making COMMAND.COM
154154
echo.
155155
cd shell
156-
%MAKE% command.mak all
156+
%MAKE% all
157157
if errorlevel 1 goto ende
158158
cd ..
159159

@@ -169,10 +169,10 @@ echo.
169169
echo Making supplemental tools
170170
echo.
171171
cd tools
172-
type tools.m1 >tools.mak
173-
..\utils\mktools.exe >>tools.mak
174-
type tools.m2 >>tools.mak
175-
%MAKE% tools.mak all
172+
type tools.m1 >makefile.mak
173+
..\utils\mktools.exe >>makefile.mak
174+
type tools.m2 >>makefile.mak
175+
%MAKE% all
176176
if errorlevel 1 goto ende
177177
cd ..
178178

build.sh

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fi
1313
export SWAP=YES-DXMS-SWAP____________________
1414
# BEGIN Internal stuff for ska -- If one of these three commands
1515
# fail for you, your distribution is broken! Please report.
16-
for a in lib/lib.mak cmd/cmd.mak shell/command.mak; do if [ ! -f $a ]; then export SWAP=NO; fi; done
16+
for a in lib/makefile.mak cmd/makefile.mak shell/makefile.mak; do if [ ! -f $a ]; then export SWAP=NO; fi; done
1717
if [ "$SWAP" == "NO" ]; then
1818
unset XMS_SWAP
1919
dmake dist
@@ -87,7 +87,7 @@ echo Building FreeCOM for language $LNG
8787
if [ -z "$MAKE" ]; then
8888
case "$COMPILER" in
8989
watcom)
90-
export MAKE="wmake -ms -h -f"
90+
export MAKE="wmake -ms -h -f makefile.mak"
9191
;;
9292
gcc)
9393
export MAKE="make -f gnumake.mak"
@@ -114,22 +114,22 @@ gnumake_subst () {
114114
if $MAKE -? 2>&1 | grep -q gnu; then
115115
gnumake_subst . config.mak gnuconf.mak
116116
for i in suppl utils strings criter lib cmd; do
117-
gnumake_subst $i $i.mak gnumake.mak
117+
gnumake_subst $i makefile.mak gnumake.mak
118118
done
119-
gnumake_subst suppl/src suppl.mak gnumake.mak
120-
gnumake_subst strings/strings strings.mak gnumake.mak
121-
gnumake_subst shell command.mak gnumake.mak
119+
gnumake_subst suppl/src makefile.mak gnumake.mak
120+
gnumake_subst strings/strings makefile.mak gnumake.mak
121+
gnumake_subst shell makefile.mak gnumake.mak
122122
fi
123123

124124
echo
125125
echo Checking SUPPL library
126126
cd suppl
127127
if [ ! -f skip ]; then
128128
echo Building SUPPL library
129-
$MAKE suppl.mak all
129+
$MAKE all
130130

131131
cd src
132-
$MAKE suppl.mak all
132+
$MAKE all
133133
cd ..
134134
fi
135135
cd ..
@@ -138,44 +138,44 @@ echo
138138
echo Making basic utilities for build process
139139
echo
140140
cd utils
141-
$MAKE utils.mak all
141+
$MAKE all
142142
cd ..
143143

144144
echo
145145
echo Making STRINGS resource
146146
echo
147147
cd strings
148-
$MAKE strings.mak all
148+
$MAKE all
149149
cd strings
150-
$MAKE strings.mak all
150+
$MAKE all
151151
cd ../..
152152

153153
echo
154154
echo Making CRITER resource
155155
echo
156156
cd criter
157-
$MAKE criter.mak all
157+
$MAKE all
158158
cd ..
159159

160160
echo
161161
echo Making misc library
162162
echo
163163
cd lib
164-
$MAKE lib.mak all
164+
$MAKE all
165165
cd ..
166166

167167
echo
168168
echo Making commands library
169169
echo
170170
cd cmd
171-
$MAKE cmd.mak all
171+
$MAKE all
172172
cd ..
173173

174174
echo
175175
echo Making COMMAND.COM
176176
echo
177177
cd shell
178-
$MAKE command.mak all
178+
$MAKE all
179179
cd ..
180180

181181
utils/mkinfres.exe -Tinfo.txt infores shell/command.map shell/command.exe
@@ -186,13 +186,13 @@ echo
186186
echo Making supplemental tools
187187
echo
188188
cd tools
189-
cat tools.m1 > tools.mak
190-
../utils/mktools.exe >>tools.mak
191-
cat tools.m2 >>tools.mak
189+
cat tools.m1 > makefile.mak
190+
../utils/mktools.exe >>makefile.mak
191+
cat tools.m2 >>makefile.mak
192192
if $MAKE -? 2>&1 | grep -q gnu; then
193-
gnumake_subst . tools.mak gnumake.mak
193+
gnumake_subst . makefile.mak gnumake.mak
194194
fi
195-
$MAKE tools.mak all
195+
$MAKE all
196196
cd ..
197197

198198
echo

ci_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ git clean -q -x -d -f -e _output -e _watcom -e _download
5656
{
5757
echo set COMPILER=WATCOM
5858
echo set WATCOM='C:\\devel\\watcomc'
59-
echo set MAKE=wmake /ms /h /f
59+
echo set MAKE=wmake /ms /h /f makefile.mak
6060
echo set XNASM='C:\\devel\\nasm\\nasm'
6161
echo set XUPX=upx --8086 --best
6262
echo set OLDPATH=%PATH%

clean.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ call %0 criter\ criter criter1 context.def context.inc context.h_c
1717
call %0 cmd\ cmds.lib cmds.lst cmds.rsp echolib.bat
1818
call %0 lib\ freecom.lib freecom.lst freecom.rsp echolib.bat
1919
call %0 shell\ command.exe command.map command.rsp echoto.bat
20-
call %0 tools\ tools.mak
20+
call %0 tools\ makefile.mak
2121

2222
call %0 strings\*. cfg obj exe
2323
call %0 strings\strings\*. c obj

clean.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cd ../lib && rm -f freecom.lib freecom.lst freecom.rsp echolib.bat
1313
cd ../shell && rm -f command.exe command.map command.rsp echoto.bat
1414
cd ../strings && rm -f *.cfg *.obj *.exe
1515
cd ../strings/strings && rm -f strings.lib strings.lst strings.rsp *.c *.obj *.o makefile
16-
cd ../../tools && rm -f tools.mak *.icd *.cfg *.obj *.map *.exe *.com
16+
cd ../../tools && rm -f makefile.mak *.icd *.cfg *.obj *.map *.exe *.com
1717
cd ../utils && rm -f *.cfg *.obj *.map *.exe
1818
for i in cmd lib shell criter; do cd ../$i && rm -f *.obj *.cfg; done
1919
cd .. && rm -f gnuconf.mak $(find * -name gnumake.mak)

cmd/cmd.m1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.AUTODEPEND
22

3-
CFG_DEPENDENCIES = cmd.mak
3+
CFG_DEPENDENCIES = makefile.mak
44

55
!include "..\config.mak"
66

cmd/makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ HDR = ..\config.h ..\err_fcts.h ..\include/batch.h ..\include/cmdline.h \
7070
# Default target
7171
all: cmds.lib
7272

73-
dist: cmd.mak
73+
dist: makefile.mak
7474

7575
%.obj : %.asm ; $(NASM) $(NASMFLAGS) -f obj -F borland -o $@ $< >>errlist
7676

@@ -248,12 +248,12 @@ DYNSOURCES =
248248
#MAKEDEP STOP
249249

250250
clobber : clean
251-
$(RM) $(RMFLAGS) *.com *.cln *.lib *.lst *.cfg cmd.mak
251+
$(RM) $(RMFLAGS) *.com *.cln *.lib *.lst *.cfg makefile.mak
252252

253253
clean :
254254
$(RM) $(RMFLAGS) *.lst *.map *.bin *.bak *.las *.obj *.exe $(CFG) *.dmp com.com tags errlist
255255

256256

257-
cmd.mak : makefile cmd.m1 cmd.m2
257+
makefile.mak : makefile cmd.m1 cmd.m2
258258
+copy cmd.m1 + $(mktmp cmds.lib : \44(CFG) $(OBJ:t" \\\\\\n\\t") \n\tif exist cmds.lib \44(AR) cmds.lib /c @&&|\n+-$(OBJ:t" &\\n+-")\n| , cmds.lst \n\tif not exist cmds.lib \44(AR) cmds.lib /c @&&|\n+$(OBJ:t" &\\n+")\n| , cmds.lst \n) + cmd.m2 $@
259259

cmd/cmd.mak renamed to cmd/makefile.mak

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CFG_DEPENDENCIES = cmd.mak
1+
CFG_DEPENDENCIES = makefile.mak
22

33
TOP=..
44
!include "$(TOP)/config.mak"
@@ -50,7 +50,7 @@ OBJ5 = rmdir.obj \
5050
echolib.bat : ../scripts/echolib.bat
5151
$(CP) ..$(DIRSEP)scripts$(DIRSEP)echolib.bat .
5252

53-
cmds.rsp : echolib.bat cmd.mak
53+
cmds.rsp : echolib.bat makefile.mak
5454
$(RMFILES) cmds.rsp
5555
$(ECHOLIB) cmds.rsp $(OBJ1)
5656
$(ECHOLIB) cmds.rsp $(OBJ2)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CFG_DEPENDENCIES = criter.mak
1+
CFG_DEPENDENCIES = makefile.mak
22

33
TOP=..
44
!include "$(TOP)/config.mak"

0 commit comments

Comments
 (0)