Mercurial > hg > xemacs-beta
comparison nt/xemacs.mak @ 795:68d4a70c1558
[xemacs-hg @ 2002-03-29 11:09:23 by jhar]
Hopefully finally solve win32 dependency quoting fiasco
author | jhar |
---|---|
date | Fri, 29 Mar 2002 11:09:24 +0000 |
parents | 3604075fb2a3 |
children | a5954632b187 |
comparison
equal
deleted
inserted
replaced
794:3604075fb2a3 | 795:68d4a70c1558 |
---|---|
1 # Makefile for Microsoft NMAKE | 1 # Makefile for Microsoft NMAKE -*- Makefile -*- |
2 # | |
2 # Copyright (C) 1995 Board of Trustees, University of Illinois. | 3 # Copyright (C) 1995 Board of Trustees, University of Illinois. |
3 # Copyright (C) 1995, 1996, 2000, 2001, 2002 Ben Wing. | 4 # Copyright (C) 1995, 1996, 2000, 2001, 2002 Ben Wing. |
5 # Copyright (C) 1997, 1998, 2000 Jonathan Harris. | |
4 # Copyright (C) 1995 Sun Microsystems, Inc. | 6 # Copyright (C) 1995 Sun Microsystems, Inc. |
5 # Copyright (C) 1998 Free Software Foundation, Inc. | 7 # Copyright (C) 1998 Free Software Foundation, Inc. |
6 # | 8 # |
7 # This file is part of XEmacs. | 9 # This file is part of XEmacs. |
8 # | 10 # |
35 | 37 |
36 XEMACS=$(MAKEDIR)\.. | 38 XEMACS=$(MAKEDIR)\.. |
37 LISP=$(XEMACS)\lisp | 39 LISP=$(XEMACS)\lisp |
38 LIB_SRC=$(XEMACS)\lib-src | 40 LIB_SRC=$(XEMACS)\lib-src |
39 MODULES=$(XEMACS)\modules | 41 MODULES=$(XEMACS)\modules |
40 NT=$(XEMACS)\nt | 42 NT=$(MAKEDIR) |
41 OUTDIR=$(NT)\obj | 43 OUTDIR=$(NT)\obj |
42 SRC=$(XEMACS)\src | 44 SRC=$(XEMACS)\src |
43 LWLIB_SRCDIR=$(XEMACS)\lwlib | 45 LWLIB_SRCDIR=$(XEMACS)\lwlib |
44 MAKEDIRSTRING=$(MAKEDIR:\=\\) | 46 MAKEDIRSTRING=$(MAKEDIR:\=\\) |
45 XEMACSDIRSTRING=$(MAKEDIRSTRING:\\nt=) | 47 XEMACSDIRSTRING=$(MAKEDIRSTRING:\\nt=) |
326 # Whether to use dependency information generated by make-src-depend | 328 # Whether to use dependency information generated by make-src-depend |
327 # | 329 # |
328 !if !defined(DEPEND) | 330 !if !defined(DEPEND) |
329 DEPEND=0 | 331 DEPEND=0 |
330 !endif | 332 !endif |
331 !if !defined(PERL_NEEDS_MORE_QUOTING) | |
332 PERL_NEEDS_MORE_QUOTING=1 | |
333 !endif | |
334 !if $(DEPEND) && exist("$(SRC)\depend") | 333 !if $(DEPEND) && exist("$(SRC)\depend") |
335 ! if [if not exist $(OUTDIR)\nul mkdir "$(OUTDIR)"] | 334 ! if [if not exist $(OUTDIR)\nul mkdir "$(OUTDIR)"] |
336 ! endif | 335 ! endif |
337 # #### Yuuuuuuuuuuck!!! Cygwin is too smart for its own good. If we are | 336 # This perl script used to be inline but that caused too many quoting problems |
338 # being run from within Cygwin, a Cygwin Perl seems to require twice as | 337 ! if [perl .\make-nt-depend -s=$(SRC) -c=$(NT) -o=$(OUTDIR) < $(SRC)\depend > $(OUTDIR)\depend.tmp] |
339 # much backslash quoting. This does not happen, of course, with a non- | |
340 # Cygwin Perl, so in that circumstance, you'd be screwed and would have | |
341 # to fix this Makefile to not have a special Cygwin case. | |
342 # ! if defined(_) | |
343 # #### 3-17-02 Double yuck! Suddenly, perl is wanting more quoting always. | |
344 # #### I have no idea what changed. So I'm just making a variable for | |
345 # #### this. --ben | |
346 ! if $(PERL_NEEDS_MORE_QUOTING) | |
347 ! if [perl -p -e "s/^\\x23if defined(.+)/!if defined$$1/; s/^\\x23e/!e/;" \ | |
348 -e "s/([\\s=^])([\\w\\d\\.\\-^]+\\.[ch^])/$$1$(SRC:\=\\\\)\\\\$$2/g;" \ | |
349 -e "s/^(.+)\\.o:(.+)/$(OUTDIR:\=\\\\)\\\\$$1.obj:$$2 $(NT:\=\\\\)\\\\config.inc/;" \ | |
350 < $(SRC)\depend > $(OUTDIR)\depend.tmp] | |
351 ! endif | |
352 ! else | |
353 ! if [perl -p -e "s/^\x23if defined(.+)/!if defined$$1/; s/^\x23e/!e/;" \ | |
354 -e "s/([\s=^])([\w\d\.\-^]+\.[ch^])/$$1$(SRC:\=\\)\\$$2/g;" \ | |
355 -e "s/^(.+)\.o:(.+)/$(OUTDIR:\=\\)\\$$1.obj:$$2 $(NT:\=\\)\\config.inc/;" \ | |
356 < $(SRC)\depend > $(OUTDIR)\depend.tmp] | |
357 ! endif | |
358 ! endif | 338 ! endif |
359 ! include "$(OUTDIR)\depend.tmp" | 339 ! include "$(OUTDIR)\depend.tmp" |
360 !else | 340 !else |
361 ! if [echo WARNING: Compiling without dependency information.] | 341 ! if [echo WARNING: Compiling without dependency information.] |
362 ! endif | 342 ! endif |
928 #$(TEMACS_SRC)\paths.h: $(TEMACS_SRC)\paths.h.in | 908 #$(TEMACS_SRC)\paths.h: $(TEMACS_SRC)\paths.h.in |
929 # !"cd $(TEMACS_SRC); cp paths.h.in paths.h" | 909 # !"cd $(TEMACS_SRC); cp paths.h.in paths.h" |
930 | 910 |
931 $(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS) $(OUTDIR)\xemacs.res | 911 $(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS) $(OUTDIR)\xemacs.res |
932 !if $(DEBUG_XEMACS) | 912 !if $(DEBUG_XEMACS) |
933 @dir /b/s $(OUTDIR)\*.sbr > bscmake.tmp | 913 @dir /b/s $(OUTDIR)\*.sbr > $(OUTDIR)\bscmake.tmp |
934 bscmake -nologo -o$(TEMACS_BROWSE) @bscmake.tmp | 914 bscmake -nologo -o$(TEMACS_BROWSE) @$(OUTDIR)\bscmake.tmp |
935 -$(DEL) bscmake.tmp | 915 -$(DEL) $(OUTDIR)\bscmake.tmp |
936 !endif | 916 !endif |
937 !if $(USE_PORTABLE_DUMPER) | 917 !if $(USE_PORTABLE_DUMPER) |
938 @if exist $(SRC)\dump-id.c $(DEL) $(SRC)\dump-id.c | 918 @if exist $(SRC)\dump-id.c $(DEL) $(SRC)\dump-id.c |
939 # make a new dump id file. There is probably a better way to do this, but this works | 919 # make a new dump id file. There is probably a better way to do this, but this works |
940 @if exist $(OUTDIR)\dump-id.obj $(DEL) $(OUTDIR)\dump-id.obj | 920 @if exist $(OUTDIR)\dump-id.obj $(DEL) $(OUTDIR)\dump-id.obj |
1219 # This takes 5 seconds on my Pentium 233. If you are running on a | 1199 # This takes 5 seconds on my Pentium 233. If you are running on a |
1220 # much slower machine and are bothered by the time, modify make-docfile.c | 1200 # much slower machine and are bothered by the time, modify make-docfile.c |
1221 # to contain special code to frob $(OUTDIR)\foo.obj into the right file. | 1201 # to contain special code to frob $(OUTDIR)\foo.obj into the right file. |
1222 make-docargs: $(TEMACS_OBJS) | 1202 make-docargs: $(TEMACS_OBJS) |
1223 @echo Creating make-docfile argument file ... | 1203 @echo Creating make-docfile argument file ... |
1224 -$(DEL) make-docfile.out | 1204 -$(DEL) $(OUTDIR)\make-docfile.tmp |
1225 @!echo $(SRC)\$(**B).c >> make-docfile.out | 1205 @!echo $(SRC)\$(**B).c >> $(OUTDIR)\make-docfile.tmp |
1226 @echo Done. | 1206 @echo Done. |
1227 | 1207 |
1228 $(DOC): $(LIB_SRC)\make-docfile.exe make-docargs | 1208 $(DOC): $(LIB_SRC)\make-docfile.exe make-docargs |
1229 if exist $(DOC) $(DEL) $(DOC) | 1209 if exist $(DOC) $(DEL) $(DOC) |
1230 set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH) | 1210 set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH) |
1231 set EMACSBOOTSTRAPMODULEPATH=$(MODULES) | 1211 set EMACSBOOTSTRAPMODULEPATH=$(MODULES) |
1232 $(TEMACS_BATCH) -l $(TEMACS_DIR)\..\lisp\make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages | 1212 $(TEMACS_BATCH) -l $(TEMACS_DIR)\..\lisp\make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages |
1233 $(LIB_SRC)\make-docfile.exe -a $(DOC) @make-docfile.out | 1213 $(LIB_SRC)\make-docfile.exe -a $(DOC) @$(OUTDIR)\make-docfile.tmp |
1234 | 1214 |
1235 update-elc: | 1215 update-elc: |
1236 set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH) | 1216 set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH) |
1237 set EMACSBOOTSTRAPMODULEPATH=$(MODULES) | 1217 set EMACSBOOTSTRAPMODULEPATH=$(MODULES) |
1238 $(TEMACS_BATCH) -l $(TEMACS_DIR)\..\lisp\update-elc.el | 1218 $(TEMACS_BATCH) -l $(TEMACS_DIR)\..\lisp\update-elc.el |