My WebOS Makefile

One of the first things I do when developing with a new framework is automate as much as I can. When it comes to automating builds, GNU Make is still king of the hill. Sure, it has a notoriously finicky syntax. But when you know what you’re doing no other tool can express dependency information as concisely as Make.

I thought I’d post the Makefile I’ve been creating as I work on my first WebOS app. It’s definitely a work in progress, but it’s capable of building packages, launching the emulator, launching novacomd as a background job, and reloading the app. I’ve tried to get the dependencies right so that altering any part of the app forces a package rebuild before installing.

Note, this makefile is for Webos SDK 1.2 on an Ubuntu system. It will probably require some small modifications to work on an OS X system.

The Makefile, along with a small helper script for launching novacomd, can be found at http://gist.github.com/212448. Please let me know if you find it useful!

EDIT: I realised there’s one part of the Makefile which might not be immediately clear. In order to keep things DRY, I have the Makefile be the sole source of the app version (in the VERSION variable). Then I generate the appinfo.json file from a template (appinfo.json.m4) using the GNU M4 macro processor and passing in the app version.

Creative Commons License
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.

Related posts:

  1. Programming WebOS
  2. They just don’t make bugs like they used to
  3. Rails 3 resource routes with dots; or, how to make a Ruby developer go a little bit insane
This entry was posted in Uncategorized and tagged , , , , , , . Bookmark the permalink.
  • http://elight.myopenid.com/ Evan Light

    Did all of my yacking about WebOS dev get you revved up to do some more? ;-)

  • http://avdi.org avdi

    Heh. Truth is, I wrote all that weeks ago, and as I was looking over my project today I realised it might be of use to someone else. It's certainly nice to know someone else doing Webos dev, though.

  • http://www.phoque.de/ Nils

    Could you also post your M4 template? I've never worked with M4 before…

  • http://www.phoque.de/ Nils

    Could you also post your M4 template? I've never worked with M4 before…