Contents:
The KUSP Utility Makefile was created in order to automate many of the repetitious tasks that we do in order to build, install, and test the KUSP software package. This has been expanded several times, so it contains many targets that all perform small useful tasks. The small tasks are used by chaining them together in order to carry out a complex task in one line of code, rather than having to type every step at the command line.
The Makefile is named kusp.mk and can be found at <kusp-root>/kusp.mk. You can run the Makefile by:
bash> make -f kusp.mk [targets]
“Failure has its problems, but success has problems as well. The problems of success are often preferable to those of failure, but they are, nonetheless, problems.“
-Douglas Niehaus
CLEAN_PREFIX:
The directory to use as the root install prefix when executing the do_uninstall script (by running the *
KUSP_VERSION =0.9
RPM_RELEASE =5
STEP_NUMBER =1
Depends On: kusp-build, kusp-install
Builds and installs the KUSP source to the directory defined by the bash environmental variable $KUSPINSTALL. Make sure to have the $KUSPINSTALL variable defined in your .bashrc or on the command line when executing this target.
Depends On: kusp-rebuild, kusp-install
First this target removes the old build directory, then it builds and installs the KUSP source to the directory defined by the bash environmental variable $KUSPINSTALL. Make sure to have the $KUSPINSTALL variable defined in your .bashrc or on the command line when executing this target.
Since CMake has a propensity to cache information that can make rebuilding from a bigger change easier, since this will destroy all of the old CMake cache files (as well as the other compiled source files).
Checks to see if a build directory has been created under whichever directory is the root of your KUSP install. If the directory does not exist, then it creates a build directory to use.
Depends On: check-build-dir, dist-clean
First this target removes the old build directory, creates a new <kusp-root>/build directory, and then it builds the KUSP source.
Since CMake has a propensity to cache information that can make rebuilding from a bigger change easier, since this will destroy all of
Depends On: check-build-dir
Configures (using CMake) and builds the kusp source in the <kusp-root>/build directory.
Installs the built KUSP source into the directory defined by the bash environmental variable $KUSPINSTALL. Make sure to have
Should build the examples, I don’t think that it does currently.
Fixme.D: This should also have check-build-dir as a prerequisite target.
Performs a make clean on the <kusp-root>/build directory. This removes all of the built source file but does not remove the hazardous CMake cache files.
Depends On: check-build-dir
Check to make sure that the build directory exists, then removes ALL contents of the <kusp-root>/build directory.
Executes an uninstall using the do_uninstall script.
Simply runs:
bash> svn up
on the <kusp-root> directory. This target is useful for automation through chaining of the Makefile targets. An example is how it is used by the rpm target in order to get the most current source before creating an RPM of the source code.
FIXME.D: This also could have another Makefile variable ‘SOURCE DIRECTORY PATH’ to tarball.
Creates a tarball of the source code and moves it to ~/rmpbuild/sources.
Note: This only works if the name of the <kusp-root> directory is kusp. For me this means I keep another ‘vanilla’ kusp directory checked out of the code repository with the name of kusp, in my ~/tmp directory.
For Example:
bash> mkdir ~/tmp
bash> cd ~/tmp
bash> svn co https://subversion.ittc.ku.edu/svn/libertos/kusp/trunk kusp
Remember this target is a dependent target of the rpm step, so it is important if you are using this target or a target that uses it as a dependent then you will have to follow some sort of steps to not check out the kusp/trunk as something other than ‘kusp’ if you want to tar the source with this command or if you want to build an rpm.
Runs the rpmbuild program:
bash> cd <kusp-root>/rpms
bash> rpmbuild -ba -vv kusp.spec
FIXME.D: Link rpm_and_rpmbuild documentation to this page.
Depends on: svn-update, tarball, exec-rpmbuild
Creates the KUSP rpm by updating to the latest code from the subversion repository, tarballing the source, moving the previously created tarball to the ~/rpmbuild/SOURCES directory, and executing the rpmbuild program to build the RPM from the KUSP source tarball using the procedure defined in the kusp.spec file.
The resultant binary RPM can be found at ~/rpmbuild/RPMS/<name-of-arch>/kusp-<version>-<release>.<distro>.<architecture>.rpm.
Example of the path to the a created RPM:
~/rpmbuild/RPMS/i586/kusp.0.9-5.fc11.i586.rpm
Attempts to find an previously install KUSP RPM. If found, it removes the RPM.
Note: This step requires you to enter your sudo password.
Note: Only for Fedora 11.
Installs the KUSP RPM ~/rpmbuild/RPMS/i586/kusp-$(KUSP_VERSION)-$(RPM_RELEASE).fc11.i586.rpm.
Depends On: remove-rpm rpm, install-rpm
Builds a new KUSP RPM, uninstalls any previously created RPM (as a safety check), and then installs the newly created RPM.