automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Post-processing target?


From: Kevin Teich
Subject: Post-processing target?
Date: Fri, 18 Mar 2005 15:47:41 -0500 (EST)

Hello,

Short version: How can I create a target or otherwise specify some post-processing script to run after a binary is built, so that it can be conditionally run on one platform but not another to create an additional file that is copied along with the main binary during installation?

Long version:

I am developing an app using Qt in Linux that I'd like to compile on various Linuxes and Mac OS X. It works fine with Qt's qmake program that generates Makefiles, but that route doesn't let me develop on Linux and compile on Linux and Max OS X, due to the way qmake works. I've reverse-engineered a Makefile.am based on the Makefile that qmake outputs that works on all my Linux targets. However, for the Mac OS X target, I need to do some extra stuff to make the infamous bundle.

Basically I need to do some post-processing on the target after it's built to create the bundle directory, copy in a few files, and copy in the binary I just built. Then I'd like to have that bundle installed along with binary in the installation directory.

My binary's name is scuba2. The bundle is a directory called scuba2.app with the target binary in it and some other magic files generated from templates. I start with a definition for scuba2.app which requires the additional target which are actually just chunks of script that do the right thing. Roughly, it looks like this:

scuba2.app: bundle_file1 bundle_file2 bundle_binary

bundle_file1:
        make bundle dir, use sed to make file from template in bundle dir

bundle_file2:
        make bundle dir, use sed to make file from template in bundle dir

bundle_binary: scuba2
        make bundle dir, copy scuba2 into bundle dir

I have an AM_CONDITIONAL in my configure to define a variable SCUBA_BUNDLE to be true on Macs. Where should I go from here? I've tried:

if SCUBA_BUNDLE
scuba2_DEPENDENCIES=scuba2.app
endif

But that just creates a circular dependency because scuba2.app requires scuba2, and I'm guessing that automake requires the _DEPENDENCIES before the main binary. I think I want something like:

if SCUBA_BUNDLE
scuba2_POST_PROCESSING=scuba2.app
endif

Any suggestions?

I'm using automake 1.6.3 and autoconf 2.5.7 on Mac OS X 10.3.

Thanks.

--
Kevin Teich





reply via email to

[Prev in Thread] Current Thread [Next in Thread]