2013-10-30 Juan Manuel Guerrero  <juan.guerrero@gmx.de>

	* Makefile.DOS: Add ./popen.c to the list of objects to build.
	popen.c is newest version from the DJGPP repository.
	Remove guile.c from the list of objects to build.
	Added rule to create pdf formated documentation.

	* configure.bat: Copy djgpp/popen.c to the source directory.

	* dosbuild.bat:  Use /dev/env/DJDIR instead of c:/djgpp.
	Add ./popen.c to the list of objects to build.
	Remove guile.c from the list of objects to build.






diff -aprNU5 make-4.0.orig/Makefile.DOS make-4.0/Makefile.DOS
--- make-4.0.orig/Makefile.DOS	2013-10-09 08:12:24 +0200
+++ make-4.0/Makefile.DOS	2013-10-30 23:24:04 +0100
@@ -75,13 +75,14 @@ VERSION = 4.0
 
 AUTOMAKE_OPTIONS = 1.2
 
 bin_PROGRAMS =	make$(EXEEXT)
 
-make_SOURCES =	ar.c arscan.c commands.c default.c dir.c expand.c file.c function.c getopt.c getopt1.c implicit.c job.c load.c loadapi.c main.c misc.c output.c read.c remake.c rule.c signame.c strcache.c variable.c version.c vpath.c hash.c guile.c remote-$(REMOTE).c
+make_SOURCES =	popen.c ar.c arscan.c commands.c default.c dir.c expand.c file.c function.c getopt.c getopt1.c implicit.c job.c load.c loadapi.c main.c misc.c output.c read.c remake.c rule.c signame.c strcache.c variable.c version.c vpath.c hash.c remote-$(REMOTE).c
 # This should include the glob/ prefix
 libglob_a_SOURCES =	glob/fnmatch.c glob/glob.c glob/fnmatch.h glob/glob.h
+guile_SOURCES = guile.c
 make_LDADD =	  glob/libglob.a
 
 man_MANS =	make.1
 
 INCLUDES =	-I$(srcdir)/glob -DLIBDIR=\"$(prefix)$(libdir)\" -DINCLUDEDIR=\"$(prefix)$(includedir)\" -DLOCALEDIR=\"$(prefix)$(localedir)\"
@@ -101,23 +102,26 @@ MAKE_HOST = i386-pc-msdosdjgpp
 
 DEFS =  -I. -I$(srcdir) -I.
 CPPFLAGS = -DHAVE_CONFIG_H
 LDFLAGS =
 LIBS =
-make_OBJECTS =  ar.o arscan.o commands.o default.o dir.o expand.o file.o function.o getopt.o getopt1.o implicit.o job.o load.o loadapi.o main.o misc.o output.o read.o remake.o rule.o signame.o strcache.o variable.o version.o vpath.o hash.o guile.o remote-$(REMOTE).o
+make_OBJECTS =  popen.o ar.o arscan.o commands.o default.o dir.o expand.o file.o function.o getopt.o getopt1.o implicit.o job.o load.o loadapi.o main.o misc.o output.o read.o remake.o rule.o signame.o strcache.o variable.o version.o vpath.o hash.o remote-$(REMOTE).o
 make_DEPENDENCIES =    glob/libglob.a
 make_LDFLAGS =
 libglob_a_LIBADD =
 libglob_a_OBJECTS =  fnmatch.o glob.o
 noinst_LIBRARIES =	glob/libglob.a
+guile_OBJECTS = guile.o
 CFLAGS = -O2 -g
 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
 LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
 TEXI2DVI = texi2dvi
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
 TEXINFO_TEX = $(srcdir)/config/texinfo.tex
 INFO_DEPS = doc/make.info
 DVIS = doc/make.dvi
+PDFS = doc/make.pdf
 TEXINFOS = doc/make.texi
 noinst_TEXINFOS = doc/fdl.texi doc/make-stds.texi
 man1dir = $(mandir)/man1
 MANS = $(man_MANS)
 
