Blame doc/PORTING

rpm-build 0a0c83
rpm-build 0a0c83
1. unpack the source tarball and cd to the resulting dir
rpm-build 0a0c83
rpm-build 0a0c83
2. # autoconf  
rpm-build 0a0c83
   this reads configure.in and generates the ./configure script
rpm-build 0a0c83
rpm-build 0a0c83
3. # ./configure 
rpm-build 0a0c83
   this probes your system and then, for each "file" named
rpm-build 0a0c83
   in the AC_OUTPUT() macro near the end of configure.in,
rpm-build 0a0c83
   read "file".in and generate "file". Variables named @somevariable@
rpm-build 0a0c83
   will be substituted with literal values.
rpm-build 0a0c83
rpm-build 0a0c83
4. step (3) produces several files. These files are generated by
rpm-build 0a0c83
   configure from their respective .in file in the same directory.
rpm-build 0a0c83
   You should have a read of these generated files and diff them
rpm-build 0a0c83
   against their respective .in files to see what was substituted
rpm-build 0a0c83
   by configure.
rpm-build 0a0c83
rpm-build 0a0c83
   src/include/builddefs
rpm-build 0a0c83
   	common definitions for the build environment. This is included
rpm-build 0a0c83
	by all Makefiles, in conjunction with src/include/buildrules.
rpm-build 0a0c83
	Note that most autoconf/configure build environments generate
rpm-build 0a0c83
	Makefile (from Makefile.in) in every src dir. Instead, we
rpm-build 0a0c83
	generate builddefs, and then include it in every Makefile.
rpm-build 0a0c83
rpm-build 0a0c83
   src/include/platform_defs.h 
rpm-build 0a0c83
   	header containing conditional macros defining the C run-time
rpm-build 0a0c83
	environment discovered by the configure script.
rpm-build 0a0c83
rpm-build 0a0c83
5. read some or all of the GNU tool chain documentation
rpm-build 0a0c83
   GNU make :
rpm-build 0a0c83
       http://www.delorie.com/gnu/docs/make/make_toc.html
rpm-build 0a0c83
   autoconf :
rpm-build 0a0c83
    	http://www.delorie.com/gnu/docs/autoconf/autoconf_toc.html
rpm-build 0a0c83
   libtool :
rpm-build 0a0c83
    	http://www.delorie.com/gnu/docs/libtool/libtool_toc.html
rpm-build 0a0c83
   gcc/g++ :
rpm-build 0a0c83
    	http://www.delorie.com/gnu/docs/gcc/gcc_toc.html
rpm-build 0a0c83
rpm-build 0a0c83
6. Makefiles and build environment
rpm-build 0a0c83
   First have a look at some Makefiles
rpm-build 0a0c83
rpm-build 0a0c83
   	example using SUBDIRS :  acl/Makefile
rpm-build 0a0c83
        example static library:  acl/libacl/Makefile
rpm-build 0a0c83
        example command       :  acl/getfacl/Makefile
rpm-build 0a0c83
rpm-build 0a0c83
   All Makefiles must define TOPDIR as the root of the project. This
rpm-build 0a0c83
   allows other stuff to be found relative to $(TOPDIR).
rpm-build 0a0c83
rpm-build 0a0c83
   All Makefiles should have the following structure, which is
rpm-build 0a0c83
   much like commondefs and commonrules in the IRIX build environment, e.g.
rpm-build 0a0c83
rpm-build 0a0c83
   # ----------------------------------------------------------------------
rpm-build 0a0c83
   # TOPDIR must point to the root of the project
rpm-build 0a0c83
   # The builddefs file defines lots of things. Read it.
rpm-build 0a0c83
   TOPDIR = ..
rpm-build 0a0c83
   include $(TOPDIR)/include/builddefs
rpm-build 0a0c83
rpm-build 0a0c83
   # first rule should always be "default"
rpm-build 0a0c83
   default : sometarget
rpm-build 0a0c83
   	commands to build targets, if necessary
rpm-build 0a0c83
rpm-build 0a0c83
   # $(BUILDRULES) is defined in builddefs and includes rules for
rpm-build 0a0c83
   # descending subdirs, building targets and installation rules
rpm-build 0a0c83
   include $(BUILDRULES)
rpm-build 0a0c83
rpm-build 0a0c83
   install : default
rpm-build 0a0c83
   	$(INSTALL) sometargets somewhere
rpm-build 0a0c83
   # ----------------------------------------------------------------------
rpm-build 0a0c83
rpm-build 0a0c83
7. packaging
rpm-build 0a0c83
rpm-build 0a0c83
   # ./Makepkgs
rpm-build 0a0c83
   this script generates all of the packages supported - each has a
rpm-build 0a0c83
   subdirectory below acl/package where knowledge specific to each
rpm-build 0a0c83
   package type is maintained.
rpm-build 0a0c83
rpm-build 0a0c83
   The script produces logs of each stage of the build (this info is
rpm-build 0a0c83
   also echoed to the screen when the "verbose" option is provided):
rpm-build 0a0c83
rpm-build 0a0c83
	acl/Logs/configure	- `autoconf; ./configure' output
rpm-build 0a0c83
	acl/Logs/default	- `make default' output
rpm-build 0a0c83
	acl/Logs/dist		- `make package dist' output
rpm-build 0a0c83
rpm-build 0a0c83
   On successful completion, the script echoes the names of packages
rpm-build 0a0c83
   successfully generated.