home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / e20313in.zip / emacs / 20.3.1 / configure.cmd next >
OS/2 REXX Batch file  |  1999-06-28  |  2KB  |  65 lines

  1. @rem configure.cmd
  2. @echo off
  3. set w=pm
  4. :loop
  5. if "%1"=="" goto start
  6. if "%1"=="--help" goto help
  7. if "%1"=="--with-x" goto with_x
  8. if "%1"=="--with-pm" goto with_pm
  9. echo configure: unknown option: %1
  10. echo For more information, type "configure --help".
  11. goto end
  12.  
  13. :with_x
  14. set w=x
  15. goto next
  16.  
  17. :with_pm
  18. set w=pm
  19. goto next
  20.  
  21. :help
  22. echo Options:
  23. echo   --with-x         use the X Window System
  24. echo   --with-pm        use the Presentation Manager (default)
  25. goto end
  26.  
  27. :next
  28. shift
  29. goto loop
  30.  
  31. :start
  32. @echo on
  33. sed -f emx\emx1.sed src\paths.in >src\paths.h
  34. sed -f emx\emx2.sed src\config.in >src\config.tmp
  35. sed -f emx\emx2-%w%.sed src\config.tmp >src\config.h
  36. del src\config.tmp
  37. sed -f emx\emx3.sed src\Makefile.in >src\Makefile.tmp
  38. sed -f emx\emx3-%w%.sed src\Makefile.tmp >src\Makefile.c
  39. del src\Makefile.tmp
  40. sed -f emx\emx4.sed lib-src\Makefile.in >lib-src\Makefile.c
  41. if %w%==x sed -f emx\emx7.sed lwlib\Makefile.in >lwlib\Makefile
  42. cd lib-src
  43. sed -e "/start of cpp stuff/q" <Makefile.c >junk1.c
  44. sed -e "1,/start of cpp stuff/d" -e "s@/\*\*/#\(.*\)$@/* \1 */@" <Makefile.c >junk.c
  45. gcc -E -I. -undef junk.c | sed -f ..\emx\emx6.sed >junk2.c
  46. type junk1.c junk2.c >Makefile.new
  47. attrib -r Makefile*
  48. del Makefile
  49. ren Makefile.new Makefile
  50. rm -f junk.c junk1.c junk2.c
  51. cd ..
  52. cd src
  53. sed -e "/start of cpp stuff/q" <Makefile.c >junk1.c
  54. sed -e "1,/start of cpp stuff/d" -e "s@/\*\*/#\(.*\)$@/* \1 */@" <Makefile.c >junk.c
  55. gcc -E -I. -undef junk.c | sed -f ..\emx\emx5.sed | sed -f ..\emx\emx5-%w%.sed >junk2.c
  56. type junk1.c junk2.c >Makefile.new
  57. attrib -r Makefile.*
  58. del Makefile
  59. ren Makefile.new Makefile
  60. rm -f junk.c junk1.c junk2.c
  61. cd ..
  62. @echo off
  63. :end
  64. set w=
  65.