|
|||
What is probe?Part of the nmake distribution includes a tool called probe. Probe makes determinations about the compiler and the environment to tune nmake to the specific environment. Why is probe used?nmake is used on many UNIX® platforms and with compilers from different vendors. Different platforms have different standards, and compiler vendors often implement features differently in their software. It is necessary to probe the environment so nmake knows specifically how to act in this environment, what arguments the compiler accepts, what capabilities the compiler has, etc. Probing the environment allows nmake to tune itself dynamically to different compilers and UNIX implementations. What exactly does probe do?Probe runs a series of tests to learn the specifics of the platform and the compiler. The results of the tests are stored in "probe files". The tests are run once, the first time a compiler is used. After that nmake uses the probe files rather than running the tests again. What are the probe files?The probe files are stored in <nmake_root>/lib/probe/C/[make|pp]/ and have odd looking filenames such as 182DF9485bincc and 734E74F7.0.3CC. These filenames are hashed values determined by factors such as the following:
nmake keeps different probe files based on the above attributes. This insures different compilers (determined by the path to the compiler) will have different probe files, and different modes of the same compiler will also have different probe files. If you upgrade a compiler in place (ie. a new compiler has the same path as the old one and none of the above attributes change) the compiler will not be re-probed. However, if the compiler is placed in a new path then it will be probed the first time it is used. There are usually two probe files per compiler. The make probe file contains nmake information, the pp probe file contains cpp information. If the native cpp supports viewpathing then no pp probe file will be created because the native cpp will be used instead of nmake cpp (see the cpp FAQ for details.) You can find the make probe file for a given compiler by running the command below. To list a probe file replace -k with -l. For the pp probe file replace make with pp.
probe -k C make /full/path/to/cc
Cross-compilersCross compilers are a special case. Libraries and headers for cross compilers are generally not stored in the standard directories, such as /usr/lib and /usr/include, and cross compiler tools such as ld and nm often have custom names which nmake does not know about. Given these customizations, the probe files for cross compilers may need to be hand modified after they are generated to accomidate such differences. If you need to modify the probe file then change the mode to 644 and edit the file. And remember, when new compilers are installed, or new versions of nmake are installed, these hand modifications will have to be carried over manually. A better option to hand modifications is the use of probe_hints described below. Probe HintsRelease lu3.4 introduced the probe_hints feature which allows the administrator to define overrides for probe values. The overrides happen automatically whenever a compiler is probed, so once the probe_hints are installed new probe files need not be hand modified. See probe_hints in the lu3.4 release notes for details. RequirementsThe probe binary executable is a wrapper to launch shell scripts that do the actual probing. The executable is <nmake_root>/lib/probe/probe and must have set uid permissions so it can create the probe files. The permissions must be set to 4755 and look like -rwsr-xr-x. The probe shell scripts target ksh and bash compatibility. The scripts are installed at <nmake_root>/lib/probe/C/make/probe and <nmake_root>/lib/probe/C/pp/probe. Common probe errors
Changes Since nmake 3.0The following variables are no longer defined in the make probe file as of nmake 3.0.2:
The following variables have been added to the make probe file since nmake release 3.0.1:
The following variables have been added to the make probe file since nmake release lu3.4:
More InformationFor more information on probe refer to the probe(1) man page and Appendix A of the nmake User's Guide. Last Update: Wednesday,20-Dec-06 13:21:59 CST
|
|||