
Lib-C makefile Info.
--------------------

This directory is the top level for libc.  The primary build targets are
available here, such as various libc build flavors.

Top Level Targets:
  all 		builds all product deliverables.

  product	builds all product deliverables, and check-ins configuration 
		records.  Uses the VERSION macro (see below).

  source_product	builds makefiles to be shipped with source code.

  clean		removes all target and intermediate derived object files.


A build flavor such as archive_pa1 or profiled_pa1 may be made at this
level, or from the subdirectory with the flavor name.  All object files and
other derived objects are built in the flavor subdirectories (e.g.,
./shared_pa1 contains als shared object files, libc.1, and libpicc.a).

	cd /ux/core/libs/libc
	clearmake archive_pa1

	cd /ux/core/libs/libc/shared_pa1
	clearmake libc.1

Derived objects not depending on flavor usually end up at this top level
(e.g., message catalogs) or in the default flavor -- archived_pa1 (e.g.,
unix95.o).

	cd /ux/core/libs/libc
	clearmake all

The what-string incorporates the string defined by the VERSION macro. It
defaults to a generic internal-only string, but should be set on the make
command line whenever a delivery or patch is made outside of clearcase.

	cd /ux/core/libs/libc
	clearmake product VERSION=R10.24_IC7_patch5

Using the product target check-ins the config. record, so that the what-string
will identify the config. record, and the config. record can be used to set a
view for debugging.  It's also a good idea to label the config. record elements
(or the entire source tree) with the same label, if that version of the product
may have to be supported for a long while.

	cd /ux/core/libs/libc/shared_pa1
	clearmake product VERSION=Joes_Test_Mem_Fix_4
	what libc.1
	  libc.1:
		Joes_Test_Mem_Fix_4 libc.1_ID@@/main/r10wc/mem_fix10wc/8
		 /ux/core/libs/libc/shared_pa1/libc.a_ID
		 Nov  9 1995 09:44:18

	jmkvw Joes_Test_View r10wc  /view/WS_libc/ux/core/libs/libc/shared_pa1/\
	libc.a_ID@@/main/r10wc/mem_fix10wc/8


Individual object files can not be built from the top level or the
flavor-level makefiles (they just do recursive makes).  To build an
individual file, cd down to the directory where the source exists, and make
the object file(s):

	cd /ux/core/libs/libc/core/bsd
	clearmake foo.o bar.o

Note that this builds the files locally, not in the flavor directory, and
the object will be re-built there when a library is made at that level.

Note also that the objects are built using the default flavor
(archived_pa1).  To build an individual object of a different flavor,
specify the flavor directory on the command line:

	clearmake foo.o bar.o FLAVOR=../../shared_pa1

	clearmake FLAVOR=/ux/core/libs/libc/profiled_pa1 foo.o

The individual objects are built using included macros and rules defined
in the flavor directories and this top-level.  Such files all start with
"make.".  See those files for additional information.

	make.defines	- defines used to compile/unifdef code & headers
	make.lib_rules	- common rules to build library 
	make.obj_rules	- common rules to compile object files
	<flavor>/make.flavor 	- flavor differences for objects
	<flavor>/makefile 	- flavor differences for libraries


Source Product
==============

Clearmake makefiles aren't necessarily compatible with standard make.
Standard makefiles are generated from ClearCase config records.  

Note that in the present version of ClearCase (2.0.2), dollar signs are not
escaped and generated makefiles must be post-processed to do so.  The
source_product rules do some post-processing to remove quirks of our
environment, but should not do anything that depends on what version of SCM
tools are being run, so the dollar sign problem is passed on to the user.
Any file generated with catcr has this problem.  For ease of automation,
the makefile rules will identify such files with the keyword "CATCR_FILE:".

The destination of the source product generated files is defined by the
SRCDIR macro, which can be set on the command-line.

	cd /ux/core/libs/libc
	clearmake source_product SRCDIR=/integ/src/11.04/libc > log
	grep '^CATCR_FILE:' log
