Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.sai.msu.su/~er/xntp/build.html
Дата изменения: Unknown
Дата индексирования: Sat Dec 22 01:42:48 2007
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п
Building and Installing the Distribution

Building and Installing the Distribution


Following are instructions to build and install the programs in this distribution.

Compilation

Make sure that you have all necessary tools for building executables. These tools include cc/gcc, make, awk, sed, tr, sh, grep, egrep and a few others. Not all of these tools exist in the standard distribution of modern Unix versions (compilers are likely to be an add-on product - consider using gcc in this case). For a successful build, all of these tools should be accessible via the current path.

The automatic build process expects a configuration file called Config.local. You can provide one or the system will build one for you using the Config.local.dist as a model. The configuration file specifies the directory in which to install the binaries, as well as control over the generation of debugging code and reference clock support. However, many other options can be controlled by editing other files, as described in the Configuration Options page.

Note that the automatic build process inspects your machine environment and tests for the presence of system header files and the contents of these files to determine if certain features are available. In particular, the process looks for system-dependent timex.h, clkdefs.h, chudefs.h and ppsclock.h header files, which should be present only if one or more of the line disciplines, stream modules or precision time kernel modifications are present. When one or more of these features are present, the code is compiled to use them; if not, no special code is compiled. However, even if the code is compiled to use them, at run time the code does a special test to see if one or more are actually present and avoids using them if not present.

Use the make command to perform an automatic build procedure. This procedure normally includes the debugging code, which can be useful in diagnosing problems found in initial test, and all reference clock drivers known to work with each machine and operating system. Unless memory space is at a premium, this is a sensible strategy and saves lots of messy fiddling. If you need to delete either the debugging code or the reference clock support to save space, first copy the Config.local.dist file to the Config.local file and then edit this file. To delete the debugging code, remove the -DDEBUG flag in the -DDEFS_LOCAL line. configuration file. To delete all drivers, remove the - DREFCLOCK flag. To include only selected drivers, see the Reference Clock Drivers page for a index and description of each driver. Select which drivers you want and determine the compile-time flag (e.g., WWVB for the Spectracom WWVB driver). Then, construct a CLOCKDEFS= line with a list of flags in the form -Dflag for each driver you want.

The build procedure normally compiles everything of general interest. Expect few or no warnings using cc and a moderate level of warnings using gcc. Note: On some Unix platforms the use of gcc can result in quite a few complaints about system header files and type problems within xntp3 code. This is usually the case when the OS header files are not up to ANSI standards or GCCISMs. (There may, however, be still some inconsistencies in the code)

Each time the configuration file is changed, a shell script is run that pokes the hardware and software to build the makefiles in the various directories and remove old program and object files. If the script fails, it will give you a list of machines it knows about. You can override the automatic choice by changing to the ../machines directory and typing make makeconfig OS=machine, where machine; is one of the file names in the ../machinesdirectory.

The shell script will attempt to find the gcc compiler and, if found, will use it instead of the normal cc compiler. You can override the automatic choice by changing to the ../machines directory and typing make makeconfig COMP=compiler, where compiler is one of the file names in the ../compilers directory. This can be combined with the OS argument above.

Installation

Assuming you have write permission on the install destination directory, type make install to install the binaries in the destination directory. This includes the programs xntpd (the daemon), xntpdc (an xntpd- dependent query program), ntpq (a standard query program), ntpdate (an rdate replacement for boot time date setting and sloppy time keeping), and tickadj (a utility useful in some systems to adjust kernel variables).

You are now ready to configure the daemon and start it. You will need to create a NTP configuration file ntp.conf and possibly a cryptographic key file ntp.keys. Directions for doing that are in the Notes on Configuring NTP and Setting up a NTP Subnet. A tutorial on debugging technique is in NTP Debugging Technique. If problems peculiar to the particular hardware and software environment are suspected, browse the Hints and Kinks page.

Bug reports of a general nature can be sent to David Mills (mills@udel.edu). Bug reports of a specific nature on features implemented by the programmer corps mentioned in the Copyright page should be sent directly to the implementor listed in that page, with copy to mills@udel.edu.

Additional make targets

make makeconfig
Makes just the makefiles.

make clean
Cleans out object files, programs and temporary files.

make distclean
Does the work of clean, but cleans out all directories in preparation for a new distribution release.

make depend
Possible maker of hazardous waste

David L. Mills (mills@udel.edu)