From 9ac5d02bedb289ba6451c339c0419618724fa862 Mon Sep 17 00:00:00 2001 From: Michael Werle Date: Wed, 2 Jun 2010 19:14:29 +0000 Subject: [PATCH] Revert the GNUmakefile to compile, by default, using system-dependecies. This makes it easier for developers rather than packagers. Associated changes to not break packaging build rules. git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3448 127b21dd-08f5-0310-b4b7-95ae10353056 --- GNUmakefile | 3 +- Makefile | 90 +++++++++++++------- Resources/Config/whitelist.plist | 3 +- debian/changelog.in | 12 ++- debian/revision | 2 +- debian/rules | 2 +- installers/autopackage/default.x86.apspec | 2 +- installers/autopackage/default.x86_64.apspec | 2 +- src/Core/Entities/PlayerEntity.m | 5 +- 9 files changed, 80 insertions(+), 41 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index a6373f55..3818b764 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -15,6 +15,7 @@ OO_EXCLUDE_DEBUG_SUPPORT = no OO_OXP_VERIFIER_ENABLED = yes OO_LOCALIZATION_TOOLS = yes DEBUG_GRAPHVIZ = yes +use_deps = no vpath %.m src/SDL:src/Core:src/Core/Entities:src/Core/Materials:src/Core/Scripting:src/Core/OXPVerifier:src/Core/Debug vpath %.h src/SDL:src/Core:src/Core/Entities:src/Core/Materials:src/Core/Scripting:src/Core/OXPVerifier:src/Core/Debug @@ -43,7 +44,7 @@ else ADDITIONAL_OBJCFLAGS = -Wall -std=c99 -DLOADSAVEGUI -DLINUX -DXP_UNIX -Wno-import `sdl-config --cflags` oolite_LIB_DIRS += -L/usr/X11R6/lib/ - ifeq ($(use_distro_deps),yes) + ifeq ($(use_deps),no) ADDITIONAL_OBJC_LIBS += -lpng -lSDL -lSDL_mixer -lgnustep-base ifeq ($(ESPEAK),yes) ADDITIONAL_OBJC_LIBS += -lespeak diff --git a/Makefile b/Makefile index aad3d843..afce94de 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,15 @@ DEB_VER := $(shell echo "${VER_MAJ}.${VER_MIN}") else DEB_VER := $(shell echo "${VER_MAJ}.${VER_MIN}.${VER_REV}") endif -DEB_REV := -$(shell cat debian/revision) -pkg-debtest: DEB_REV := $(shell echo "~test${DEB_REV}") -pkg-debsnapshot: DEB_REV := $(shell echo "~svn${SVNREVISION}${DEB_REV}") +DEB_REV := $(shell cat debian/revision) +# Ubuntu versions are: -ubuntu +# eg: oolite1.74.4.2755-0ubuntu1 +# Oolite versions are: MAJ.min.rev.svn +# eg. 1.74.0.3275 +# Our .deb versions are: MAJ.min.rev.svn-[~] +# eg. 1.74.0.3275-0, 1.74.0.3275-0~test +pkg-debtest: DEB_REV := $(shell echo "0~test${DEB_REV}") +pkg-debsnapshot: DEB_REV := $(shell echo "0~trunk${DEB_REV}") LIBJS_SRC_DIR=deps/Cross-platform-deps/SpiderMonkey/js/src @@ -49,14 +55,14 @@ endif # Here are our default targets # +.PHONY: debug +debug: $(DEPS) + make -f GNUmakefile debug=yes + .PHONY: release release: $(DEPS) make -f GNUmakefile debug=no -.PHONY: distro-release -distro-release: $(DEPS) - make -f GNUmakefile use_distro_deps=yes debug=no - .PHONY: release-deployment release-deployment: $(DEPS) make -f GNUmakefile DEPLOYMENT_RELEASE_CONFIGURATION=yes debug=no @@ -65,13 +71,23 @@ release-deployment: $(DEPS) release-snapshot: $(DEPS) make -f GNUmakefile SNAPSHOT_BUILD=yes VERSION_STRING=$(VER) debug=no -.PHONY: debug -debug: $(DEPS) - make -f GNUmakefile debug=yes +# Here are targets using the provided dependencies +.PHONY: deps-debug +deps-debug: $(DEPS) + make -f GNUmakefile debug=yes use_deps=yes + +.PHONY: deps-release +deps-release: $(DEPS) + make -f GNUmakefile debug=no use_deps=yes + +.PHONY: deps-release-deployment +deps-release-deployment: $(DEPS) + make -f GNUmakefile DEPLOYMENT_RELEASE_CONFIGURATION=yes debug=no use_deps=yes + +.PHONY: deps-release-snapshot +deps-release-snapshot: $(DEPS) + make -f GNUmakefile SNAPSHOT_BUILD=yes VERSION_STRING=$(VER) debug=no use_deps=yes -.PHONY: distro-debug -distro-debug: $(DEPS) - make -f GNUmakefile use_distro_deps=yes debug=yes $(LIBJS): ifeq ($(GNUSTEP_HOST_OS),mingw32) @echo "ERROR - this Makefile can't (yet) build the Javascript DLL" @@ -96,6 +112,12 @@ all: release release-deployment release-snapshot debug .PHONY: remake remake: clean all +.PHONY: deps-all +deps-all: deps-release deps-release-deployment deps-release-snapshot deps-debug + +.PHONY: deps-remake +deps-remake: clean deps-all + # Here are our linux autopackager targets # pkg-autopackage: @@ -105,7 +127,7 @@ pkg-autopackage: # .PHONY: debian/changelog debian/changelog: - cat debian/changelog.in | sed -e "s/@@VERSION@@/${DEB_VER}/g" -e "s/@@REVISION@@/${DEB_REV}/g" -e "s/@@TIMESTAMP@@/${DEB_BUILDTIME}/g" > debian/changelog + cat debian/changelog.in | sed -e "s/@@VERSION@@/${VER}/g" -e "s/@@REVISION@@/${DEB_REV}/g" -e "s/@@TIMESTAMP@@/${DEB_BUILDTIME}/g" > debian/changelog .PHONY: pkg-deb pkg-debtest pkg-debsnapshot pkg-deb: debian/changelog @@ -115,7 +137,7 @@ pkg-debtest: debian/changelog debuild binary pkg-debsnapshot: debian/changelog - debuild binary + debuild -e SNAPSHOT_BUILD=yes -e VERSION_STRING=$(VER) binary .PHONY: pkg-debclean pkg-debclean: @@ -154,24 +176,30 @@ pkg-win-snapshot: release-snapshot ${NSISVERSIONS} .PHONY: help help: - @echo "Use this Makefile to build Oolite:" + @echo "This is a helper-Makefile to make compiling Oolite easier." @echo - @echo "NOTE: The following targets use the dependencies distributed with Oolite." + @echo "NOTE (Linux): To build with the dependency libraries provided with Oolite" + @echo " source, use 'deps-' prefix with debug, release, release-snapshot" + @echo " and release-deployment build options." @echo - @echo " debug - builds a debug executable in oolite.app/oolite.dbg" - @echo " release - builds a release executable in oolite.app/oolite" - @echo " release-deployment - builds a release executable in oolite.app/oolite" - @echo " release-snapshot - builds a snapshot release in oolite.app/oolite" - @echo " all - builds the above two targets" - @echo " clean - removes all generated files" + @echo "Development Targets:" + @echo " debug - builds a debug executable in oolite.app/oolite.dbg" + @echo " release - builds a release executable in oolite.app/oolite" + @echo " release-deployment - builds a release executable in oolite.app/oolite" + @echo " release-snapshot - builds a snapshot release in oolite.app/oolite" + @echo " all - builds the above targets" + @echo " clean - removes all generated files" @echo - @echo " pkg-autopackage - builds a Linux autopackage" + @echo "Packaging Targets:" + @echo " Linux:" + @echo " pkg-autopackage - builds a Linux autopackage" @echo - @echo " pkg-deb - builds a release Debian package" - @echo " pkg-debtest - builds a test release Debian package" - @echo " pkg-debsnapshot - builds a snapshot release Debian package" - @echo " pkg-debclean - cleans up after a Debian package build" + @echo " pkg-deb - builds a release Debian package" + @echo " pkg-debtest - builds a test release Debian package" + @echo " pkg-debsnapshot - builds a snapshot release Debian package" + @echo " pkg-debclean - cleans up after a Debian package build" @echo - @echo " pkg-win - builds a release version Windows installer package (test release)" - @echo " pkg-win-deployment - builds a release version Windows installer package (deployment release)" - @echo " pkg-win-snapshot - builds a snapshot version Windows installer package" + @echo " Windows Installer:" + @echo " pkg-win - builds a test-release version" + @echo " pkg-win-deployment - builds a release version" + @echo " pkg-win-snapshot - builds a snapshot version" diff --git a/Resources/Config/whitelist.plist b/Resources/Config/whitelist.plist index b9141204..b401c2a2 100644 --- a/Resources/Config/whitelist.plist +++ b/Resources/Config/whitelist.plist @@ -224,7 +224,8 @@ "setTargetToNearestStation", "setTargetToSystemStation", "setUpEscorts", - "fireMissile" + "fireMissile", + "setPrimaryRole:" ); ai_and_action_methods = diff --git a/debian/changelog.in b/debian/changelog.in index 1704bce3..b6b50088 100644 --- a/debian/changelog.in +++ b/debian/changelog.in @@ -1,9 +1,17 @@ -oolite (@@VERSION@@@@REVISION@@) stable; urgency=low +oolite (@@VERSION@@-@@REVISION@@) stable; urgency=low - * VCS snapshot of Oolite @@VERSION@@. + * Snapshot release of Oolite @@VERSION@@. + See /usr/share/doc/oolite/changelog.gz for upstream changes. -- Darren Salt @@TIMESTAMP@@ +oolite (1.73.3-1) stable; urgency=low + + * Packaging release of Oolite 1.73.3 + See /usr/share/doc/oolite/changelog.gz for upstream changes + + -- Michael Werle Wed, 09 Sep 2009 22:55:28 +0100 + oolite (1.73.2-1) stable; urgency=low * Packaging release of Oolite 1.73.2 diff --git a/debian/revision b/debian/revision index d00491fd..573541ac 100644 --- a/debian/revision +++ b/debian/revision @@ -1 +1 @@ -1 +0 diff --git a/debian/rules b/debian/rules index 21dea887..4380f2b6 100755 --- a/debian/rules +++ b/debian/rules @@ -38,7 +38,7 @@ build-stamp: dh_testdir $(MAKE) -C $(JS_SRC)/fdlibm -f Makefile.ref BUILD_OPT=1 $(MAKE) -C $(JS_SRC) -f Makefile.ref BUILD_OPT=1 - $(GSMAKE) use_distro_deps=yes libespeak=yes + $(GSMAKE) libespeak=yes touch $@ clean: clean-stamp unpatch diff --git a/installers/autopackage/default.x86.apspec b/installers/autopackage/default.x86.apspec index b7937f69..08db5af2 100644 --- a/installers/autopackage/default.x86.apspec +++ b/installers/autopackage/default.x86.apspec @@ -39,7 +39,7 @@ profession. Above all, reach the Elite rating. # why we are using tar files :/ [BuildPrepare] make -f Makefile clean -make -f Makefile release-snapshot +make -f Makefile deps-release-snapshot cp installers/FreeDesktop/oolite.desktop $build_root cp installers/FreeDesktop/oolite-icon.png $build_root cp Doc/AdviceForNewCommanders.pdf $build_root diff --git a/installers/autopackage/default.x86_64.apspec b/installers/autopackage/default.x86_64.apspec index 93322289..317f8f1d 100644 --- a/installers/autopackage/default.x86_64.apspec +++ b/installers/autopackage/default.x86_64.apspec @@ -39,7 +39,7 @@ profession. Above all, reach the Elite rating. # why we are using tar files :/ [BuildPrepare] make -f Makefile clean -make -f Makefile release-snapshot +make -f Makefile deps-release-snapshot cp installers/FreeDesktop/oolite.desktop $build_root cp installers/FreeDesktop/oolite-icon.png $build_root cp Doc/AdviceForNewCommanders.pdf $build_root diff --git a/src/Core/Entities/PlayerEntity.m b/src/Core/Entities/PlayerEntity.m index beb1d39a..73e3b519 100644 --- a/src/Core/Entities/PlayerEntity.m +++ b/src/Core/Entities/PlayerEntity.m @@ -1716,8 +1716,9 @@ static BOOL replacingMissile = NO; UPDATE_STAGE(@"updating cabin temperature"); // work on the cabin temperature - float deltaInsulation = delta_t/[self heatInsulation]; - float heatThreshold = [self heatInsulation] * 100.0f; + float heatInsulation = [self heatInsulation]; // Optimisation, suggested by EricW + float deltaInsulation = delta_t/heatInsulation; + float heatThreshold = heatInsulation * 100.0f; ship_temperature += (float)( flightSpeed * air_friction * deltaInsulation); // wind_speed if (external_temp > heatThreshold && external_temp > ship_temperature)