Post thumbnail of Automate rpmbuilds from spec files including name-version-build info automatically
28 June 2010
Continue reading Automate rpmbuilds from spec files including name-version-build info automatically

Automate rpmbuilds from spec files including name-version-build info automatically

Start the spec file with %define statements at the top. Continue the spec file as you would normally, using the variables you just defined in place of the real name, version, build. Create an rpmbuild script that replaces the template variables with current information. Make an rpm target in your Makefile that calls the rpmbuild script.

Post thumbnail of Makefile breaks when making targets of another Makefile
30 December 2009
Continue reading Makefile breaks when making targets of another Makefile

Makefile breaks when making targets of another Makefile

In GNU’s Make manual, there’s a description of how to use one Makefile to call targets of another Makefile. You have to use $(MAKE) in order for it to work properly. I’ve found one little snag that’s not mentioned. If my target name is the same as the directory name where the other Makefile is, it will never work. It always says it’s up to date! If I change the target name, it works fine.

Post thumbnail of Build script to utilize Makefiles to build multiple applications
29 December 2009
Continue reading Build script to utilize Makefiles to build multiple applications

Build script to utilize Makefiles to build multiple applications

You have a bunch of related applications, each has their own Makefile that knows only about their own application, but you have dependencies where one app needs to be built before another. Here’s a skeleton bash script for building any one thing or everything.

#!/bin/bash

function build {
echo "*** …

Powered by Wordpress   |   Lunated designed by ZenVerse