swarm-hackers
[Top][All Lists]
Advanced

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

Re: [swarm-hackers] Permission to add a Makefile to trunk...


From: Scott Christley
Subject: Re: [swarm-hackers] Permission to add a Makefile to trunk...
Date: Thu, 19 Nov 2009 18:11:55 -0800


A makefile for OSX is fine.  There is no need for any OS-independent stuff though, just put the makefile in the macosx subdirectory and assume you are on OSX.

I tend to think that the frameworks should be installed under /Library/Frameworks so all users have access but that's just a preference.  In reality, we want to build a binary distribution for easy installation.  I think we probably want to use the Mac Installer application to handle the install as there are a few things to be installed in a variety of places.

Scott

On Nov 19, 2009, at 5:53 PM, Nima Talebi wrote:

Hi All,

I now have my wiki account, and have started writing a document targetting people who're new to swarm, an Induction.

To make this a more pleasant experience for people, I've written a set of Makefiles to drop into trunk - which are by no means perfect or complete, but they're a good start.

The master makefile is OS-independent and looks like so...


PROJECT := Swarm
OS      := $(shell uname -s)

all: build;

include ${OS}.Makefile

build: .${OS}_build

install: .${OS}_build .${OS}_install

x: ${OS}_x

info: ${OS}_info

clean: ${OS}_clean
        -rm -f .${OS}_*

################################################################################
.PHONY: all clean info .${OS}_build .${OS}_install ${OS}_clean ${OS}_info ${OS}_x


Next, we need a OS-specific makefile per supported OS, I've thus far written one for Mac OS X Snow...

SDK     := macosx10.6
BASE    := swarm/macosx/SwarmOSX
PRODUCT := ${HOME}/Library/Frameworks/Swarm.framework

.Darwin_build:
        cd swarm && ./autogen.sh
        cd swarm && ./configure --enable-openstep --without-jdkdir
        cd ${BASE} && xcodebuild \
                -configuration Release \
                -sdk ${SDK} \
                -parallelizeTargets \
                -project ${PROJECT}.xcodeproj \
                -alltargets
        cd ${BASE} && xcodebuild \
                -configuration Debug \
                -sdk ${SDK} \
                -parallelizeTargets \
                -project ${PROJECT}.xcodeproj \
                -alltargets
        touch $@

.Darwin_install: ${PRODUCT}
${PRODUCT}:
        test ! -d $@ || rm -rf $@
        cp -R ${BASE}/build/Release/address@hidden ${PRODUCT}

Darwin_x:
        open ${BASE}/${PROJECT}.xcodeproj

Darwin_info:
        xcodebuild -showsdks

Darwin_clean:
        cd ${BASE} && xcodebuild \
                -configuration Debug \
                -alltargets \
                clean
        cd ${BASE} && xcodebuild \
                -configuration Release \
                -alltargets \
                clean



...I'm aware that "Darwin" != "Snow Leopard v10.6" and other subtleties, but this is just a start, I'll clean it up as I start adding Linux support.

The point for this is to allow the user to do a checkout, run make, make install, and have a functional framework to work with, and similarly, run clean, and really get in return an actual "clean" source repository.  At the moment, clean (swarm distclean) seems to delete even files that are checked out of subversion!

Is everyone okay with this?

Nima
_______________________________________________
swarm-hackers mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/swarm-hackers


reply via email to

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