I have tried to build Make for DJGPP/MSDOS/FreeDOS and I had to fix a couple
of minor issues.  Please inspect the patch provided as suggestion.
1: src/load.c has to be added to the list of files to be compiled in builddos.bat
2: DJGPP does not provide guile support thus the call to guile_gmake_setup in
   main.c must be guarded by checking if HAVE_GUILE is defined.
3: "get_bad_stdin" exists two times.  One time as function defined in posixos.c.
   Another time as macro defined in os.h in the case that one of the macros
   VMS, WINDOWS32, _AMIGA, __MSDOS__ is defined.  Thus the compiling of that
   function should depend on that those macros have not been defined.
4: use environment variables instead of hard coded paths in builddos.bat
   and msdosdjgpp.mk so those files are usefull for all installations and
   not only for the one where they match.

After having fixed those issues as shown in the patch I was able to compile
Make on MS-DOS using latest DJGPP tools.  The DOS port of Make seems to
continue working flawlessly on DOS as far as I can say.  I have also checked
the changes on my linux box and I have experienced no issues due to the
propossed changes.


Kind regards,
Juan M. Guerrero



2023-01-13 Juan Manuel Guerrero  <juan.guerrero@gmx.de>


	* mk/msdosdjgpp.mk:  Use environment variable /dev/env/DJDIR instead
	of hard coded path c:/djgpp.





diff -aprNU5 make-4.4.orig/mk/msdosdjgpp.mk make-4.4/mk/msdosdjgpp.mk
--- make-4.4.orig/mk/msdosdjgpp.mk	2022-10-23 14:52:32 +0000
+++ make-4.4/mk/msdosdjgpp.mk	2023-01-13 20:23:36 +0000
@@ -29,13 +29,13 @@ P2W = $(subst /,\,$1)
 
 prog_SOURCES += $(loadavg_SOURCES) $(glob_SOURCES)
 
 BUILT_SOURCES += $(lib)alloca.h $(lib)fnmatch.h $(lib)glob.h
 
-INCLUDEDIR = c:/djgpp/include
-LIBDIR = c:/djgpp/lib
-LOCALEDIR = c:/djgpp/share
+INCLUDEDIR = /dev/env/DJDIR/include
+LIBDIR = /dev/env/DJDIR/lib
+LOCALEDIR = /dev/env/DJDIR/share
 
 MKDIR.cmd = command.com /c mkdir $(call P2W,$1)
 RM.cmd = command.com /c del /F /Q $(call P2W,$1)
 CP.cmd = command.com /c copy /Y $(call P2W,$1 $2)
 
