aboutsummaryrefslogtreecommitdiffstats
path: root/adtproductbuild
diff options
context:
space:
mode:
authorRaphaƫl Moll <ralf@android.com>2012-09-27 15:29:31 -0700
committerGerrit Code Review <noreply-gerritcodereview@google.com>2012-09-27 15:29:31 -0700
commit031e7ebcd4f9fe54e3792f6a2a13153502ce867b (patch)
treec9aa5158258a7b3efaf0a40ca005f1ed230982a2 /adtproductbuild
parentbe6194b8193acb4a7e04fc70bf0ce49e67530f96 (diff)
downloadsdk-031e7ebcd4f9fe54e3792f6a2a13153502ce867b.zip
sdk-031e7ebcd4f9fe54e3792f6a2a13153502ce867b.tar.gz
sdk-031e7ebcd4f9fe54e3792f6a2a13153502ce867b.tar.bz2
Revert "Android makefile for ADT Eclipse IDE."
This breaks Mac builds. We'll put it back once we understand why. This reverts commit be6194b8193acb4a7e04fc70bf0ce49e67530f96 Change-Id: I1a54b65887126b45c07b0cceef96b8b9595b6c51
Diffstat (limited to 'adtproductbuild')
-rw-r--r--adtproductbuild/Android.mk133
-rw-r--r--adtproductbuild/Makefile36
-rw-r--r--adtproductbuild/adt_eclipse_ide3
-rw-r--r--adtproductbuild/build.xml2
4 files changed, 37 insertions, 137 deletions
diff --git a/adtproductbuild/Android.mk b/adtproductbuild/Android.mk
deleted file mode 100644
index e3421d9..0000000
--- a/adtproductbuild/Android.mk
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 2012 The Android Open Source Project
-#
-# Makefile rules to build the ADT Eclipse IDE.
-# This is invoked from sdk/eclipse/scripts/build_server.sh using
-# something like "make PRODUCT-sdk-adt_eclipse_ide".
-#
-# Expected env vars:
-# ADT_IDE_DEST_DIR: existing directory where to copy the IDE zip files.
-# ADT_IDE_QUALIFIER: either a date or build number to incorporate in the zip names.
-
-# Expose the ADT Eclipse IDE build only for the SDK builds.
-ifneq (,$(is_sdk_build)$(filter sdk sdk_x86 sdk_mips,$(TARGET_PRODUCT)))
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := adt_eclipse_ide
-LOCAL_MODULE_CLASS := EXECUTABLES
-LOCAL_MODULE_TAGS := optional
-LOCAL_IS_HOST_MODULE := true
-include $(BUILD_SYSTEM)/base_rules.mk
-
-ADT_IDE_MODULE_DEPS := $(TOPDIR)sdk/adtproductbuild/$(LOCAL_MODULE)
-
-ADT_IDE_BUILD_LOG := $(TOPDIR)out/host/eclipse/adtproduct/build/adtproduct.log
-ADT_IDE_ARTIFACT_DIR := $(TOPDIR)out/host/eclipse/adtproduct/build/I.RcpBuild
-ADT_IDE_RELEASE_DIR := $(TOPDIR)out/host/eclipse/adtproduct/release
-
-ADT_IDE_JAVA_LIBS := $(shell $(TOPDIR)sdk/eclipse/scripts/create_all_symlinks.sh -d)
-ADT_IDE_JAVA_DEPS := $(foreach m,$(ADT_IDE_JAVA_LIBS),$(HOST_OUT_JAVA_LIBRARIES)/$(m).jar)
-
-ADT_IDE_JAVA_TARGET := $(ADT_IDE_RELEASE_DIR)/adt_eclipse_ide_java_build
-
-# Common not-quite-phony rule to perform the eclipse build only once
-# This invokes the java builder on eclipse. It generates multiple
-# zipped versions (one per OS, all built at the same time)
-# of the ide as specified in the build.properties file.
-$(ADT_IDE_JAVA_TARGET) : $(TOPDIR)sdk/adtproductbuild/adt_eclipse_ide \
- $(TOPDIR)sdk/adtproductbuild/build.xml \
- $(TOPDIR)sdk/adtproductbuild/build.properties \
- $(ADT_IDE_JAVA_DEPS)
- @if [[ ! -d $(TOPDIR)prebuilts/eclipse-build-deps ]]; then \
- echo "*** [adt_eclipse_ide] ERROR: Missing prebuilts/eclipse-build-deps directory. Make sure to run 'repo init -g all;repo sync' first."; \
- exit 1; \
- fi
- $(hide)rm -rf $(TOPDIR)out/host/eclipse/adtproduct/build/plugins
- $(hide)mkdir -p $(dir $@)
- $(hide)$(TOPDIR)sdk/eclipse/scripts/create_all_symlinks.sh -c
- $(hide)cd $(TOPDIR)sdk/adtproductbuild && \
- rm -f ../../$(ADT_IDE_BUILD_LOG) && mkdir -p ../../$(dir $(ADT_IDE_BUILD_LOG)) && \
- ( java -jar ../../external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar \
- org.eclipse.equinox.launcher.Main \
- -application org.eclipse.ant.core.antRunner \
- -configuration ../../out/host/eclipse/adtproduct/build/configuration \
- -data ../../out/host/eclipse/adtproduct/workspace \
- 2>&1 && \
- mv -f ../../$(ADT_IDE_BUILD_LOG) ../../$(ADT_IDE_BUILD_LOG).1 ) \
- | tee ../../$(ADT_IDE_BUILD_LOG) \
- | sed 's/^/IDE: /'; \
- if [[ -f ../../$(ADT_IDE_BUILD_LOG) ]]; then \
- echo "ADT IDE build failed. Full log:" ; \
- cat ../../$(ADT_IDE_BUILD_LOG) ; \
- exit 1 ; \
- fi
- $(hide)$(ACP) -fp $(V) $(TOPDIR)sdk/adtproductbuild/adt_eclipse_ide $@
-
-# Defines the zip filename generated for an OS specific android IDE.
-define adt-ide-zip
-$(ADT_IDE_RELEASE_DIR)/android-ide-$(ADT_IDE_QUALIFIER)-$(1).$(2).zip
-endef
-
-# Defines the rule needed to make one of the OS specific android IDE.
-# If ADT_IDE_DEST_DIR it also defines the rule to produce the final dest zip.
-# $1 = the platform (linux|macosx|win32).(gtk|cocoa|win32)
-# $2 = the architecture (x86 or x8_64).
-# $3 = the src zip (from out/host/eclipse/artifacts/RcpBuild-...)
-# $4 = the destination directory (where the unpacked eclipse is created)
-# $5 = the destination zip with the zipped eclipse ide.
-define mk-adt-ide-2
-$(5): $(ADT_IDE_JAVA_TARGET)
- $(hide) \
- rm -rf $(V) $(4) && \
- rm -f $(V) $(5) && \
- mkdir -p $(4) && \
- unzip -q $(3) -d $(4) && \
- sed -i 's/org.eclipse.platform/com.android.ide.eclipse.adt.package.product/g' \
- $(4)/eclipse/$(if $(filter macosx.cocoa,$(1)),eclipse.app/Contents/MacOS/)eclipse.ini && \
- sed -i -e 's/org.eclipse.platform.ide/com.android.ide.eclipse.adt.package.product/g' \
- -e 's/org.eclipse.platform/com.android.ide.eclipse.adt.package/g' \
- $(4)/eclipse/configuration/config.ini
- $(hide)cd $(4) && zip -9rq ../$(notdir $(5)) eclipse
-ifneq (,$(ADT_IDE_DEST_DIR))
-$(ADT_IDE_DEST_DIR)/$(notdir $(5)): $(5)
- @mkdir -p $(ADT_IDE_DEST_DIR)
- $(hide)cp $(V) $(5) $(ADT_IDE_DEST_DIR)/$(notdir $(5))
- @echo "ADT IDE copied to $(ADT_IDE_DEST_DIR)/$(notdir $(5))"
-else
- @echo "ADT IDE available at $(5)"
-endif
-endef
-
-# Defines the rule needed to make one of the OS specific android IDE.
-# This is just a convenience wrapper that calls mk-adt-ide-2 and presets
-# the source and destination zip paths.
-# It also sets the dependencies we need to produce the final dest zip.
-# $1 = the platform (linux|macosx|win32).(gtk|cocoa|win32)
-# $2 = the architecture (x86 or x8_64).
-define mk-adt-ide
-$(call mk-adt-ide-2,$(1),$(2), \
- $(ADT_IDE_ARTIFACT_DIR)/RcpBuild-$(1).$(2).zip, \
- $(ADT_IDE_RELEASE_DIR)/android-ide-$(1).$(2), \
- $(call adt-ide-zip,$(1),$(2)))
-ADT_IDE_MODULE_DEPS += $(call adt-ide-zip,$(1),$(2))
-ifneq (,$(ADT_IDE_DEST_DIR))
-ADT_IDE_MODULE_DEPS += $(ADT_IDE_DEST_DIR)/$(notdir $(call adt-ide-zip,$(1),$(2)))
-endif
-endef
-
-$(eval $(call mk-adt-ide,linux.gtk,x86_64))
-$(eval $(call mk-adt-ide,macosx.cocoa,x86_64))
-$(eval $(call mk-adt-ide,win32.win32,x86_64))
-
-# This rule triggers the build of the 3 ide zip files.
-# The adt_eclipse_ide script is currently a platceholder used
-# to detect when the build was completed. We may use it later
-# as a launch script.
-$(LOCAL_BUILT_MODULE) : $(ADT_IDE_MODULE_DEPS)
- @mkdir -p $(dir $@)
- $(hide)$(ACP) -fp $(V) $(TOPDIR)sdk/adtproductbuild/adt_eclipse_ide $@
- @echo "Packing of ADT IDE done"
-
-endif
-
diff --git a/adtproductbuild/Makefile b/adtproductbuild/Makefile
new file mode 100644
index 0000000..64d30ef
--- /dev/null
+++ b/adtproductbuild/Makefile
@@ -0,0 +1,36 @@
+ADT_IDE_BUILD_LOG := out/host/eclipse/adtproduct/build/adtproduct.log
+ADT_IDE_ARTIFACT_DIR := ../../out/host/eclipse/adtproduct/build/I.RcpBuild
+ADT_IDE_RELEASE_DIR := ../../out/host/eclipse/adtproduct/release/
+
+define release-ide
+ srczip=$(ADT_IDE_ARTIFACT_DIR)/RcpBuild-$(1).$(2).zip && \
+ dstdir=$(ADT_IDE_RELEASE_DIR)/android-ide-$(1).$(2) && \
+ rm -rf $(V) $$dstdir && \
+ mkdir -p $$dstdir && \
+ unzip -q $$srczip -d $$dstdir && \
+ if [[ $(1) == "macosx.cocoa" ]]; then eclipseini=eclipse.app/Contents/MacOS/eclipse.ini; else eclipseini=eclipse.ini; fi && \
+ sed -i 's/org.eclipse.platform/com.android.ide.eclipse.adt.package.product/g' $$dstdir/eclipse/$$eclipseini && \
+ sed -i -e 's/org.eclipse.platform.ide/com.android.ide.eclipse.adt.package.product/g' \
+ -e 's/org.eclipse.platform/com.android.ide.eclipse.adt.package/g' $$dstdir/eclipse/configuration/config.ini
+endef
+
+
+all:
+ rm -f ../../$(ADT_IDE_BUILD_LOG) && mkdir -p ../../$(dir $(ADT_IDE_BUILD_LOG)) && \
+ ( java -jar ../../external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar \
+ org.eclipse.equinox.launcher.Main \
+ -application org.eclipse.ant.core.antRunner \
+ -configuration ../../out/host/eclipse/adtproduct/build/configuration \
+ -data ../../out/host/eclipse/adtproduct/workspace \
+ 2>&1 && \
+ mv -f ../../$(ADT_IDE_BUILD_LOG) ../../$(ADT_IDE_BUILD_LOG).1 ) \
+ | tee ../../$(ADT_IDE_BUILD_LOG) \
+ | sed '/SUCCESSFUL/d ; /\[java\]/!b label; s/\s\+\[java\]//; /^\s*$$/d; /Compiling/!d; :label /^\s*$$/d; s/^/ADT: /'; \
+ if [[ -f ../../$(ADT_IDE_BUILD_LOG) ]]; then \
+ echo "ADT IDE build failed. Full log:" ; \
+ cat ../../$(ADT_IDE_BUILD_LOG) ; \
+ exit 1 ; \
+ fi
+ $(call release-ide,linux.gtk,x86_64) ; \
+ $(call release-ide,macosx.cocoa,x86_64) ; \
+ $(call release-ide,win32.win32,x86_64) ; \
diff --git a/adtproductbuild/adt_eclipse_ide b/adtproductbuild/adt_eclipse_ide
deleted file mode 100644
index ea3355c..0000000
--- a/adtproductbuild/adt_eclipse_ide
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-echo "Placeholder launcher script for the ADT Eclipse IDE."
-exit 1
diff --git a/adtproductbuild/build.xml b/adtproductbuild/build.xml
index c91bff0..7851625 100644
--- a/adtproductbuild/build.xml
+++ b/adtproductbuild/build.xml
@@ -7,7 +7,7 @@
<!-- Source for target prebuilts -->
<property name="deltaPackTargetSrcDir" value="${ANDROID_SRC}/prebuilts/eclipse/" />
- <property name="targetSrcDir" value="${ANDROID_SRC}/prebuilts/eclipse-build-deps/" />
+ <property name="targetSrcDir" value="${ANDROID_SRC}/prebuilts/eclipse/" />
<!-- Location where build happens and resulting binaries are generated -->
<property name="outDir" value="${ANDROID_SRC}/out/host/eclipse/adtproduct/" />