Kaydet (Commit) 18e03596 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Cleanups to the android and ios makefilery

Also build the "desktop" app from gbuild.

Change-Id: I45fc265c9515b22e10bd7644f54dbfa23601e063
üst 6a1cb54c
......@@ -23,7 +23,7 @@ define COPYSO
endef
define COPYJAR
cp $(1) libs
mkdir -p libs && cp $(1) libs
endef
#
......@@ -58,7 +58,7 @@ properties:
echo "APP_PLATFORM := android-14" >> jni/Application.mk
install: build-ant
unset JAVA_HOME && $(ANT) debug install
unset JAVA_HOME && $(ANT) -quiet debug install
@echo
@echo 'Run it with "make run"'
@echo
......@@ -67,7 +67,7 @@ uninstall:
$(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(APP_PACKAGE)
clean: android_version_setup properties
$(ANT) clean
$(ANT) -quiet -keep-going clean
rm -rf assets libs $(SODEST) $(OBJLOCAL) $(BOOTSTRAPDIR)/no-resource-compress.xml
#
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
$(eval $(call gb_CustomTarget_CustomTarget,android/desktop))
android_desktop_DIR := $(call gb_CustomTarget_get_workdir,android/experimental/Desktop)
$(call gb_CustomTarget_get_target,android/desktop) : \
$(android_desktop_DIR)/done
# We know that CustomTarget_lo4android.mk is included before this file
# in Module_android.mk, so lo4android_DIR is defined. We want that to
# be built completely first, so that we can serialize Ant access to
# Bootstrap and abs-lib, which are used by Desktop (this makefile),
# LibreOffice4Android, DocumentLoader and sdremote. We don't want one
# Ant to be cleaning out one place while another is building stuff
# that depends on it. Yeah, this sucks
$(android_desktop_DIR)/done : $(lo4android_DIR)/done
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,2)
cd $(SRCDIR)/android/experimental/desktop && $(MAKE) all
mkdir -p $(SRCDIR)/instsetoo_native/$(INPATH)/bin
cp $(SRCDIR)/android/experimental/desktop/bin/*-debug.apk $(SRCDIR)/instsetoo_native/$(INPATH)/bin
$(call gb_CustomTarget_get_clean_target,android/desktop) :
$(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),MAK,2)
cd $(SRCDIR)/android/experimental/desktop && $(MAKE) clean
# vim: set noet sw=4 ts=4:
......@@ -13,16 +13,21 @@ docloader_DIR := $(call gb_CustomTarget_get_workdir,android/experimental/Documen
$(call gb_CustomTarget_get_target,android/docloader) : \
$(docloader_DIR)/done
# We know that CustomTarget_sdremote.mk is included first, so sdremote_DIR is
# defined. We want that to be built completely first, so that we can
# serialize Ant access to Bootstrap, which is used both by DocumentLoader and
# sdremote. We don't want one Ant to be cleaning out Bootstrap while another
# is building stuff that depends on it. Yeah, this sucks
# We know that CustomTarget_sdremote.mk is included first, so
# sdremote_DIR is defined. We want that to be built completely first,
# so that we can serialize Ant access to Bootstrap, which is used both
# by DocumentLoader and sdremote. We don't want one Ant to be cleaning
# out Bootstrap while another is building stuff that depends on it.
# Yeah, this sucks
$(docloader_DIR)/done : $(sdremote_DIR)/done
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,1)
cd $(SRCDIR)/android/experimental/DocumentLoader && $(MAKE) clean && $(MAKE) all
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,2)
cd $(SRCDIR)/android/experimental/DocumentLoader && $(MAKE) all
mkdir -p $(SRCDIR)/instsetoo_native/$(INPATH)/bin
cp $(SRCDIR)/android/experimental/DocumentLoader/bin/*-debug.apk $(SRCDIR)/instsetoo_native/$(INPATH)/bin
$(call gb_CustomTarget_get_clean_target,android/docloader) :
$(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),MAK,2)
cd $(SRCDIR)/android/experimental/DocumentLoader && $(MAKE) clean
# vim: set noet sw=4 ts=4:
......@@ -13,17 +13,22 @@ lo4android_DIR := $(call gb_CustomTarget_get_workdir,android/experimental/LibreO
$(call gb_CustomTarget_get_target,android/lo4android) : \
$(lo4android_DIR)/done
# We know that CustomTarget_docloader.mk is included before this file in
# Module_android-mk, so docloader_DIR is defined. We want that to be built
# completely first, so that we can serialize Ant access to Bootstrap and
# abs-lib, which are used by LibreOffice4Android, DocumentLoader and
# sdremote. We don't want one Ant to be cleaning out one place while another
# is building stuff that depends on it. Yeah, this sucks
# We know that CustomTarget_docloader.mk is included before this file
# in Module_android.mk, so docloader_DIR is defined. We want that to
# be built completely first, so that we can serialize Ant access to
# Bootstrap and abs-lib, which are used by LibreOffice4Android (this
# makefile), DocumentLoader and sdremote. We don't want one Ant to be
# cleaning out one place while another is building stuff that depends
# on it. Yeah, this sucks
$(lo4android_DIR)/done : $(docloader_DIR)/done
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,1)
cd $(SRCDIR)/android/experimental/LibreOffice4Android && $(MAKE) clean && $(MAKE) all
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,2)
cd $(SRCDIR)/android/experimental/LibreOffice4Android && $(MAKE) all
mkdir -p $(SRCDIR)/instsetoo_native/$(INPATH)/bin
cp $(SRCDIR)/android/experimental/LibreOffice4Android/bin/*-debug.apk $(SRCDIR)/instsetoo_native/$(INPATH)/bin
$(call gb_CustomTarget_get_clean_target,android/lo4android) :
$(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),MAK,2)
cd $(SRCDIR)/android/experimental/LibreOffice4Android && $(MAKE) clean
# vim: set noet sw=4 ts=4:
......@@ -13,9 +13,13 @@ sdremote_DIR := $(call gb_CustomTarget_get_workdir,android/sdremote)
$(call gb_CustomTarget_get_target,android/sdremote) : $(sdremote_DIR)/done
$(sdremote_DIR)/done : $(call gb_Postprocess_get_target,AllModulesButInstsetNative)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,1)
cd $(SRCDIR)/android/sdremote && $(MAKE) clean && $(MAKE) all
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,2)
cd $(SRCDIR)/android/sdremote && $(MAKE) all
mkdir -p $(SRCDIR)/instsetoo_native/$(INPATH)/bin
cp $(SRCDIR)/android/sdremote/bin/ImpressRemote-debug.apk $(SRCDIR)/instsetoo_native/$(INPATH)/bin
$(call gb_CustomTarget_get_clean_target,android/sdremote) :
$(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),MAK,2)
cd $(SRCDIR)/android/sdremote && $(MAKE) clean
# vim: set noet sw=4 ts=4:
......@@ -14,6 +14,7 @@ $(eval $(call gb_Module_add_targets,android,\
CustomTarget_sdremote \
CustomTarget_docloader \
CustomTarget_lo4android \
CustomTarget_android_desktop \
))
endif
......
......@@ -125,7 +125,7 @@ build-ant: android_version_setup copy-stuff link-so properties
$(call COPYJAR,$(OUTDIR)/bin/$${F}.jar); \
done
#
unset JAVA_HOME && $(ANT) debug
unset JAVA_HOME && $(ANT) -quiet debug
run:
adb shell am start -n org.libreoffice.android.examples/.DocumentLoader -e input /assets/test1.odt
......@@ -128,7 +128,7 @@ build-ant: android_version_setup copy-stuff link-so properties
$(call COPYJAR,$(OUTDIR)/bin/$${F}.jar); \
done
#
unset JAVA_HOME && $(ANT) debug
unset JAVA_HOME && $(ANT) -quiet debug
run:
adb shell am start -n $(APP_PACKAGE)/.ui.LibreOfficeUIActivity -e input /assets/test1.odt
......@@ -153,7 +153,7 @@ setup-jars:
done
build-ant: android_version_setup copy-stuff link-so properties setup-jars
unset JAVA_HOME && $(ANT) debug
unset JAVA_HOME && $(ANT) -quiet debug
run:
$(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n $(APP_PACKAGE)/.Desktop
......@@ -11,14 +11,14 @@ include ../../config_host.mk
all: properties translations.done
mkdir -p ../abs-lib/libs
cp $(ANDROID_SDK_HOME)/extras/android/support/v4/android-support-v4.jar ../abs-lib/libs
$(ANT) debug
$(ANT) -quiet debug
properties:
echo sdk.dir=$(ANDROID_SDK_HOME) >local.properties
echo sdk.dir=$(ANDROID_SDK_HOME) >../abs-lib/local.properties
clean: properties translations.clean
$(ANT) clean
$(ANT) -quiet -keep-going clean
install: all
$(ANDROID_SDK_HOME)/platform-tools/adb install -r ./bin/ImpressRemote-debug.apk
......@@ -55,6 +55,6 @@ translations.done: $(foreach lang,$(call android_get_langlist),$(call android_ge
translations.clean:
rm -rf $(foreach lang,$(call android_get_langlist),$(call android_get_podir,$(lang)))
rm -rf $(foreach lang,$(call android_get_langlist),translations-$(lang).db)
rm translations.done
rm -f translations.done
# vim: set noet sw=4 ts=4:
......@@ -56,7 +56,7 @@ appdir=$(dir $(SCRIPT_OUTPUT_FILE_0))
buildid=$(shell git log -1 --format=%H)
$(SCRIPT_OUTPUT_FILE_0) : $(call gb_Executable_get_target,Viewer)
$(call gb_Output_announce,$@,fii,APP,2)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),APP,2)
mkdir -p $(appdir)/ure
mv $(call gb_Executable_get_target,Viewer) $(SCRIPT_OUTPUT_FILE_0)
#
......@@ -138,6 +138,7 @@ $(call gb_CustomTarget_get_target,ios/Viewer_app) : $(call gb_Executable_get_tar
$(call gb_Postprocess_get_target,AllModulesButInstsetNative)
$(call gb_CustomTarget_get_clean_target,ios/Viewer_app) :
$(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),APP,2)
# Here we just assume that Xcode's settings are default, or something
rm -rf experimental/Viewer/build
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment