README
上传用户:lyxiangda
上传日期:2007-01-12
资源大小:3042k
文件大小:26k
源码类别:

CA认证

开发平台:

WINDOWS

  1. OVERVIEW of "ns/coreconf":
  2.     This README file is an attempt to provide the reader with a simple
  3.     synopsis of the "ns/coreconf" build system which was originally
  4.     fundamentally designed and built to accomodate Netscape's binary
  5.     release model.  Wherever possible, an attempt has been made to
  6.     comply with the NSPR 2.0 build system, including mimicing the
  7.     compiler/linker flags, and directory naming structure.  The reader
  8.     should keep in mind that the system builds binary releases of
  9.     header files, class files, libraries, and executables on numerous
  10.     flavors of UNIX and Windows operating systems.  Unfortunately,
  11.     no serious attempt has ever been made to incorporate an ability to
  12.     generate cross-platform binaries on an Apple MacIntosh platform.
  13.     Note that this file will not attempt to redefine or document the
  14.     architecture of this system.  However, documents on this subject
  15.     are available at the following URL:
  16.         http://warp/hardcore/prj-ttools/specs/release/index.html
  17. DEPENDENCIES of "ns/coreconf":
  18.     The "ns/coreconf" build system requires the specified versions of
  19.     the following platform-dependent tools:
  20.         UNIX Platforms:
  21.         --------------
  22.         gmake (version 3.74 or later)
  23.         perl 4.0 (NOTE:  perl 5.003 or later recommended)
  24.         uname
  25.         Windows Platforms:
  26.         -----------------
  27.         gmake 3.74 (must use hacked Netscape version)
  28.         shmsdos.exe (contained in Netscape gmake.exe)
  29.         nsinstall.exe (contained in Netscape gmake.exe)
  30.         perl.exe (version 4.0 for everything except testing;
  31.                   NOTE:  MKS toolkit perl 5.002 is broken)
  32.         perl5.exe (for testing;
  33.                    NOTE:  perl 5.003 or later recommended;
  34.                           MKS toolkit perl 5.002 is broken)
  35.         uname.exe (use nstools version)
  36. ENHANCEMENTS to "ns/coreconf":
  37.     With the advent of Certificate Server 4.0 using the ns/coreconf
  38.     build system, several changes had to be made to enhance
  39.     ns/coreconf support for building Java/JNI classes/programs, as
  40.     well as libraries slated to be released as binaries.  While the
  41.     following may not represent an exhaustive list of these changes,
  42.     it does attempt to be at least somewhat comprehensive:
  43.         (1) During the course of these enhancements, a total of
  44.             four files have been modified, and four new files have
  45.             been added.
  46.             The following files have been modified:
  47.                 - command.mk:    removed old definition of JAR
  48.                 - config.mk:     added include statement of new
  49.                                  "jdk.mk" file
  50.                 - ruleset.mk:    allowed the $(MKPROG) variable to be
  51.                                  overridden by supplying it with a
  52.                                  default value of $(CC); augmented
  53.                                  numerous definitions to enhance
  54.                                  ability of ns/coreconf to produce
  55.                                  a more robust set of libraries;
  56.                                  added some JNI definitions; PACKAGE
  57.                                  definition may be overridden by new
  58.                                  "jdk.mk" file
  59.                 - rules.mk:      separated the compile phase of a
  60.                                  program from the link phase of a
  61.                                  program such that a developer can
  62.                                  now strictly override program linkage
  63.                                  by simply supplying a $(MKPROG)
  64.                                  variable; augmented NETLIBDEPTH
  65.                                  to use CORE_DEPTH but retain backward
  66.                                  compatibility; added JNI section;
  67.                                  modified .PRECIOUS rule;
  68.             The following files have been added:
  69.                 - README:        this file; an ASCII-based text
  70.                                  document used to summarize the
  71.                                  ns/coreconf build system and
  72.                                  suitable (paginated) for printing
  73.                 - jdk.mk:        a file comprising most (if not all)
  74.                                  of the default Java related build
  75.                                  information; the definitions in this
  76.                                  file are only included if NS_USE_JDK
  77.                                  has been defined
  78.                 - jniregen.pl:   a perl script used to create a
  79.                                  dependency for when JNI files should
  80.                                  be regenerated (based upon any change
  81.                                  to the ".class" file from which the
  82.                                  ".h" file was originally generated)
  83.                 - outofdate.pl:  a perl script used to create a
  84.                                  dependency for when ".class" files
  85.                                  should be regenerated (based upon
  86.                                  any change to the ".java" file
  87.                                  from which the ".class" file was
  88.                                  originally generated)
  89.         (2) As stated above, the ns/coreconf build system now separates
  90.             the link phase of a program from its compilation phase.
  91.             While ns/coreconf still works exactly as it used to because
  92.             the $(MKPROG) variable is assigned $(CC) by default, a developer
  93.             may now override this behavior by simply supplying their
  94.             own unique value for $(MKPROG) on every platform.  This allows
  95.             a program compiled with $(CC) to link with external libraries
  96.             that may contain "C++" linkage.  Before this change, a
  97.             programmer would need to reference their own local copy of
  98.             rules.mk (see the ns/sectools/cmd/pk12util program for
  99.             an example of how this used to be accomplished).
  100.         (3) Currently, the ns/coreconf build system differs from the
  101.             NSPR 2.0 build system which utilizes an "_s" to denote
  102.             static libraries from import libraries.  In fact, the
  103.             ns/coreconf build system adds no prefixes or suffixes to
  104.             distinguish one version of static libraries from another.
  105.             Note that both the ns/coreconf build system as well as the
  106.             NSPR 2.0 build system do nothing to provide a method of
  107.             distinguishing 16-bit from 32-bit static libraries on the
  108.             same machine, either, since:
  109.                 a) this might only provide difficulty during
  110.                    development, since static libraries always
  111.                    need to be embedded within a program
  112.                    (note this is highly unlikely, since libraries
  113.                     for different platforms are subdivided via
  114.                     a well-known subdirectory structure, and
  115.                     a developer may use multiple trees for
  116.                     development),
  117.                 b) this maintains backwards compatibility,
  118.                    something very important since no legacy
  119.                    programs will need to change their link phase, and
  120.                 c) Netscape as a company has dropped any plans
  121.                    of future development of 16-bit products.
  122.         (4) Since several members of the Hardcore Security group did
  123.             not favor NSPR 2.0's solution of adding an "_s" to static
  124.             libraries on Windows platforms as a method to distinguish
  125.             them from their import library cousins, a different solution
  126.             was proposed and has been recently implemented for ns/coreconf:
  127.                 - a 16 has been added as a suffix to both dynamic and
  128.                   import libraries built on 16-bit Windows platforms
  129.                 - a 32 has been added as a suffix to both dynamic and
  130.                   import libraries built on 32-bit Windows platforms
  131.             Since, the HCL release process currently only contains a
  132.             single instance of building a dynamic library,
  133.             ns/security/lib/fortcrypt/fort12.dll, the impact of this
  134.             change should be relatively small.
  135.             It should be noted that although this would additionally
  136.             limit the 8.3 namespace on 16-bit platforms, it is highly
  137.             unlikely that any future development will be performed on
  138.             this platform.
  139.         (5) The $(LIBRARY_VERSION) tag has been added to all non-static
  140.             libraries created on UNIX operating systems to alleviate
  141.             any future confusion for binary releases which utilize this
  142.             tag.  Again, it should be noted that this tag is only
  143.             utilized on non-static libraries, since more than one
  144.             version of the library may need to exist simultaneously
  145.             if multiple products are utilized.
  146.             Currently, only one HCL released library utilizes this tag:
  147.                 ns/security/lib/fortcrypt/fort12.a
  148.                 (e. g. - in this library, the tag has been set to '12')
  149.             Again, it should be noted that although this would
  150.             additionally limit the 8.3 namespace on 16-bit platforms,
  151.             it is highly unlikely that any future development will be
  152.             performed on this platform.
  153.         (6) The $(JDK_DEBUG_SUFFIX) extension has been added to all
  154.             library and program names to support debug versions of
  155.             Java programs (e. g. - java_g, javac_g, etc).
  156.             Once again, it should be noted that although this would
  157.             additionally limit the 8.3 namespace on 16-bit platforms,
  158.             it is highly unlikely that any future Java development
  159.             will be performed on this platform.
  160.         (7) Most (if not all) default definitions for java have been
  161.             encapsulated within their own file, jdk.mk, which is
  162.             always included by default in ns/coreconf/config.mk.
  163.             However, the definitions within this file are only ever
  164.             activated if NS_USE_JDK has been set to be 1.
  165.         (8) Two perl scripts (jniregen.pl and outofdate.pl) have been
  166.             added to the system to foster a more robust development
  167.             environment for composing Java and JNI programs
  168.             utilizing the ns/coreconf build system.  Both of these
  169.             perl scripts are related to resolving dependencies which
  170.             can not be accomplished through normal makefile dependencies.
  171.         (9) This file, README, was created in an attempt to allow
  172.             developers who have familiarity with ns/coreconf a simple
  173.             roadmap for what has changed, as well as a top-level view of
  174.             what comprises ns/coreconf.  This file was written in
  175.             ASCII (rather than HTML) primarily to promote simple
  176.             paginated printing.
  177. OVERVIEW of "config.mk":
  178.     This file contains the configuration information necessary to
  179.     build each "Core Components" source module:
  180.         include file name       Purpose
  181.         ===================     =======================================
  182.         arch.mk                 source and release <architecture> tags
  183.         command.mk              default command macros 
  184. (NOTE: may be overridden in $(OS_CONFIG).mk)
  185.         $(OS_CONFIG).mk         <architecture>-specific macros
  186.                                 (dependent upon <architecture> tags)
  187.         platform.mk             source and release <platform> tags 
  188. (dependent upon <architecture> tags)
  189.         tree.mk                 release <tree> tags 
  190. (dependent upon <architecture> tags)
  191.         module.mk               source and release <component> tags 
  192. (NOTE:  A component is also called a module 
  193. or a subsystem.  This file is dependent upon
  194.                                 $(MODULE) being defined on the command
  195.                                 line, as an environment variable, or in
  196.                                 individual makefiles, or more
  197.                                 appropriately, manifest.mn)
  198.         version.mk              release <version> tags 
  199. (dependent upon $(MODULE) being defined on 
  200. the command line, as an environment variable, 
  201. or in individual makefiles, or more
  202.                                 appropriately, manifest.mn)
  203.         location.mk             macros to figure out binary code location
  204.                                 (dependent upon <platform> tags)
  205.         source.mk               <component>-specific source path
  206.                                 (dependent upon <user_source_tree>,
  207.                                 <source_component>, <version>, and
  208.                                 <platform> tags)
  209.         headers.mk              include switch for support header files 
  210. (dependent upon <tree>, <component>, <version>,
  211.                                 and <platform> tags)
  212.         prefix.mk               compute program prefixes
  213.         suffix.mk               compute program suffixes 
  214. (dependent upon <architecture> tags)
  215.         jdk.mk                  define JDK 
  216. (dependent upon <architecture>,
  217.                                 <source>, and <suffix> tags)
  218.         ruleset.mk              Master "Core Components" rule set
  219.                                 (should always be the last file
  220.                                 included by config.mk)
  221. OVERVIEW of "rules.mk":
  222.     The "rules.mk" file consists of four sections.  The first section
  223.     contains the "master" build rules for all binary releases.  While
  224.     this section can (and should) largely be thought of as "language"
  225.     independent, it does utilize the "perl" scripting language to
  226.     perform both the "import" and "release" of binary modules.
  227.     The rules which dwell in this section and their purpose:
  228.         CATEGORY/rule::         Purpose
  229.         ===================     =======================================
  230.         GENERAL
  231.         -------
  232.         all::                   "default" all-encompassing rule which
  233.                                 performs "export libs program install"
  234.         export::                recursively copy specified
  235.                                 cross-platform header files to the
  236.                                 $(SOURCE_XPHEADERS_DIR) directory;
  237.                                 recursively copy specified
  238.                                 machine-dependent header files to the
  239.                                 $(SOURCE_MDHEADERS_DIR) directory;
  240.                                 although all rules can be written to
  241.                                 repetively "chain" into other sections,
  242.                                 this rule is the most commonly used
  243.                                 rule to "chain" into other sections
  244.                                 such as Java providing a simple
  245.                                 mechanism which allows no need for
  246.                                 developers to memorize specialized
  247.                                 rules
  248.         libs::                  recursively build
  249.                                 static (archival) $(LIBRARY), shared
  250.                                 (dynamic link) $(SHARED_LIBRARY),
  251.                                 import $(IMPORT_LIBRARY), and/or
  252.                                 "purified" $(PURE_LIBRARY)
  253.                                 libraries
  254.         program::               recursively build $(PROGRAM)
  255.                                 executable
  256.         install::               recursively copy all libraries to
  257.                                 $(SOURCE_LIB_DIR) directory;
  258.                                 recursively copy all executables to
  259.                                 $(SOURCE_BIN_DIR) directory
  260.         clean::                 remove all files specified in the
  261.                                 $(ALL_TRASH) variable
  262.         clobber::               synonym for "clean::" rule
  263.         realclean::             remove all files specified by
  264.                                 $(wildcard *.OBJ), dist, and in
  265.                                 the $(ALL_TRASH) variable
  266.         clobber_all::           synonym for "realclean::" rule
  267.         private_export::        recursively copy specified
  268.                                 cross-platform header files to the
  269.                                 $(SOURCE_XPPRIVATE_DIR) directory
  270.         IMPORT
  271.         ------
  272.         import::                uses perl script to retrieve specified
  273.                                 VERSION of the binary release from
  274.                                 $(RELEASE_TREE)
  275.         RELEASE
  276.         -------
  277.         release_clean::         remove all files from the
  278.                                 $(SOURCE_RELEASE_PREFIX) directory
  279.         release::               place specified VERSION of the
  280.                                 binary release in the appropriate
  281.                                 $(RELEASE_TREE) directory
  282.         release_export::        recursively copy specified
  283.                                 cross-platform header files to the
  284.                                 $(SOURCE_XPHEADERS_DIR)/include
  285.                                 directory
  286.         release_md::            recursively copy all libraries to
  287.                                 $(SOURCE_RELEASE_PREFIX)/
  288.                                 $(SOURCE_RELEASE_LIB_DIR) directory;
  289.                                 recursively copy all executables to
  290.                                 $(SOURCE_RELEASE_PREFIX)/
  291.                                 $(SOURCE_RELEASE_BIN_DIR) directory
  292.         release_jars::          use perl script to package appropriate
  293.                                 files in the $(XPCLASS_JAR),
  294.                                 $(XPHEADER_JAR), $(MDHEADER_JAR), and
  295.                                 $(MDBINARY_JAR) jar files
  296.         release_cpdistdir::     use perl script to copy the
  297.                                 $(XPCLASS_JAR), $(XPHEADER_JAR),
  298.                                 $(MDHEADER_JAR), and $(MDBINARY_JAR)
  299.                                 jar files to the specified VERSION
  300.                                 of the $(RELEASE_TREE) directory
  301.         TOOLS and AUTOMATION
  302.         --------------------
  303.         platform::              tool used to display the platform name
  304.                                 as composed within the "arch.mk" file
  305.         autobuild::             automation rule used by "Bonsai" and
  306.                                 "Tinderbox" to automatically generate
  307.                                 binary releases on various platforms
  308.         tests::                 automation tool used to run the
  309.                                 "regress" and "reporter" tools 
  310.                                 on various regression test suites
  311.     The second section of "rules.mk" primarily contains several
  312.     "language" dependent build rules for binary releases.  These are
  313.     generally "computed" rules (created on the "fly"), and include
  314.     rules used by "C", "C++", assembly, the preprocessor, perl, and
  315.     the shell.
  316.     The rules which dwell in this section and their purpose:
  317.         CATEGORY/rule::                   Purpose
  318.         ===================               =============================
  319.         LIBRARIES
  320.         ---------
  321.         $(LIBRARY):                       build the static library
  322.                                           specified by the $(LIBRARY)
  323.                                           variable
  324.         $(IMPORT_LIBRARY):                build the import library
  325.                                           specified by the
  326.                                           $(IMPORT_LIBRARY) variable
  327.         $(SHARED_LIBRARY):                build the shared
  328.                                           (dynamic link) library
  329.                                           specified by the
  330.                                           $(SHARED_LIBRARY) variable
  331.         $(PURE_LIBRARY):                  build the "purified" library
  332.                                           specified by the
  333.                                           $(PURE_LIBRARY) variable
  334.         PROGRAMS
  335.         --------
  336.         $(PROGRAM):                       build the binary executable
  337.                                           specified by the $(PROGRAM)
  338.                                           rule
  339.         $(OBJDIR)/
  340.         $(PROG_PREFIX)%.pure:             build the "purified" binary
  341.                                           executable specified by this
  342.                                           rule
  343.         OBJECTS
  344.         -------
  345.         $(OBJDIR)/
  346.         $(PROG_PREFIX)%$(OBJ_SUFFIX):     build the object file
  347.                                           associated with the
  348.                                           makefile rule dependency:
  349.                                               %.c   = C file
  350.                                               %.cpp = C++ file
  351.                                               %.cc  = C++ file
  352.                                               %.s   = assembly file
  353.                                               %.S   = assembly file
  354.         $(OBJDIR)/
  355.         $(PROG_PREFIX)%:                  (NOTE: deprecated rule)
  356.                                           build the object file
  357.                                           associated with the
  358.                                           makefile rule dependency:
  359.                                               %.cpp = C++ file
  360.         MISCELLANEOUS
  361.         -------------
  362.         $(DIRS)::                         specifies a helper method
  363.                                           used by $(LOOP_THROUGH_DIRS)
  364.                                           to recursively change
  365.                                           directories and invoke
  366.                                           $(MAKE)
  367.         %.i:                              build the preprocessor file
  368.                                           associated with the
  369.                                           makefile rule dependency:
  370.                                               %.c   = C file
  371.                                               %.cpp = C++ file
  372.         %:                                process the specified file
  373.                                           using the method associated
  374.                                           with the makefile rule
  375.                                           dependency:
  376.                                               %.pl = perl script
  377.                                               %.sh = shell script
  378.         alltags:                          tool used to recursively
  379.                                           create a "ctags"-style
  380.                                           file for reference
  381.     The third section of "rules.mk' primarily contains several JAVA
  382.     "language" build rules for binary releases.  These are also
  383.     generally "computed" rules (created on the "fly").
  384.     The rules which dwell in this section and their purpose:
  385.         CATEGORY/rule::                   Purpose
  386.         ===================               =============================
  387.         $(JAVA_DESTPATH)::                create directory specified
  388.                                           as the Java destination path
  389.                                           for where classes are
  390.                                           deposited
  391.         $(JAVA_DESTPATH)/$(PACKAGE)::     create directories specified
  392.                                           within the $(PACKAGE)
  393.                                           variable
  394.         $(JMCSRCDIR)::                    create directory specified
  395.                                           as the JMC destination path
  396.         $(JRI_HEADER_CFILES):             used to generate/regenerate
  397.                                           JRI header files for "C"
  398.         $(JRI_STUB_CFILES):               used to generate/regenerate
  399.                                           JRI stub files for "C"
  400.         $(JNI_HEADERS):                   used to generate/regenerate
  401.                                           JNI header files for "C"
  402.     The fourth section of "rules.mk" primarily contains miscellaneous
  403.     build rules for binary releases.  Many of these rules are here to
  404.     create new subdirectories, manage dependencies, and/or override
  405.     standard gmake "Makefile" rules.
  406.     The rules which dwell in this section and their purpose:
  407.         CATEGORY/rule::                   Purpose
  408.         ===================               =============================
  409.         $(PUBLIC_EXPORT_DIR)::            create directory used to
  410.                                           house public "C" header files
  411.         $(PRIVATE_EXPORT_DIR)::           create directory used to
  412.                                           house private "C" header
  413.                                           files
  414.         $(SOURCE_XP_DIR)/
  415.         release/include::                 create directory used to
  416.                                           house "C" header files
  417.                                           contained in a release
  418.         $(MKDEPENDENCIES)::               for UNIX systems, create
  419.                                           a directory used to house
  420.                                           dependencies and utilize
  421.                                           the $(MKDEPEND) rule to
  422.                                           create them
  423.         $(MKDEPEND)::                     cd to the dependency
  424.                                           directory and create them
  425.         depend::                          if $(OBJS) exist, perform the
  426.                                           $(MKDEPEND) rule followed by
  427.                                           the $(MKDEPENDENCIES) rule
  428.         dependclean::                     remove all files contained
  429.                                           in the dependency repository
  430.         .DEFAULT:                         standard gmake rule
  431.         .SUFFIXES:                        standard gmake rule
  432.         .PRECIOUS:                        standard gmake rule
  433.         .PHONY:                           standard gmake rule