From 70dbbdb67bd322b5510b479e828d26e7841cec75 Mon Sep 17 00:00:00 2001 From: Sergey Yanovich Date: Wed, 2 Jan 2008 16:54:22 +0200 Subject: [PATCH] [structure] Add installer (bug #115) --- .gitignore | 1 + app/test/Makefile.in | 4 ---- app/test/unit/Makefile.in | 2 +- app/test/unit/mozconfig | 2 +- build.mk | 8 ++++++++ check.mk | 25 +++++++++++++----------- config/mozconfig | 1 - build.mk => confvars.sh | 33 +++++++++++++++++--------------- {app/test/unit => installer}/Makefile.in | 12 ++++++------ makefiles.sh | 1 + 10 files changed, 50 insertions(+), 39 deletions(-) copy build.mk => confvars.sh (74%) mode change 100644 => 100755 copy {app/test/unit => installer}/Makefile.in (91%) diff --git a/.gitignore b/.gitignore index dbc638a..d93759c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ aclocal.m4 *~ .* tags +objdir/* diff --git a/app/test/Makefile.in b/app/test/Makefile.in index 82f0687..199d640 100644 --- a/app/test/Makefile.in +++ b/app/test/Makefile.in @@ -76,7 +76,3 @@ include $(topsrcdir)/config/rules.mk EXTRA_DSO_LDOPTS+= \ $(XPCOM_GLUE_LDOPTS) \ $(NSPR_LIBS) \ - -check:: - $(DIST)/bin/$(MOZ_BUILD_APP)$(BIN_SUFFIX) --test - $(NULL) diff --git a/app/test/unit/Makefile.in b/app/test/unit/Makefile.in index e3bb2fb..95c6f02 100644 --- a/app/test/unit/Makefile.in +++ b/app/test/unit/Makefile.in @@ -48,4 +48,4 @@ libs:: @echo TESTING ABSTRACT rm -f $(HOME)/.abstract/*default/default.sqlite touch $(DIST)/bin/.autoreg - $(DIST)/bin/$(MOZ_BUILD_APP)$(BIN_SUFFIX) --test + $(DIST)/bin/$(MOZ_APP_NAME)$(BIN_SUFFIX) --test diff --git a/app/test/unit/mozconfig b/app/test/unit/mozconfig index 687c758..15f2d86 100644 --- a/app/test/unit/mozconfig +++ b/app/test/unit/mozconfig @@ -1,8 +1,8 @@ #mk_add_options MOZ_CO_PROJECT=browser #ac_add_options --enable-application=abstract . $topsrcdir/abstract/config/mozconfig -mk_add_options MOZ_OBJDIR=../aa-build ac_add_options --with-libxul-sdk=/usr/local/lib/xulrunner-devel-1.9b2/ +ac_add_options --prefix=/var/tmp/usr ac_add_options --enable-tests ac_add_options --enable-debug diff --git a/build.mk b/build.mk index eaf5682..e4eb1d0 100644 --- a/build.mk +++ b/build.mk @@ -47,3 +47,11 @@ ifdef ENABLE_TESTS MY_RULES = $(topsrcdir)/abstract/app/test/unit/rules.mk endif +installer: + $(MAKE) -C abstract/installer installer + +package: + $(MAKE) -C abstract/installer + +install:: + $(MAKE) -C abstract/installer install diff --git a/check.mk b/check.mk index 00a7978..1487324 100755 --- a/check.mk +++ b/check.mk @@ -18,23 +18,26 @@ top_srcdir := $(shell cd .. && pwd) -all: build~/Makefile - @cd build~ && make > /dev/null +all: objdir/Makefile + @cd objdir && make > /dev/null -setup: build~/Makefile +setup: objdir/Makefile -build~/Makefile: $(top_srcdir)/configure - test -d build~ || mkdir build~ - cd build~ && \ +objdir/Makefile: $(top_srcdir)/configure + test -d objdir || mkdir objdir + cd objdir && \ MOZCONFIG=$(top_srcdir)/abstract/app/test/unit/mozconfig $(top_srcdir)/configure > /dev/null $(top_srcdir)/configure: cd $(top_srcdir) && autoconf -build: build~/Makefile - @cd build~ && make +build: objdir/Makefile + @cd objdir && make -clean: build~/Makefile - @cd build~ && make clean +clean: objdir/Makefile + @cd objdir && make clean -.PHONY: all setup clean +install: objdir/Makefile + @cd objdir && make install + +.PHONY: all setup clean build install diff --git a/config/mozconfig b/config/mozconfig index 4eed11c..b690324 100644 --- a/config/mozconfig +++ b/config/mozconfig @@ -1,4 +1,3 @@ #mk_add_options MOZ_CO_PROJECT=browser ac_add_options --enable-application=abstract #. $topsrcdir/browser/config/mozconfig -ac_add_options --enable-libxul diff --git a/build.mk b/confvars.sh old mode 100644 new mode 100755 similarity index 74% copy from build.mk copy to confvars.sh index eaf5682..992d175 --- a/build.mk +++ b/confvars.sh @@ -1,3 +1,4 @@ +#! /bin/sh # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # @@ -11,15 +12,15 @@ # for the specific language governing rights and limitations under the # License. # -# The Original Code is the Mozilla build system. +# The Original Code is Mozilla Build System # # The Initial Developer of the Original Code is -# the Mozilla Foundation . -# Portions created by the Initial Developer are Copyright (C) 2006 +# Ben Turner +# +# Portions created by the Initial Developer are Copyright (C) 2007 # the Initial Developer. All Rights Reserved. # # Contributor(s): -# Benjamin Smedberg (Initial Code) # # Alternatively, the contents of this file may be used under the terms of # either the GNU General Public License Version 2 or later (the "GPL"), or @@ -35,15 +36,17 @@ # # ***** END LICENSE BLOCK ***** -ifndef LIBXUL_SDK -include $(topsrcdir)/toolkit/toolkit-tiers.mk -endif - -TIERS += app - -tier_app_dirs += abstract - -ifdef ENABLE_TESTS -MY_RULES = $(topsrcdir)/abstract/app/test/unit/rules.mk -endif +MOZ_APP_NAME=abstract +#MOZ_UPDATER=1 +#MOZ_PHOENIX=1 +MOZ_ENABLE_LIBXUL=1 +#MOZ_PLACES=1 +# always enabled for form history +#MOZ_MORKREADER=1 +#MOZ_SAFE_BROWSING=1 +MOZ_APP_VERSION=`cat ${topsrcdir}/abstract/app/application.ini | grep -m 1 Version= | sed -ne "s/Version=//p"` +#MOZ_NO_XPCOM_OBSOLETE=1 +#MOZ_EXTENSIONS_DEFAULT=" inspector gnomevfs reporter" +# MOZ_APP_DISPLAYNAME will be set by branding/configure.sh +MOZ_APP_DISPLAYNAME=abstract diff --git a/app/test/unit/Makefile.in b/installer/Makefile.in similarity index 91% copy from app/test/unit/Makefile.in copy to installer/Makefile.in index e3bb2fb..176c204 100644 --- a/app/test/unit/Makefile.in +++ b/installer/Makefile.in @@ -35,7 +35,7 @@ # # ***** END LICENSE BLOCK ***** -DEPTH = ../../../.. +DEPTH = ../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ @@ -44,8 +44,8 @@ include $(DEPTH)/config/autoconf.mk include $(topsrcdir)/config/rules.mk -libs:: - @echo TESTING ABSTRACT - rm -f $(HOME)/.abstract/*default/default.sqlite - touch $(DIST)/bin/.autoreg - $(DIST)/bin/$(MOZ_BUILD_APP)$(BIN_SUFFIX) --test +NO_PKG_FILES = \ + * \ + $(NULL) + +include $(topsrcdir)/toolkit/mozapps/installer/packager.mk diff --git a/makefiles.sh b/makefiles.sh index b08ff07..bcf30c5 100644 --- a/makefiles.sh +++ b/makefiles.sh @@ -60,5 +60,6 @@ abstract/app/Makefile abstract/app/chrome/Makefile abstract/app/test/Makefile abstract/app/test/unit/Makefile +abstract/installer/Makefile " -- 2.11.4.GIT