home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / client.mak < prev    next >
Encoding:
Text File  |  1998-04-08  |  6.5 KB  |  247 lines

  1. # The contents of this file are subject to the Netscape Public License
  2. # Version 1.0 (the "NPL"); you may not use this file except in
  3. # compliance with the NPL.  You may obtain a copy of the NPL at
  4. # http://www.mozilla.org/NPL/
  5. #
  6. # Software distributed under the NPL is distributed on an "AS IS" basis,
  7. # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  8. # for the specific language governing rights and limitations under the
  9. # NPL.
  10. #
  11. # The Initial Developer of this code under the NPL is Netscape
  12. # Communications Corporation.  Portions created by Netscape are
  13. # Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  14. # Reserved.
  15.  
  16. #//------------------------------------------------------------------------
  17. #// Figure out how to do the pull.
  18. #//------------------------------------------------------------------------
  19. !if "$(MOZ_BRANCH)" != ""
  20. CVS_BRANCH=-r $(MOZ_BRANCH)
  21. HAVE_BRANCH=1
  22. !else
  23. HAVE_BRANCH=0
  24. !endif
  25.  
  26. #//
  27. #// Temporary hardcode (while we figure out how to do this)
  28. #//    to support the Core modularity efforts...
  29. #//
  30.  
  31. !ifndef MOZ_JAVAVER
  32. !ifdef MOZ_MEDIUM
  33. MOZ_JAVAVER    =-r JAVA_STUB_RELEASE_19980319
  34. !else
  35. MOZ_JAVAVER    =-r JAVA_RELEASE_19980304
  36. !endif
  37. !endif
  38.  
  39.  
  40. NSPR20_BRANCH  =-r NSPR20_RELEASE_19980304_BRANCH
  41. SECURITY_BRANCH=-r SECURITY_RELEASE_19980210
  42. CORECONF_BRANCH=-r CFG_1_6
  43. DBM_BRANCH     =-r DBM_RELEASE_19980319
  44.  
  45. !if "$(MOZ_DATE)" != ""
  46. CVS_BRANCH=-D "$(MOZ_DATE)"
  47. HAVE_DATE=1
  48. !else
  49. HAVE_DATE=0
  50. !endif
  51.  
  52. !if $(HAVE_DATE) && $(HAVE_BRANCH)
  53. ERR_MESSAGE=$(ERR_MESSAGE)^
  54. Cannot specify both MOZ_BRANCH and MOZ_DATE
  55. !endif
  56.  
  57. NMAKE=@nmake -nologo -$(MAKEFLAGS)
  58.  
  59. #//------------------------------------------------------------------------
  60. #//
  61. #// Stuff a do complete pull and build
  62. #//
  63. #//------------------------------------------------------------------------
  64.  
  65. default::         build_all
  66.  
  67. pull_and_build_all::     pull_all    \
  68.                 build_all
  69.  
  70. #// Do this when you pull a new tree, or else you will often get bugs
  71. #// when replaceing an old dist with a new dist.
  72.  
  73. pull_clobber_build_all:: pull_all \
  74.             clobber_all \
  75.             build_all
  76.  
  77. clobber_build_all::     clobber_all \
  78.             build_all
  79.  
  80. # In theory, we should use some symbol in ns/config/liteness.mak, 
  81. # but we haven't pulled the file yet.  So, refer to MOZ_LITE and
  82. # MOZ_MEDIUM explicitly .
  83. !if defined(MOZ_LITE) || defined(MOZ_MEDIUM)
  84. pull_all:: pull_client_source_product
  85. !else
  86. pull_all:: pull_client 
  87. !endif
  88.  
  89. !ifndef NO_SECURITY
  90. pull_security:
  91.     -cvs -q co $(CORECONF_BRANCH) ns/coreconf
  92.     -cvs -q co $(SECURITY_BRANCH) CoreSecurity
  93. !else
  94. pull_security:
  95. !endif
  96.  
  97. pull_client: pull_security
  98.     @echo +++ client.mak: checking out the client with "$(CVS_BRANCH)"
  99.     cd $(MOZ_SRC)\.
  100.     -cvs -q co $(DBM_BRANCH)      ns/dbm
  101.     -cvs -q co $(CVS_BRANCH)      Client50Win
  102.     -cvs -q co $(MOZ_JAVAVER)     JavaWin
  103.     -cvs -q co $(NSPR20_BRANCH)   CoreNSPR20
  104.  
  105. pull_client_source_product:
  106.     @echo +++ client.mak: checking out the client with "$(CVS_BRANCH)"
  107.     cd $(MOZ_SRC)\.
  108.     -cvs -q co $(DBM_BRANCH)      ns/dbm
  109.     -cvs -q co $(CVS_BRANCH)      ClientSourceProductWin
  110.     -cvs -q co $(MOZ_JAVAVER)     JavaStubWin
  111.  
  112.  
  113. build_all:              build_ldap  \
  114.             build_dist  \
  115.             build_client
  116. build_dist:
  117.     @echo +++ client.mak: building dist
  118.     cd $(MOZ_SRC)\ns
  119.     $(NMAKE) -f makefile.win
  120.  
  121.  
  122. !if defined(MOZ_LITE) || defined(MOZ_MEDIUM)
  123. build_ldap:
  124. !else
  125. build_ldap:
  126.     @echo +++ client.mak: building ldap
  127.     cd $(MOZ_SRC)\ns\netsite\ldap\libraries\msdos\winsock
  128.     $(NMAKE) -f nsldap.mak DEPEND=1
  129.     $(NMAKE) -f nsldap.mak 
  130.     $(NMAKE) -f nsldap.mak EXPORT=1
  131. !endif
  132.  
  133.  
  134. build_client:
  135.     @echo +++ client.mak: building client
  136.     cd $(MOZ_SRC)\ns\cmd\winfe\mkfiles32
  137. !if "$(MOZ_BITS)" == "16"
  138.     $(NMAKE) -f mozilla.mak exports
  139. !endif
  140.     $(NMAKE) -f mozilla.mak DEPEND=1
  141.     $(NMAKE) -f mozilla.mak
  142.  
  143.  
  144. #
  145. # remove all source files from the tree and print a report of what was missed
  146. #
  147. clobber_all:
  148.     cd $(MOZ_SRC)\ns
  149.     $(NMAKE) -f makefile.win clobber_all
  150.     cd $(MOZ_SRC)\ns\cmd\winfe\mkfiles32
  151.     $(NMAKE) -f mozilla.mak clobber_all
  152. !if !defined(MOZ_MEDIUM)
  153.     cd $(MOZ_SRC)\ns\netsite\ldap\libraries\msdos\winsock
  154.     $(NMAKE) -f nsldap.mak clobber_all
  155. !endif
  156.  
  157. depend:
  158.     -del /s /q make.dep
  159.     $(NMAKE) -f makefile.win depend 
  160.  
  161. quick:
  162.     @cd $(MOZ_SRC)\.
  163.     @cvs -q co ns/quickup
  164.     @cd $(MOZ_SRC)\ns\quickup
  165.     @$(MOZ_TOOLS)\perl5\perl doupdate.pl
  166.  
  167. #//------------------------------------------------------------------------
  168. #// Utility stuff...
  169. #//------------------------------------------------------------------------
  170.  
  171. #//------------------------------------------------------------------------
  172. # Verify that MOZ_SRC is set correctly
  173. #//------------------------------------------------------------------------
  174.  
  175. # Check to see if it is set at all
  176. !if "$(MOZ_SRC)"!=""
  177.  
  178. #
  179. # create a temp file at the root and make sure it is visible from MOZ_SRC
  180. #
  181. !if [copy $(MAKEDIR)\client.mak $(MAKEDIR)\xyzzy.tmp > NUL] == 0
  182. !endif
  183.  
  184. !if !EXIST( $(MOZ_SRC)\ns\xyzzy.tmp )
  185. ERR_MESSAGE=$(ERR_MESSAGE)^
  186. MOZ_SRC isn't set correctly: [$(MOZ_SRC)\ns]!=[$(MAKEDIR)]
  187. !endif
  188.  
  189. !if [del $(MAKEDIR)\xyzzy.tmp]
  190. !endif
  191.  
  192. !else
  193. # MOZ_SRC isn't set at all
  194. ERR_MESSAGE=$(ERR_MESSAGE)^
  195. Environment variable MOZ_SRC isn't set.
  196. !endif
  197.  
  198. #//------------------------------------------------------------------------
  199. # Verify that MOZ_BITS is set
  200. #//------------------------------------------------------------------------
  201. !if !defined(MOZ_BITS)
  202. ERR_MESSAGE=$(ERR_MESSAGE)^
  203. Environment variable MOZ_BITS isn't set.
  204. !endif
  205.  
  206. !if !defined(MOZ_TOOLS)
  207. ERR_MESSAGE=$(ERR_MESSAGE)^
  208. Environment variable MOZ_TOOLS isn't set.
  209. !endif
  210.  
  211.  
  212. #//------------------------------------------------------------------------
  213. #// Display error 
  214. #//------------------------------------------------------------------------
  215.  
  216.  
  217. !if "$(ERR_MESSAGE)" != ""
  218. ERR_MESSAGE = ^
  219. client.mak:  ^
  220. $(ERR_MESSAGE) ^
  221. ^
  222. client.mak: usage^
  223. ^
  224. nmake -f client.mak [MOZ_BRANCH=<cvs_branch_name>] ^
  225.             [MOZ_DATE=<cvs_date>]^
  226.             [pull_and_build_all]^
  227.             [pull_all]^
  228.             [pull_dist]^
  229.             [pull_client]^
  230.             [build_all]^
  231.             [build_dist]^
  232.             [build_ldap]^
  233.             [build_client]^
  234. ^
  235. Environment variables:^
  236. ^
  237. MOZ_BITS    set to either 32 or 16 ^
  238. MOZ_SRC     set to the directory above ns or "$(MAKEDIR)\.."^
  239. MOZ_TOOLS   set to the directory containing the java compiler see ^
  240.         http://warp/tools/nt^
  241. JAVA_HOME   set to the same thing as MOZ_TOOLS^
  242.  
  243. !ERROR $(ERR_MESSAGE)
  244.  
  245. !endif
  246.  
  247.