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: Nima Talebi
Subject: Re: [swarm-hackers] Permission to add a Makefile to trunk...
Date: Fri, 20 Nov 2009 13:25:48 +1100

That's a good point, and I will make it such that the user can override the default setting (~/Library, vs /Library, vs /foo) by setting an environment variable prior to running make.

As for having the makefile in a subdirectory, the reason I prefer to have it at the root, for example...

-rw-r--r--   1 xerxes  staff   344 20 Nov 13:11 Makefile
-rw-r--r--   1 xerxes  staff   233 20 Nov 13:02 makefile.d/Debian.Makefile
-rw-r--r--   1 xerxes  staff   233 20 Nov 13:02 makefile.d/Ubuntu.Makefile
-rw-r--r--   1 xerxes  staff   233 20 Nov 13:02 makefile.d/Fedora.Makefile
-rw-r--r--   1 xerxes  staff   233 20 Nov 13:02 makefile.d/Darwin.Makefile
-rw-r--r--   1 xerxes  staff  1902 20 Nov 13:12 makefile.d/Darwin-10.6.Makefile

...is so to make the installer make use of what it knows from the host its running on, instead of the user having to care at all - remembering that a subset of swarm users couldnt care less about any installation details, they would just want to do a checkout, make, and make install.

The design above makes this possible, they dont have to poke around looking for which directory to go into and run make.

As for packaging, again I agree.  I've been doing debian packaging for a couple of years now, so once I get my head around the OS X stuff, I'll start on packaging swarm for Debian and Ubuntu, I can also do an rpm for Fedora, but I think Alex is already doing that.

For these packages, the abovementioned makefiles will serve no purpose, these makefiles are only an attempt to make life for the average user of swarm as easy as possible.

Nima



On Fri, Nov 20, 2009 at 1:11 PM, Scott Christley <address@hidden> wrote:

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


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




--
Nima Talebi
web: http://ai.autonomy.net.au/People/Nima
gpg: B51D 1F18 D8E2 B702 B027 23A4 E06B DAC1 BE70 ADC0

reply via email to

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