X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/4a7c8265b5c0df8017bec9be6e08bd580580a831..d4225c08140da5c1d7a73de98245ad9fc49a1b81:/msdos/mainmake.v2 diff --git a/msdos/mainmake.v2 b/msdos/mainmake.v2 index d24cb93956..910014de9c 100644 --- a/msdos/mainmake.v2 +++ b/msdos/mainmake.v2 @@ -29,41 +29,59 @@ # make extraclean # Still more severe - delete backup and autosave files, too. +# This gork is required for those who use a Unix-style shell, and +# have SHELL in the environment pointing to it. Here we force +# Make to use COMMAND.COM instead. This Makefile won't work otherwise. +# (The /xyzzy directory is used to minimize the chance that someone +# actually has such a directory with an incompatible command.com. We +# used to have /dos there, but some Windows installations have an old +# version of DOS stashed in that directory, and command.com from there +# won't run on Windows, complaining about "Incorrect DOS version". +# Make will look up PATH for the shell executable, so the directory name +# is not important.) +SHELL=/xyzzy/command +MAKESHELL=/xyzzy/command + # Generate a full pathname of the top-level installation directory -topdir := $(subst \,/,$(shell cd)) +top_srcdir := $(subst \,/,$(shell cd)) + +# Find out which version of Emacs this is. +version := ${shell sed -n -e '/(defconst emacs-version/s/^[^"]*\("[^"]*"\).*/\1/p' lisp/version.el} -all: lib-src src +all: lib-src src man lib-src: FRC cd lib-src - $(MAKE) + $(MAKE) top_srcdir=${top_srcdir} version=${version} cd .. src: FRC cd src - $(MAKE) + $(MAKE) top_srcdir=${top_srcdir} + djecho -s '/-geometry/s,^.*,set environment HOME $(top_srcdir),' \ + '/environment *TERM/s/^.*/set environment TERM internal/' \ + '/x_error_quitter/s/^.*/set environment NAME root/' >gdb.sed + sed -f gdb.sed _gdbinit >gdb.tmp + djecho -a gdb.tmp -s 'set environment USER root' \ + 'set environment EMACSPATH $(top_srcdir)/bin' \ + 'set environment SHELL $(subst \,/,$(COMSPEC))' \ + 'set environment PATH $(subst \,/,$(PATH))' + update gdb.tmp gdb.ini + rm -f gdb.tmp gdb.sed cd .. + if exist leim\Makefile redir $(MAKE) -C leim top_srcdir=${top_srcdir} -gdb: src - cd src - redir -o gdb.tmp sed \ - -e '/-geometry/s,^.*,set environment HOME $(topdir),' \ - -e '/environment *TERM/s/^.*/set environment TERM internal/' \ - -e '/x_error_quitter/s/^.*/set environment NAME root/' _gdbinit - redir -oa gdb.tmp echo 'set environment USER root' - redir -oa gdb.tmp echo 'set environment EMACSPATH $(topdir)/bin' - redir -oa gdb.tmp echo 'set environment SHELL $(subst \,/,$(COMSPEC))' - redir -oa gdb.tmp echo 'set environment PATH $(subst \,/,$(PATH))' - update gdb.tmp gdb.ini +man: FRC + cd man + $(MAKE) top_srcdir=${top_srcdir} cd .. install: all - -md bin + if not exist bin\nul md bin cd lib-src - -copy hexl.exe ..\\bin - -copy etags.exe ..\\bin - -copy ctags.exe ..\\bin - -copy b2m.exe ..\\bin + command.com /c >/dev/null for %p in (hexl etags ctags b2m ebrowse) do\ + if exist %p.exe mv -f %p.exe ../bin + if exist fns.el update fns.el ../bin/fns.el cd .. cd src stubify emacs @@ -73,9 +91,12 @@ install: all FRC: -TAGS tags: lib-src +TAGS tags: lib-src FRC + cd lib-src + if exist etags.exe mv -f etags.exe ../bin + cd .. cd lisp - ../bin/etags [a-zA-Z]*.el term/[a-zA-Z]*.el + ../bin/etags [a-zA-Z]*.el [a-zA-Z]*/[a-zA-Z]*.el cd .. cd src ../bin/etags --include=../lisp/TAGS \ @@ -96,3 +117,6 @@ clean: cd oldxmenu -$(MAKE) clean cd .. + cd leim + if exist Makefile redir $(MAKE) clean + cd ..