@@ -133,11 +137,11 @@ OBJECTS = $(make_OBJECTS)
 HEADERS = $(wildcard $(srcdir)/*.h)
 
 default: all
 
 .SUFFIXES:
-.SUFFIXES: .c .dvi .info .o .obj .ps .texi .tex .html
+.SUFFIXES: .c .dvi .info .o .obj .pdf .ps .texi .tex .html
 
 mostlyclean-hdr:
 
 clean-hdr:
 
@@ -187,10 +191,11 @@ make$(EXEEXT): $(make_OBJECTS) $(make_DE
 
 # Documentation
 
 make.info: make.texi
 make.dvi: make.texi
+make.pdf: make.texi
 make.ps: make.dvi make.texi
 make.html: make.texi
 
 
 DVIPS = dvips
@@ -206,10 +211,13 @@ DVIPS = dvips
 	$(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
 
 .texi.dvi:
 	TEXINPUTS="$(srcdir);$$TEXINPUTS"    MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
 
+.texi.pdf:
+	TEXINPUTS="$(srcdir);$$TEXINPUTS"    MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2PDF) $<
+
 .dvi.ps:
 	$(DVIPS) $< -o $@
 
 # Other documentation formats
 
@@ -239,11 +247,11 @@ mostlyclean-aminfo:
 	-rm -f $(srcdir)/doc/make.aux $(srcdir)/doc/make.cp $(srcdir)/doc/make.cps $(srcdir)/doc/make.dvi \
 	  $(srcdir)/doc/make.fn $(srcdir)/doc/make.fns $(srcdir)/doc/make.ky $(srcdir)/doc/make.kys \
 	  $(srcdir)/doc/make.ps $(srcdir)/doc/make.log $(srcdir)/doc/make.pg $(srcdir)/doc/make.toc \
 	  $(srcdir)/doc/make.tp $(srcdir)/doc/make.tps $(srcdir)/doc/make.vr $(srcdir)/doc/make.vrs \
 	  $(srcdir)/doc/make.op $(srcdir)/doc/make.tr $(srcdir)/doc/make.cv $(srcdir)/doc/make.cn \
-	  $(srcdir)/doc/make.html
+	  $(srcdir)/doc/make.html $(srcdir)/doc/make.pdf
 
 clean-aminfo:
 
 distclean-aminfo:
 
@@ -391,10 +399,18 @@ ifeq ($(findstring doc, $(SUBDIRS)), doc
 	@command.com /c if not exist doc\\nul md doc
 	@echo Making all in doc
 	$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.dvi
 endif
 
+pdf: pdf-recursive
+pdf-recursive:
+ifeq ($(findstring doc, $(SUBDIRS)), doc)
+	@command.com /c if not exist doc\\nul md doc
+	@echo Making all in doc
+	$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.pdf
+endif
+
 ps: ps-recursive
 ps-recursive:
 ifeq ($(findstring doc, $(SUBDIRS)), doc)
 	@command.com /c if not exist doc\\nul md doc
 	@echo Making all in doc
@@ -814,5 +830,8 @@ vpath.o: vpath.c makeint.h config.h \
  gnumake.h \
  getopt.h \
  gettext.h \
  filedef.h hash.h \
  variable.h
+
+# .deps/popen.Po
+popen.o: popen.c
diff -aprNU5 make-4.0.orig/configure.bat make-4.0/configure.bat
--- make-4.0.orig/configure.bat	2013-10-06 01:12:18 +0200
+++ make-4.0/configure.bat	2013-10-30 22:57:10 +0100
@@ -47,10 +47,11 @@ goto End
 rem They do have Make.	Generate the Makefile.
 
 :MakeOk
 del junk.$$$
 update %XSRC%/Makefile.DOS ./Makefile
+update %XSRC%/djgpp/popen.c ./popen.c
 echo Done.
 if not "%XSRC%"=="." echo Invoke Make thus: "make srcdir=%XSRC%"
 goto End
 
 :SmallEnv
diff -aprNU5 make-4.0.orig/dosbuild.bat make-4.0/dosbuild.bat
--- make-4.0.orig/dosbuild.bat	2013-10-06 01:12:18 +0200
+++ make-4.0/dosbuild.bat	2013-10-30 22:57:10 +0100
@@ -17,19 +17,20 @@ rem with this program.  If not, see <htt
 
 echo Building Make for MSDOS
 
 rem Echo ON so they will see what is going on.
 @echo on
+gcc  -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g popen.c -o popen.o
 gcc  -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g commands.c -o commands.o
 gcc  -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g output.c -o output.o
 gcc  -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g job.c -o job.o
 gcc  -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g dir.c -o dir.o
 gcc  -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g file.c -o file.o
 gcc  -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g misc.c -o misc.o
 gcc  -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g main.c -o main.o
-gcc  -c -I. -I./glob -DHAVE_CONFIG_H -DINCLUDEDIR=\"c:/djgpp/include\" -O2 -g read.c -o read.o
-gcc  -c -I. -I./glob -DHAVE_CONFIG_H -DLIBDIR=\"c:/djgpp/lib\" -O2 -g remake.c -o remake.o
+gcc  -c -I. -I./glob -DHAVE_CONFIG_H -DINCLUDEDIR=\"/dev/env/DJDIR/include\" -O2 -g read.c -o read.o
+gcc  -c -I. -I./glob -DHAVE_CONFIG_H -DLIBDIR=\"/dev/env/DJDIR/lib\" -O2 -g remake.c -o remake.o
 gcc  -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g rule.c -o rule.o
 gcc  -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g implicit.c -o implicit.o
 gcc  -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g default.c -o default.o
 gcc  -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g variable.c -o variable.o
 gcc  -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g expand.c -o expand.o
