Sort Order: Case insensitive... move NULL to end of list

Hello All,
I am trying to sort a set a values, and NULL is a possible value. In the report I am displaying the NULL as EMPTY (I cannot leave that as NULL). I was wondering if there is a way to display this 'EMPTY' value as the last element in the list.
I tried to append various ASCII characters in front of it, but nothing seems to work. Even is if enclose it in parenthesis, is does alphabetical sort.
Is there a work around ?
Thanks for your time !

Nemi, Deborah,
According to SAP Note 1200528 - Web Intelligence does not utilize special characters when sorting, this 'issue' is by design and not by design.
The following is a copy-paste from the note:
Symptom
When attempting to sort a Web Intelligence document on a particular column, special characters such as "-" or "." are not respected.  For example, add the following into a database and then create a Web Intelligence report.
a-Austria
a-Austrailia
a-Belgium
a B-Argentina
a B-Brazil
a B-Egypt
When you sort this data in Web Intelligence it appears as:
a-Austria
a-Austrailia
a B-Argentina
a B-Brazil
a B-Egypt
a-Belgium
Cause
This behavior is by design. For Enterprise XI Release 2, the Lexicographical order of the International components of Unicode has been implemented. This order sorts with respect to the language set for a data source.  This means that if we modify the sort order for English, other languages that we support will also have changes in their sort order.  In this case we must do our best to respect all the languages that we support.
For more information please go to http://icu.sourceforge.net/
Resolution
To work around this behavior, complete one of the following:
Workaround 1:
Create a formula on the field such as
"=Replace([Col001];"-";" ")"
This will replace the - with a space although for this example the sort will be in the same "wrong" order, it will look much nicer.
- or-
Workaround 2:
Create a custom sort:
1. Select the section cell or table cells you want to sort.
2. Click the down arrow next to the Apply/Remove Sort button on the Report toolbar then select Custom... from the drop-down list.
Best,
Srinivas

Similar Messages

  • Sorting Column - Case Insensitive but Lower should be first

    Hi all,
    Lets assume we have am EMployee table :
    create table Emp (Empname varchar2(20));
    It has following records :
    Insert into EMP (EMPNAME) values ('A');
    Insert into EMP (EMPNAME) values ('a');
    Insert into EMP (EMPNAME) values ('b');
    Insert into EMP (EMPNAME) values ('c');
    Insert into EMP (EMPNAME) values ('D');
    Insert into EMP (EMPNAME) values ('e');
    Insert into EMP (EMPNAME) values ('E');
    Insert into EMP (EMPNAME) values ('F');
    i.e
    Empname
    A
    a
    b
    c
    D
    e
    E
    F
    I need output as below : ( Sort by Ascending, case insensitive meaning I don't want all Capital first and then Lower letters. The results should be in alphabetical order it shouldn't matter whether its capital or small. More important is that small letter should come first then the Capital letter). Is this possible?.
    Empname
    a
    A
    b
    c
    D
    e
    E
    F
    Select * from emp order by Lower(empname) Asc;
    Doesn't do the job, because 'A' comes before 'a'.
    Regards,
    Bhaskar

    select empname from emp order by upper(empname),ascii(empname) desc;
    EMPNAME
    a
    A
    b
    c
    D
    e
    E
    F
    Cheers,
    Manik.

  • How do you change the sort order of a Stack on the Dock in List view?

    I want to change the 'Date Added' sort in the list view mode of a stack from descending to ascending.
    I have the Downloads stack sorted by 'Date Added', however I would like to reverse the order of this sorting. When I open the stack, it shows the oldest files at the bottom and newest files at the top. Since there are many hundreds of files, the newest files are actually hidden and I must scroll up to access them. When I access this folder I want to see the most recent files first, at the bottom of the list nearest the stack icon, not the files I downloaded years ago.
    I prefer to use the traditional List view for Stacks because it is faster (no animations or loading preview icons) and easier to navigate visually. Please do not suggest a different view mode such as fan view or use-new-list-stack.

    Have you tried changing the list with the numbers? (See the screen shot)

  • Sort order when using "Album by Artist/Year" album list view

    In iTunes 10, I seem to have lost the sorting I've been using for the past 5 years at least. I use the "Album List" view, and have the album artwork showing to the left of the songs. I see the new "Album by Artist/Year" sort option in the album artwork column, and that is how I would like it to sort. However, now the album are arranged by artist, and within the artist by the year they were released as tagged in the info for each song. I want the newest albums at the top, and I cannot figure out how to make it sort that way. What do I need to do? Basically I want it in descending order by release date, but still sorted by album.

    dannycorker wrote:
    It appears they are, although I refuse to believe this is the accepted behaviour - has no one else complained about this?
    It could simply be a weakness is the way this was all designed. If you look at the information Gracenote uses, it's not unusual for all tracks on a 60's compilation album to be incorrectly listed as the same year, often the year the compilation was released. The same thing tends to happen with re-issued albums. That's down to whoever inputs the information into Gracenote for that album, often a bored record company employee.
    First of all, you could try changing the year for each documentary to the year the album was produced and see if that fixes the problem. If it does, then you have to decide how to handle it.
    Accept it as it is.
    Change the year for the documentary to the same year as the album and simply kid yourself that it's the correct year. (I'm not being flippant, but if the documentary is all footage from album release year, then "technically", the doumentary is from that 60's year.)
    Leave the year of the documentary track blank, but put the year (2010) into the track's "Comments" field instead.
    Propose a workable solution to Apple via Apple Feedback. (I am being a bit flippant now. Sorry, but you'll be in for a long wait before anything might change.)
    Get Gracenote to change their text fields, get the people who input the information into Gracenote to do so correctly and then get Apple to change iTunes to recognise those changes. (Now I am being very flippant. Good luck with this one!) Oh! And hope Apple never decide to change from Gracenote to someone else!
    Number 2 or 3 are probably your best bet.

  • Case insensitive order by

    OK, Im using a select statement and all the works, but when i try to order by a column, it sorts it using the ascII values of the text, so "CAPS" comes before "caps" or even "apples"... is there a way to sort strings case-insensitively?
    Thanks
    Ed

    I think using the "lower" function on the column in the order by clause solves the problem.

  • Podcasts Sort Order

    I don't know where else to suggest this to the Apple Podcasts people, but one of the biggest annoyances with this app for me is that the sort order for each Podcast and the Unplayed Podcasts lists is newest to oldest, this is exactly opposite of what I'd want.  I've been listening to Podcasts with iTunes and my iPhone since the beginning.  I have always had 2 smart playlists with my unplayed podcasts in them, one sorted by shortest to longest and the other sorted by release date oldest to newest.  I've had to live with every other iTunes version breaking the syncing of the Podcast Smart Playlist order and was ecstatic when the Podcasts app came out, thinking I might not have to deal with this anymore, but no.....and I've checked every release and still no better.  I end up going back to my (broken again since last iTunes update) sync'd Smart Playlists in Music.  *sigh*  It's almost enough to drive me to one of the 3rd party apps, but I like to be able to walk in from listening to Podcasts, sync my phone and continue listening to the podcasts on my Mac, none of the 3rd parties give me a way to do that, and that's even broke when you uses the Podcasts app.  So again, back to the Music app.

    I can't agree more.
    I remember many moons ago when someone changed the podcast sorting order in iTunes and caused this exact same problem—all of your podcasts were in the reverse order that you'd want to listen to them. Fortunately someone was listening (no pun intended) and it was fixed again in the next relase.
    What's shocking to me is that this is the third (THIRD!) update to the Podcast app and this problem is still with us. Worse, Apple has eliminated the podcasts from the iTunes and Video apps, where you could play them in the correct order.
    This is a podcast app. A PODCAST APP! It's only job is to play podcasts. Who plays podcasts backwards? You'd think this would be bug #1.
    Sorry for the rant, but I've almost had to stop listenting to podcasts on my iPhone becuse this app is so broken and there are no alternatives. Normally I listent to podcasts at the gym or while driving, but now you have to do so much fiddling with the app (quick! stop the next one playing, go back to the menu, try to find where you are in the list, start the real next one) that I've just put my iPhone away.

  • ADF table: case-insensitive sorting

    I have an <af:table> that uses a SortableModel as it's data source. I have sorting enabled on the table, but it's sorted according to case sensitivity.
    My data source has mixed case, and I'd like to be able to sort regardless of case. Is there anyway to change the behavior so it does a case-insensitive sort instead?
    Thanks

    In case anyone else is looking for this, I went ahead and wrote an extension of CollectionModel that performs a case insensitive sort on String objects. I'm posting it here in the hopes it will help others in the same jam I was. It would really have been helpful if Oracle had made the source code to SortableModel available. I hope I did things properly with the rowKey stuff since there are no examples to work from.
    Anyway, here it is:
    package com.fhm.mwb.ui.model;
    import oracle.adf.view.faces.model.CollectionModel;
    import oracle.adf.view.faces.model.SortCriterion;
    import org.apache.commons.beanutils.BeanComparator;
    import org.apache.commons.collections.comparators.ComparableComparator;
    import org.apache.commons.collections.comparators.ComparatorChain;
    import java.io.Serializable;
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.Comparator;
    import java.util.List;
    import javax.faces.FacesException;
    import javax.faces.model.DataModelEvent;
    import javax.faces.model.DataModelListener;
    * This class provides a sortable data model that uses case insensitive sort order when processing
    * String objects.  All other objects in the data must implement Comparable and are sorted using
    * Comparable.compare().
    public class CaseInsensitiveSortableModel extends CollectionModel {
        private static BasicComparator _comparator = new BasicComparator();
         * Default constructor.
        public CaseInsensitiveSortableModel() {
         * Construct on top of a list of data.
         * @param list List of data to wrap in the model
        public CaseInsensitiveSortableModel(List list) {
            setWrappedData(list);
         * Set the sort criteria for this model
         * @param criteria List of SortCriterion objects
        public void setSortCriteria(List criteria) {
            _sortCriteria = criteria;
            if((criteria != null) && (criteria.size() > 0)) {
                // Sort our model data using this new criteria
                ComparatorChain chain = new ComparatorChain();
                for(int i = 0; i < criteria.size(); i++) {
                    SortCriterion crit = (SortCriterion) criteria.get(i);
                    chain.addComparator(new BeanComparator(crit.getProperty(), _comparator),
                        !crit.isAscending());
                List list = (List) getWrappedData();
                Collections.sort(list, chain);
                setWrappedData(list);
            } else {
                // Clear out our sort order
                _sortCriteria = new ArrayList();
         * Get the current sort criteria.
         * @return List of sort criteria
        public List getSortCriteria() {
            return _sortCriteria;
         * Determine if a given column is sortable.
         * @param column Name of the column to test
         * @return boolean true if the column is sortable
        public boolean isSortable(String column) {
            return true;    // Everything is sortable for now
         * Sets up a value at a particular rowKey to be the current value. The current value
         * is returned by calling {@link #getRowData}.
         * @param rowKey the rowKey of the value to make current. Use null to clear the current value.
        public void setRowKey(String rowKey) {
            if(rowKey == null) {
                setRowIndex(-1);
            } else {
                setRowIndex(Integer.valueOf(rowKey).intValue());
         * Gets the rowKey of the current value. The current value is returned by
         * calling {@link #getRowData}.
         * @return the rowKey of the current value, or null if there is no current value
        public String getRowKey() {
            return isRowAvailable() ? String.valueOf(_rowIndex) : null;
         * Set the list data we are wrapping
         * @throws ClassCastException if data is
         *  non-null and is not a List
        public void setWrappedData(Object data) {
            _wrappedList = (List) data;
            if(_wrappedList == null) {
                setRowIndex(-1);
         * Return the object representing the data wrapped by this model, if any.
        public Object getWrappedData() {
            return _wrappedList;
         * Return true if there is wrappedData
         * available, and the current value of rowIndex is greater
         * than or equal to zero, and less than the size of the list.  Otherwise,
         * return false.
         * @exception FacesException if an error occurs getting the row availability
        public boolean isRowAvailable() {
            return ((_rowIndex < 0) || (_rowIndex > getRowCount())) ? false : true;
         * If there is wrappedData available, return the
         * length of the list.  If no wrappedData is available,
         * return -1.
         * @exception FacesException if an error occurs getting the row count
        public int getRowCount() {
            return (_wrappedList == null) ? (-1) : _wrappedList.size();
         * If row data is available, return the list element at the index
         * specified by rowIndex.  If no wrapped data is available,
         * return null.
         * @exception IllegalArgumentException if now row data is available
         *  at the currently specified row index
        public Object getRowData() {
            if(_wrappedList == null) {
                return null;
            } else if(!isRowAvailable()) {
                throw new IllegalArgumentException("No row data available");
            } else {
                return wrappedList.get(rowIndex);
         * Return the zero-relative index of the currently selected row.  If
         * we are not currently positioned on a row, or no wrappedData
         * is available, return -1.
         * @exception FacesException if an error occurs getting the row index
        public int getRowIndex() {
            return _rowIndex;
         * Set the zero-relative index of the currently selected row, or -1
         * to indicate that we are not positioned on a row.  It is
         * possible to set the row index at a value for which the underlying data
         * collection does not contain any row data.  Therefore, callers may
         * use the isRowAvailable() method to detect whether row data
         * will be available for use by the getRowData() method.
         * If there is no wrappedData available when this method
         * is called, the specified rowIndex is stored (and may be
         * retrieved by a subsequent call to getRowData()), but no
         * event is sent.  Otherwise, if the currently selected row index is
         * changed by this call, a {@link DataModelEvent} will be sent to the
         * rowSelected() method of all registered
         * {@link DataModelListener}s.
         * @param rowIndex The new zero-relative index (must be non-negative)
         * @exception FacesException if an error occurs setting the row index
         * @exception IllegalArgumentException if rowIndex
         *  is less than -1
        public void setRowIndex(int rowIndex) {
            if(rowIndex < -1) {
                throw new IllegalArgumentException("Row index must be >= 0");
            int old = _rowIndex;
            _rowIndex = rowIndex;
            if(_wrappedList == null) {
                return;
            DataModelListener[] listeners = getDataModelListeners();
            if((old != _rowIndex) && (listeners != null)) {
                Object rowData = null;
                if(isRowAvailable()) {
                    rowData = getRowData();
                DataModelEvent event = new DataModelEvent(this, _rowIndex, rowData);
                int n = listeners.length;
                for(int j = 0; j < n; j++) {
                    if(null != listeners[j]) {
                        listeners[j].rowSelected(event);
        private List _wrappedList = new ArrayList();
        private List _sortCriteria = new ArrayList();
        private int _rowIndex = -1;
         * Internal class to provide a general Comparator that treats Strings in a case
         * insensitive manner.  All other types are assumed to be instances of Comparable
         * and handled as such.
        private static class BasicComparator implements Comparator, Serializable {
            private static final Comparator INSENSITIVE_COMPARATOR = String.CASE_INSENSITIVE_ORDER;
            private static final Comparator NORMAL_COMPARATOR = ComparableComparator.getInstance();
            public BasicComparator() {
            public int compare(Object o1, Object o2) {
                if(o1 instanceof String && o2 instanceof String) {
                    return INSENSITIVE_COMPARATOR.compare(o1, o2);
                } else {
                    return NORMAL_COMPARATOR.compare(o1, o2);
    }

  • LC_COLLATE with dotfiles at top, then case-insensitive sorting

    Hello,
    I would like to have the following sort order in file managers or when using the "ls" command:
    1. dotfiles should be on top
    2. other files should follow but case-insensitive
    For (1) LC_COLLATE=C works, but it then sorts the remaining file case-sensitive
    For (2) e.g. LC_COLLATE="en_US.UTF-8" or de_DE.UTF-8 works.
    Is there a locale that fits to my needs? If not, is it possible to edit a locale or create custom rules?
    Thank you!

    Y = Opportunity Revenue
    X = Month
    The report is a 4-month forecast, but not using built-in Forecasting that CRMOD uses; this report uses the Forecast checkbox in an opportunity to determine if the oppty should be on the forecast report, then grabs the overall Oppty Revenue from that same region of the Oppty (not using line/Product level revenue field).
    The report uses a table and above that a chart with 3D cylindrical output where each press model (derived from a field in the Oppty header) is a different color (I'm letting Analysis defaults set the colors for each product).
    My boss wants to sort the colors from smallest model size to largest model size for consistency sake and to make the chart easier to comprehend with a glance.
    Is this even possible? I could see sorting by revenue size, but that's not always the best indicator (as some used larger presses may sell for less than new smaller ones).
    Any ideas?
    Thanks,
    Andy

  • Order by case insensitive?

    Hello,
    What's the best (optimized) way of sorting case insensitive? Will order by lowercase(field) use an index?
    Thanks.

    Hi,
    Using lower-case() is a good choice. Whether index takes effect is due to both container indexes and query expression. If you encounter any specified performance issue please post the question or send email ([email protected]) to me. Thanks.
    Best regards,
    Rucong Zhao
    Oracle Berkeley DB XML

  • Case insensitive ordering ??

    Is it possible to set the query odering on a string field and have it be
    case insensitive? Right now my lower case & upper case strings are
    getting sorted seperately, but I want them sorted together
    i.e.
    Alex
    andover
    Busy
    ball
    Rathern than
    andover
    ball
    Alex
    Busy

    Yup .toLowerCase() worked just fine :)
    Damian Bradicich wrote:
    I'm going to try .toLowerCase() in the ordering, it works in the query,
    why not in the ordering ;) I'll reply shortly to give an update
    Damian Bradicich wrote:
    Is it possible to set the query odering on a string field and have it be
    case insensitive? Right now my lower case & upper case strings are
    getting sorted seperately, but I want them sorted together
    i.e.
    Alex
    andover
    Busy
    ball
    Rathern than
    andover
    ball
    Alex
    Busy

  • How to make a sortable column in a table to do a case insensitive sort ?

    Hi :
    I am using Jdeveloper Studio Edition Version 11.1.1.1.0 and my table columns are sortable but i want to make sure that it case insensitive sort ,for example if i have following column values :
    abc,def,ABC,ghi
    Sorted results should not be likes this : abc,def,ghi,ABC
    instead of this it should be like this : abc,ABC,def,ghi
    Please let me know more about it.
    Thanks
    AN

    Dear,
    I'm using the same configuration, Could u tell me how did u done the sort in a column in any case.
    Regards,
    RengarajR
    Edited by: Rengaraj Rengasamy on Oct 19, 2009 1:34 AM

  • How do I move my large iTunes collection from a case-sensitive hard drive to a case-insensitive hard drive?

    I currently keep my iTunes media on an external hard drive because it takes up too much space on my machine. I recently discovered that it was formatted as case-sensitive when I bought it, and now months later I'm having issues. When attempting to back up my files on a case-insensitive hard drive, the operation failed due to conflicting file/folder names (Artist and artist are now considered the same file name and one would have to overwrite the other). I now have a large iTunes file collection that is stuck on the case-sensitive hard drive, and I want to save a backup on a case-insensitive drive. 
    Is there a way to identify all cases where multiple files/folders have the same title/album/artist but different spelling so there will be no conflicts? The folder/file names would have to be crossed referenced to highlight any cases where File/fiLe/file  would cause a problem.
    I imagine there is a way to do this using iTunes script or Automator  or a command in terminal or something rather than going through and checking/fixing all the information for thousands of songs by hand. I'm at the limits of my minimal development skills, so any help would be appreciated.

    You should be able to use either "Carbon Copy Cloner" or "SuperDuper" (free for this purpose) to copy your case-sensitive volume to an empty case-insensitive one. Make at least two such copies on different drives. One is not enough to be safe.
    If there are any name conflicts—that is, files in the same folder with names that differ only in case, such as "File" and "file"—then you will either get an error or one of the files won't be copied. You must ensure either that no such conflicts exist, or that the consequences are not important. How you do that is up to you. Unless you went out of your way to create conflicts, they probably don't exist.
    Then erase the source volume in Disk Utility as case-insensitive. This action will remove all data from the volume.
    Restore from one of your backups using the same application you used to create it, or use the "Restore" feature of Disk Utility, which will be faster. Search its built-in help for the term "duplicate" if you need instructions.

  • [SOLVED] Case-insensitive filesystem issue

    Dear fellas,
    I am trying to compile an AOSP rom using the following configuration:
    - Arch Linux x64
    - Latest Kernel 3.12.8-1-ARCH
    - BTRFS filesystem
    I got the following error:
    build/core/main.mk:118: You are building on a case-insensitive filesystem.
    build/core/main.mk:119: Please move your source tree to a case-sensitive filesystem.
    build/core/main.mk:120: ************************************************************
    build/core/main.mk:121: *** Case-insensitive filesystems not supported.  Stop.
    So far, I was compiling with no issue. It just starts a couple days ago. I suspect that maybe is due to some kernel change.
    Anyone already face this issue?
    Appreciate any clue.
    ========================SOLVED==========================
    Here is the solution presented by korn36 that did the magic for the main issue:
    Remove this from build/core/main.mk, then compile:
    ifneq ($(HOST_OS),windows)
    ifneq ($(HOST_OS)-$(HOST_ARCH),darwin-ppc)
    # check for a case sensitive file system
    ifneq (a,$(shell mkdir -p $(OUT_DIR) ; \
                    echo a > $(OUT_DIR)/casecheck.txt; \
                        echo B > $(OUT_DIR)/CaseCheck.txt; \
                    cat $(OUT_DIR)/casecheck.txt))
    $(warning ************************************************************)
    $(warning You are building on a case-insensitive filesystem.)
    $(warning Please move your source tree to a case-sensitive filesystem.)
    $(warning ************************************************************)
    $(error Case-insensitive filesystems not supported)
    endif
    endif
    endif
    It will disable the case-sensitivity check.
    ================edited====================
    Again thanks to korn36 for the elegant python switch solution:
    find . -name "*.py" -exec sed -i 's/\(bin\/env\ python$\|bin\/python$\)/bin\/env\ python2/g' {} \;
    Thanks to Kacper for heads me up to a typo I made.
    ===============edited=====================
    or still other script provided by Scimmia (Thanks Scimmia)
    or simply
    find . -name "*.py" -exec sed -i 's/env python$/&2/' {} \;
    Just FYI both scripts works flawlessly!
    Best Regards
    Erick
    Last edited by erickwill (2014-01-26 15:37:56)

    Here you go:
    # Only use ANDROID_BUILD_SHELL to wrap around bash.
    # DO NOT use other shells such as zsh.
    ifdef ANDROID_BUILD_SHELL
    SHELL := $(ANDROID_BUILD_SHELL)
    else
    # Use bash, not whatever shell somebody has installed as /bin/sh
    # This is repeated in config.mk, since envsetup.sh runs that file
    # directly.
    SHELL := /bin/bash
    endif
    # this turns off the suffix rules built into make
    .SUFFIXES:
    # this turns off the RCS / SCCS implicit rules of GNU Make
    % : RCS/%,v
    % : RCS/%
    % : %,v
    % : s.%
    % : SCCS/s.%
    # If a rule fails, delete $@.
    .DELETE_ON_ERROR:
    # Figure out where we are.
    #TOP := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
    #TOP := $(patsubst %/,%,$(TOP))
    # TOPDIR is the normal variable you should use, because
    # if we are executing relative to the current directory
    # it can be "", whereas TOP must be "." which causes
    # pattern matching probles when make strips off the
    # trailing "./" from paths in various places.
    #ifeq ($(TOP),.)
    #TOPDIR :=
    #else
    #TOPDIR := $(TOP)/
    #endif
    # Check for broken versions of make.
    # (Allow any version under Cygwin since we don't actually build the platform there.)
    ifeq (,$(findstring CYGWIN,$(shell uname -sm)))
    ifneq (1,$(strip $(shell expr $(MAKE_VERSION) \>= 3.81)))
    $(warning ********************************************************************************)
    $(warning * You are using version $(MAKE_VERSION) of make.)
    $(warning * Android can only be built by versions 3.81 and higher.)
    $(warning * see https://source.android.com/source/download.html)
    $(warning ********************************************************************************)
    $(error stopping)
    endif
    endif
    # Absolute path of the present working direcotry.
    # This overrides the shell variable $PWD, which does not necessarily points to
    # the top of the source tree, for example when "make -C" is used in m/mm/mmm.
    PWD := $(shell pwd)
    TOP := .
    TOPDIR :=
    BUILD_SYSTEM := $(TOPDIR)build/core
    # This is the default target. It must be the first declared target.
    .PHONY: droid
    DEFAULT_GOAL := droid
    $(DEFAULT_GOAL):
    # Used to force goals to build. Only use for conditionally defined goals.
    .PHONY: FORCE
    FORCE:
    # These goals don't need to collect and include Android.mks/CleanSpec.mks
    # in the source tree.
    dont_bother_goals := clean clobber dataclean installclean \
    help out \
    snod systemimage-nodeps \
    stnod systemtarball-nodeps \
    userdataimage-nodeps userdatatarball-nodeps \
    cacheimage-nodeps \
    vendorimage-nodeps \
    ramdisk-nodeps \
    bootimage-nodeps
    ifneq ($(filter $(dont_bother_goals), $(MAKECMDGOALS)),)
    dont_bother := true
    endif
    # Targets that provide quick help on the build system.
    include $(BUILD_SYSTEM)/help.mk
    # Set up various standard variables based on configuration
    # and host information.
    include $(BUILD_SYSTEM)/config.mk
    # This allows us to force a clean build - included after the config.mk
    # environment setup is done, but before we generate any dependencies. This
    # file does the rm -rf inline so the deps which are all done below will
    # be generated correctly
    include $(BUILD_SYSTEM)/cleanbuild.mk
    # Include the google-specific config
    -include vendor/google/build/config.mk
    VERSION_CHECK_SEQUENCE_NUMBER := 3
    -include $(OUT_DIR)/versions_checked.mk
    ifneq ($(VERSION_CHECK_SEQUENCE_NUMBER),$(VERSIONS_CHECKED))
    $(info Checking build tools versions...)
    ifneq ($(HOST_OS),windows)
    ifneq ($(HOST_OS)-$(HOST_ARCH),darwin-ppc)
    # check for a case sensitive file system
    ifneq (a,$(shell mkdir -p $(OUT_DIR) ; \
    echo a > $(OUT_DIR)/casecheck.txt; \
    echo B > $(OUT_DIR)/CaseCheck.txt; \
    cat $(OUT_DIR)/casecheck.txt))
    $(warning ************************************************************)
    $(warning You are building on a case-insensitive filesystem.)
    $(warning Please move your source tree to a case-sensitive filesystem.)
    $(warning ************************************************************)
    $(error Case-insensitive filesystems not supported)
    endif
    endif
    endif
    # Make sure that there are no spaces in the absolute path; the
    # build system can't deal with them.
    ifneq ($(words $(shell pwd)),1)
    $(warning ************************************************************)
    $(warning You are building in a directory whose absolute path contains)
    $(warning a space character:)
    $(warning $(space))
    $(warning "$(shell pwd)")
    $(warning $(space))
    $(warning Please move your source tree to a path that does not contain)
    $(warning any spaces.)
    $(warning ************************************************************)
    $(error Directory names containing spaces not supported)
    endif
    # Check for the corrent jdk
    ifneq ($(shell java -version 2>&1 | grep -i openjdk),)
    $(info ************************************************************)
    $(info You are attempting to build with an unsupported JDK.)
    $(info $(space))
    $(info You use OpenJDK but only Sun/Oracle JDK is supported.)
    $(info Please follow the machine setup instructions at)
    $(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html)
    $(info $(space))
    $(info Continue at your own peril!)
    $(info ************************************************************)
    endif
    # Check for the correct version of java
    java_version := $(shell java -version 2>&1 | head -n 1 | grep '^java .*[ "]1\.[67][\. "$$]')
    ifeq ($(strip $(java_version)),)
    $(info ************************************************************)
    $(info You are attempting to build with the incorrect version)
    $(info of java.)
    $(info $(space))
    $(info Your version is: $(shell java -version 2>&1 | head -n 1).)
    $(info The correct version is: Java SE 1.6 or 1.7.)
    $(info $(space))
    $(info Please follow the machine setup instructions at)
    $(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html)
    $(info ************************************************************)
    $(error stop)
    endif
    # Check for the correct version of javac
    javac_version := $(shell javac -version 2>&1 | head -n 1 | grep '[ "]1\.[67][\. "$$]')
    ifeq ($(strip $(javac_version)),)
    $(info ************************************************************)
    $(info You are attempting to build with the incorrect version)
    $(info of javac.)
    $(info $(space))
    $(info Your version is: $(shell javac -version 2>&1 | head -n 1).)
    $(info The correct version is: 1.6 or 1.7.)
    $(info $(space))
    $(info Please follow the machine setup instructions at)
    $(info $(space)$(space)$(space)$(space)https://source.android.com/source/download.html)
    $(info ************************************************************)
    $(error stop)
    endif
    ifndef BUILD_EMULATOR
    ifeq (darwin,$(HOST_OS))
    GCC_REALPATH = $(realpath $(shell which $(HOST_CC)))
    ifneq ($(findstring llvm-gcc,$(GCC_REALPATH)),)
    # Using LLVM GCC results in a non functional emulator due to it
    # not honouring global register variables
    $(warning ****************************************)
    $(warning * gcc is linked to llvm-gcc which will *)
    $(warning * not create a useable emulator. *)
    $(warning ****************************************)
    BUILD_EMULATOR := false
    else
    BUILD_EMULATOR := true
    endif
    else # HOST_OS is not darwin
    BUILD_EMULATOR := true
    endif # HOST_OS is darwin
    endif
    $(shell echo 'VERSIONS_CHECKED := $(VERSION_CHECK_SEQUENCE_NUMBER)' \
    > $(OUT_DIR)/versions_checked.mk)
    $(shell echo 'BUILD_EMULATOR ?= $(BUILD_EMULATOR)' \
    >> $(OUT_DIR)/versions_checked.mk)
    endif
    # These are the modifier targets that don't do anything themselves, but
    # change the behavior of the build.
    # (must be defined before including definitions.make)
    INTERNAL_MODIFIER_TARGETS := showcommands all incrementaljavac
    .PHONY: incrementaljavac
    incrementaljavac: ;
    # WARNING:
    # ENABLE_INCREMENTALJAVAC should NOT be enabled by default, because change of
    # a Java source file won't trigger rebuild of its dependent Java files.
    # You can only enable it by adding "incrementaljavac" to your make command line.
    # You are responsible for the correctness of the incremental build.
    # This may decrease incremental build time dramatically for large Java libraries,
    # such as core.jar, framework.jar, etc.
    ENABLE_INCREMENTALJAVAC :=
    ifneq (,$(filter incrementaljavac, $(MAKECMDGOALS)))
    ENABLE_INCREMENTALJAVAC := true
    MAKECMDGOALS := $(filter-out incrementaljavac, $(MAKECMDGOALS))
    endif
    # EMMA_INSTRUMENT_STATIC merges the static emma library to each emma-enabled module.
    ifeq (true,$(EMMA_INSTRUMENT_STATIC))
    EMMA_INSTRUMENT := true
    endif
    # Bring in standard build system definitions.
    include $(BUILD_SYSTEM)/definitions.mk
    # Bring in Qualcomm helper macros
    include $(BUILD_SYSTEM)/qcom_utils.mk
    # Bring in dex_preopt.mk
    include $(BUILD_SYSTEM)/dex_preopt.mk
    ifneq ($(filter user userdebug eng,$(MAKECMDGOALS)),)
    $(info ***************************************************************)
    $(info ***************************************************************)
    $(info Do not pass '$(filter user userdebug eng,$(MAKECMDGOALS))' on \
    the make command line.)
    $(info Set TARGET_BUILD_VARIANT in buildspec.mk, or use lunch or)
    $(info choosecombo.)
    $(info ***************************************************************)
    $(info ***************************************************************)
    $(error stopping)
    endif
    ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),)
    $(info ***************************************************************)
    $(info ***************************************************************)
    $(info Invalid variant: $(TARGET_BUILD_VARIANT)
    $(info Valid values are: $(INTERNAL_VALID_VARIANTS)
    $(info ***************************************************************)
    $(info ***************************************************************)
    $(error stopping)
    endif
    # Variable to check java support level inside PDK build.
    # Not necessary if the components is not in PDK.
    # not defined : not supported
    # "sdk" : sdk API only
    # "platform" : platform API supproted
    TARGET_BUILD_JAVA_SUPPORT_LEVEL := platform
    # The pdk (Platform Development Kit) build
    include build/core/pdk_config.mk
    ### In this section we set up the things that are different
    ### between the build variants
    is_sdk_build :=
    ifneq ($(filter sdk win_sdk sdk_addon,$(MAKECMDGOALS)),)
    is_sdk_build := true
    endif
    ## user/userdebug ##
    user_variant := $(filter user userdebug,$(TARGET_BUILD_VARIANT))
    enable_target_debugging := true
    tags_to_install :=
    ifneq (,$(user_variant))
    # Target is secure in user builds.
    ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1
    ifeq ($(user_variant),userdebug)
    # Pick up some extra useful tools
    tags_to_install += debug
    # Enable Dalvik lock contention logging for userdebug builds.
    ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.lockprof.threshold=500
    else
    # Disable debugging in plain user builds.
    enable_target_debugging :=
    endif
    # Turn on Dalvik preoptimization for user builds, but only if not
    # explicitly disabled and the build is running on Linux (since host
    # Dalvik isn't built for non-Linux hosts).
    ifneq (true,$(DISABLE_DEXPREOPT))
    ifeq ($(user_variant),user)
    ifeq ($(HOST_OS),linux)
    WITH_DEXPREOPT := true
    endif
    endif
    endif
    # Disallow mock locations by default for user builds
    ADDITIONAL_DEFAULT_PROPERTIES += ro.allow.mock.location=0
    else # !user_variant
    # Turn on checkjni for non-user builds.
    ADDITIONAL_BUILD_PROPERTIES += ro.kernel.android.checkjni=1
    # Set device insecure for non-user builds.
    ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=0
    # Allow mock locations by default for non user builds
    ADDITIONAL_DEFAULT_PROPERTIES += ro.allow.mock.location=1
    endif # !user_variant
    ifeq (true,$(strip $(enable_target_debugging)))
    # Target is more debuggable and adbd is on by default
    ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1
    # Include the debugging/testing OTA keys in this build.
    INCLUDE_TEST_OTA_KEYS := true
    else # !enable_target_debugging
    # Target is less debuggable and adbd is off by default
    ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0
    endif # !enable_target_debugging
    ## eng ##
    ifeq ($(TARGET_BUILD_VARIANT),eng)
    tags_to_install := debug eng
    ifneq ($(filter ro.setupwizard.mode=ENABLED, $(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))),)
    # Don't require the setup wizard on eng builds
    ADDITIONAL_BUILD_PROPERTIES := $(filter-out ro.setupwizard.mode=%,\
    $(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))) \
    ro.setupwizard.mode=OPTIONAL
    endif
    endif
    ## sdk ##
    ifdef is_sdk_build
    # Detect if we want to build a repository for the SDK
    sdk_repo_goal := $(strip $(filter sdk_repo,$(MAKECMDGOALS)))
    MAKECMDGOALS := $(strip $(filter-out sdk_repo,$(MAKECMDGOALS)))
    ifneq ($(words $(filter-out $(INTERNAL_MODIFIER_TARGETS) checkbuild,$(MAKECMDGOALS))),1)
    $(error The 'sdk' target may not be specified with any other targets)
    endif
    # TODO: this should be eng I think. Since the sdk is built from the eng
    # variant.
    tags_to_install := debug eng
    ADDITIONAL_BUILD_PROPERTIES += xmpp.auto-presence=true
    ADDITIONAL_BUILD_PROPERTIES += ro.config.nocheckin=yes
    else # !sdk
    endif
    BUILD_WITHOUT_PV := true
    ## precise GC ##
    ifneq ($(filter dalvik.gc.type-precise,$(PRODUCT_TAGS)),)
    # Enabling type-precise GC results in larger optimized DEX files. The
    # additional storage requirements for ".odex" files can cause /system
    # to overflow on some devices, so this is configured separately for
    # each product.
    ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.dexopt-flags=m=y
    endif
    ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android
    # enable vm tracing in files for now to help track
    # the cause of ANRs in the content process
    ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.stack-trace-file=/data/anr/traces.txt
    # Define a function that, given a list of module tags, returns
    # non-empty if that module should be installed in /system.
    # For most goals, anything not tagged with the "tests" tag should
    # be installed in /system.
    define should-install-to-system
    $(if $(filter tests,$(1)),,true)
    endef
    ifdef is_sdk_build
    # For the sdk goal, anything with the "samples" tag should be
    # installed in /data even if that module also has "eng"/"debug"/"user".
    define should-install-to-system
    $(if $(filter samples tests,$(1)),,true)
    endef
    endif
    # If they only used the modifier goals (showcommands, etc), we'll actually
    # build the default target.
    ifeq ($(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS)),)
    .PHONY: $(INTERNAL_MODIFIER_TARGETS)
    $(INTERNAL_MODIFIER_TARGETS): $(DEFAULT_GOAL)
    endif
    # Bring in all modules that need to be built.
    ifeq ($(HOST_OS)-$(HOST_ARCH),darwin-ppc)
    SDK_ONLY := true
    $(info Building the SDK under darwin-ppc is actually obsolete and unsupported.)
    $(error stop)
    endif
    ifeq ($(HOST_OS),windows)
    SDK_ONLY := true
    endif
    ifeq ($(SDK_ONLY),true)
    include $(TOPDIR)sdk/build/windows_sdk_whitelist.mk
    include $(TOPDIR)development/build/windows_sdk_whitelist.mk
    # Exclude tools/acp when cross-compiling windows under linux
    ifeq ($(findstring Linux,$(UNAME)),)
    subdirs += build/tools/acp
    endif
    else # !SDK_ONLY
    # Typical build; include any Android.mk files we can find.
    subdirs := $(TOP)
    FULL_BUILD := true
    endif # !SDK_ONLY
    # Before we go and include all of the module makefiles, stash away
    # the PRODUCT_* values so that later we can verify they are not modified.
    stash_product_vars:=true
    ifeq ($(stash_product_vars),true)
    $(call stash-product-vars, __STASHED)
    endif
    ifneq ($(ONE_SHOT_MAKEFILE),)
    # We've probably been invoked by the "mm" shell function
    # with a subdirectory's makefile.
    include $(ONE_SHOT_MAKEFILE)
    # Change CUSTOM_MODULES to include only modules that were
    # defined by this makefile; this will install all of those
    # modules as a side-effect. Do this after including ONE_SHOT_MAKEFILE
    # so that the modules will be installed in the same place they
    # would have been with a normal make.
    CUSTOM_MODULES := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS)))
    FULL_BUILD :=
    # Stub out the notice targets, which probably aren't defined
    # when using ONE_SHOT_MAKEFILE.
    NOTICE-HOST-%: ;
    NOTICE-TARGET-%: ;
    # A helper goal printing out install paths
    .PHONY: GET-INSTALL-PATH
    GET-INSTALL-PATH:
    @$(foreach m, $(ALL_MODULES), $(if $(ALL_MODULES.$(m).INSTALLED), \
    echo 'INSTALL-PATH: $(m) $(ALL_MODULES.$(m).INSTALLED)';))
    else # ONE_SHOT_MAKEFILE
    ifneq ($(dont_bother),true)
    # Include all of the makefiles in the system
    # Can't use first-makefiles-under here because
    # --mindepth=2 makes the prunes not work.
    subdir_makefiles := \
    $(shell build/tools/findleaves.py --prune=$(OUT_DIR) --prune=.repo --prune=.git $(subdirs) Android.mk)
    ifneq ($(HIDE_MAKEFILE_INCLUDES),y)
    $(foreach mk, $(subdir_makefiles), $(info including $(mk) ...)$(eval include $(mk)))
    else
    $(foreach mk, $(subdir_makefiles), $(eval include $(mk)))
    endif
    endif # dont_bother
    endif # ONE_SHOT_MAKEFILE
    # Now with all Android.mks loaded we can do post cleaning steps.
    include $(BUILD_SYSTEM)/post_clean.mk
    ifeq ($(stash_product_vars),true)
    $(call assert-product-vars, __STASHED)
    endif
    include $(BUILD_SYSTEM)/legacy_prebuilts.mk
    ifneq ($(filter-out $(GRANDFATHERED_ALL_PREBUILT),$(strip $(notdir $(ALL_PREBUILT)))),)
    $(warning *** Some files have been added to ALL_PREBUILT.)
    $(warning *)
    $(warning * ALL_PREBUILT is a deprecated mechanism that)
    $(warning * should not be used for new files.)
    $(warning * As an alternative, use PRODUCT_COPY_FILES in)
    $(warning * the appropriate product definition.)
    $(warning * build/target/product/core.mk is the product)
    $(warning * definition used in all products.)
    $(warning *)
    $(foreach bad_prebuilt,$(filter-out $(GRANDFATHERED_ALL_PREBUILT),$(strip $(notdir $(ALL_PREBUILT)))),$(warning * unexpected $(bad_prebuilt) in ALL_PREBUILT))
    $(warning *)
    $(error ALL_PREBUILT contains unexpected files)
    endif
    # All module makefiles have been included at this point.
    # Fix up CUSTOM_MODULES to refer to installed files rather than
    # just bare module names. Leave unknown modules alone in case
    # they're actually full paths to a particular file.
    known_custom_modules := $(filter $(ALL_MODULES),$(CUSTOM_MODULES))
    unknown_custom_modules := $(filter-out $(ALL_MODULES),$(CUSTOM_MODULES))
    CUSTOM_MODULES := \
    $(call module-installed-files,$(known_custom_modules)) \
    $(unknown_custom_modules)
    # Define dependencies for modules that require other modules.
    # This can only happen now, after we've read in all module makefiles.
    # TODO: deal with the fact that a bare module name isn't
    # unambiguous enough. Maybe declare short targets like
    # APPS:Quake or HOST:SHARED_LIBRARIES:libutils.
    # BUG: the system image won't know to depend on modules that are
    # brought in as requirements of other modules.
    define add-required-deps
    $(1): | $(2)
    endef
    $(foreach m,$(ALL_MODULES), \
    $(eval r := $(ALL_MODULES.$(m).REQUIRED)) \
    $(if $(r), \
    $(eval r := $(call module-installed-files,$(r))) \
    $(eval t_m := $(filter $(TARGET_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \
    $(eval h_m := $(filter $(HOST_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \
    $(eval t_r := $(filter $(TARGET_OUT_ROOT)/%, $(r))) \
    $(eval h_r := $(filter $(HOST_OUT_ROOT)/%, $(r))) \
    $(if $(t_m), $(eval $(call add-required-deps, $(t_m),$(t_r)))) \
    $(if $(h_m), $(eval $(call add-required-deps, $(h_m),$(h_r)))) \
    t_m :=
    h_m :=
    t_r :=
    h_r :=
    # Resolve the dependencies on shared libraries.
    $(foreach m,$(TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES), \
    $(eval p := $(subst :,$(space),$(m))) \
    $(eval r := $(filter $(TARGET_OUT_ROOT)/%,$(call module-installed-files,\
    $(subst $(comma),$(space),$(lastword $(p)))))) \
    $(eval $(call add-required-deps,$(word 2,$(p)),$(r))))
    $(foreach m,$(HOST_DEPENDENCIES_ON_SHARED_LIBRARIES), \
    $(eval p := $(subst :,$(space),$(m))) \
    $(eval r := $(filter $(HOST_OUT_ROOT)/%,$(call module-installed-files,\
    $(subst $(comma),$(space),$(lastword $(p)))))) \
    $(eval $(call add-required-deps,$(word 2,$(p)),$(r))))
    m :=
    r :=
    p :=
    add-required-deps :=
    # Figure out our module sets.
    # Of the modules defined by the component makefiles,
    # determine what we actually want to build.
    ifdef FULL_BUILD
    # The base list of modules to build for this product is specified
    # by the appropriate product definition file, which was included
    # by product_config.make.
    product_MODULES := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES)
    # Filter out the overridden packages before doing expansion
    product_MODULES := $(filter-out $(foreach p, $(product_MODULES), \
    $(PACKAGES.$(p).OVERRIDES)), $(product_MODULES))
    $(call expand-required-modules,product_MODULES,$(product_MODULES))
    product_FILES := $(call module-installed-files, $(product_MODULES))
    ifeq (0,1)
    $(info product_FILES for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):)
    $(foreach p,$(product_FILES),$(info : $(p)))
    $(error done)
    endif
    else
    # We're not doing a full build, and are probably only including
    # a subset of the module makefiles. Don't try to build any modules
    # requested by the product, because we probably won't have rules
    # to build them.
    product_FILES :=
    endif
    eng_MODULES := $(sort \
    $(call get-tagged-modules,eng) \
    $(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_ENG)) \
    debug_MODULES := $(sort \
    $(call get-tagged-modules,debug) \
    $(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_DEBUG)) \
    tests_MODULES := $(sort \
    $(call get-tagged-modules,tests) \
    $(call module-installed-files, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_TESTS)) \
    # TODO: Remove the 3 places in the tree that use ALL_DEFAULT_INSTALLED_MODULES
    # and get rid of it from this list.
    # TODO: The shell is chosen by magic. Do we still need this?
    modules_to_install := $(sort \
    $(ALL_DEFAULT_INSTALLED_MODULES) \
    $(product_FILES) \
    $(foreach tag,$(tags_to_install),$($(tag)_MODULES)) \
    $(call get-tagged-modules, shell_$(TARGET_SHELL)) \
    $(CUSTOM_MODULES) \
    # Some packages may override others using LOCAL_OVERRIDES_PACKAGES.
    # Filter out (do not install) any overridden packages.
    overridden_packages := $(call get-package-overrides,$(modules_to_install))
    ifdef overridden_packages
    # old_modules_to_install := $(modules_to_install)
    modules_to_install := \
    $(filter-out $(foreach p,$(overridden_packages),$(p) %/$(p).apk), \
    $(modules_to_install))
    endif
    #$(error filtered out
    # $(filter-out $(modules_to_install),$(old_modules_to_install)))
    # Don't include any GNU targets in the SDK. It's ok (and necessary)
    # to build the host tools, but nothing that's going to be installed
    # on the target (including static libraries).
    ifdef is_sdk_build
    target_gnu_MODULES := \
    $(filter \
    $(TARGET_OUT_INTERMEDIATES)/% \
    $(TARGET_OUT)/% \
    $(TARGET_OUT_DATA)/%, \
    $(sort $(call get-tagged-modules,gnu)))
    $(info Removing from sdk:)$(foreach d,$(target_gnu_MODULES),$(info : $(d)))
    modules_to_install := \
    $(filter-out $(target_gnu_MODULES),$(modules_to_install))
    # Ensure every module listed in PRODUCT_PACKAGES* gets something installed
    # TODO: Should we do this for all builds and not just the sdk?
    $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES), \
    $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\
    $(error $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES has nothing to install!)))
    $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_DEBUG), \
    $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\
    $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_DEBUG has nothing to install!)))
    $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_ENG), \
    $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\
    $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_ENG has nothing to install!)))
    $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_TESTS), \
    $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\
    $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_TESTS has nothing to install!)))
    endif
    # build/core/Makefile contains extra stuff that we don't want to pollute this
    # top-level makefile with. It expects that ALL_DEFAULT_INSTALLED_MODULES
    # contains everything that's built during the current make, but it also further
    # extends ALL_DEFAULT_INSTALLED_MODULES.
    ALL_DEFAULT_INSTALLED_MODULES := $(modules_to_install)
    include $(BUILD_SYSTEM)/Makefile
    modules_to_install := $(sort $(ALL_DEFAULT_INSTALLED_MODULES))
    ALL_DEFAULT_INSTALLED_MODULES :=
    # These are additional goals that we build, in order to make sure that there
    # is as little code as possible in the tree that doesn't build.
    modules_to_check := $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).CHECKED))
    # If you would like to build all goals, and not skip any intermediate
    # steps, you can pass the "all" modifier goal on the commandline.
    ifneq ($(filter all,$(MAKECMDGOALS)),)
    modules_to_check += $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).BUILT))
    endif
    # for easier debugging
    modules_to_check := $(sort $(modules_to_check))
    #$(error modules_to_check $(modules_to_check))
    # This is used to to get the ordering right, you can also use these,
    # but they're considered undocumented, so don't complain if their
    # behavior changes.
    .PHONY: prebuilt
    prebuilt: $(ALL_PREBUILT)
    # An internal target that depends on all copied headers
    # (see copy_headers.make). Other targets that need the
    # headers to be copied first can depend on this target.
    .PHONY: all_copied_headers
    all_copied_headers: ;
    $(ALL_C_CPP_ETC_OBJECTS): | all_copied_headers
    # All the droid stuff, in directories
    .PHONY: files
    files: prebuilt \
    $(modules_to_install) \
    $(INSTALLED_ANDROID_INFO_TXT_TARGET)
    .PHONY: checkbuild
    checkbuild: $(modules_to_check)
    ifeq (true,$(ANDROID_BUILD_EVERYTHING_BY_DEFAULT)$(filter $(MAKECMDGOALS),checkbuild))
    droid: checkbuild
    else
    # ANDROID_BUILD_EVERYTHING_BY_DEFAULT not set, or checkbuild is one of the cmd goals.
    checkbuild: droid
    endif
    .PHONY: ramdisk
    ramdisk: $(INSTALLED_RAMDISK_TARGET)
    .PHONY: factory_ramdisk
    factory_ramdisk: $(INSTALLED_FACTORY_RAMDISK_TARGET)
    .PHONY: factory_bundle
    factory_bundle: $(INSTALLED_FACTORY_BUNDLE_TARGET)
    .PHONY: systemtarball
    systemtarball: $(INSTALLED_SYSTEMTARBALL_TARGET)
    .PHONY: boottarball
    boottarball: $(INSTALLED_BOOTTARBALL_TARGET)
    .PHONY: userdataimage
    userdataimage: $(INSTALLED_USERDATAIMAGE_TARGET)
    ifneq (,$(filter userdataimage, $(MAKECMDGOALS)))
    $(call dist-for-goals, userdataimage, $(BUILT_USERDATAIMAGE_TARGET))
    endif
    .PHONY: userdatatarball
    userdatatarball: $(INSTALLED_USERDATATARBALL_TARGET)
    .PHONY: cacheimage
    cacheimage: $(INSTALLED_CACHEIMAGE_TARGET)
    .PHONY: vendorimage
    vendorimage: $(INSTALLED_VENDORIMAGE_TARGET)
    .PHONY: bootimage
    bootimage: $(INSTALLED_BOOTIMAGE_TARGET)
    # phony target that include any targets in $(ALL_MODULES)
    .PHONY: all_modules
    ifndef BUILD_MODULES_IN_PATHS
    all_modules: $(ALL_MODULES)
    else
    # BUILD_MODULES_IN_PATHS is a list of paths relative to the top of the tree
    module_path_patterns := $(foreach p, $(BUILD_MODULES_IN_PATHS),\
    $(if $(filter %/,$(p)),$(p)%,$(p)/%))
    my_all_modules := $(sort $(foreach m, $(ALL_MODULES),$(if $(filter\
    $(module_path_patterns), $(addsuffix /,$(ALL_MODULES.$(m).PATH))),$(m))))
    all_modules: $(my_all_modules)
    endif
    # Build files and then package it into the rom formats
    .PHONY: droidcore
    droidcore: files \
    systemimage \
    $(INSTALLED_BOOTIMAGE_TARGET) \
    $(INSTALLED_RECOVERYIMAGE_TARGET) \
    $(INSTALLED_USERDATAIMAGE_TARGET) \
    $(INSTALLED_CACHEIMAGE_TARGET) \
    $(INSTALLED_VENDORIMAGE_TARGET) \
    $(INSTALLED_FILES_FILE)
    # dist_files only for putting your library into the dist directory with a full build.
    .PHONY: dist_files
    ifneq ($(TARGET_BUILD_APPS),)
    # If this build is just for apps, only build apps and not the full system by default.
    unbundled_build_modules :=
    ifneq ($(filter all,$(TARGET_BUILD_APPS)),)
    # If they used the magic goal "all" then build all apps in the source tree.
    unbundled_build_modules := $(foreach m,$(sort $(ALL_MODULES)),$(if $(filter APPS,$(ALL_MODULES.$(m).CLASS)),$(m)))
    else
    unbundled_build_modules := $(TARGET_BUILD_APPS)
    endif
    # Dist the installed files if they exist.
    apps_only_installed_files := $(foreach m,$(unbundled_build_modules),$(ALL_MODULES.$(m).INSTALLED))
    $(call dist-for-goals,apps_only, $(apps_only_installed_files))
    # For uninstallable modules such as static Java library, we have to dist the built file,
    # as <module_name>.<suffix>
    apps_only_dist_built_files := $(foreach m,$(unbundled_build_modules),$(if $(ALL_MODULES.$(m).INSTALLED),,\
    $(if $(ALL_MODULES.$(m).BUILT),$(ALL_MODULES.$(m).BUILT):$(m)$(suffix $(ALL_MODULES.$(m).BUILT)))))
    $(call dist-for-goals,apps_only, $(apps_only_dist_built_files))
    ifeq ($(EMMA_INSTRUMENT),true)
    $(EMMA_META_ZIP) : $(apps_only_installed_files)
    $(call dist-for-goals,apps_only, $(EMMA_META_ZIP))
    endif
    $(PROGUARD_DICT_ZIP) : $(apps_only_installed_files)
    $(call dist-for-goals,apps_only, $(PROGUARD_DICT_ZIP))
    .PHONY: apps_only
    apps_only: $(unbundled_build_modules)
    droid: apps_only
    # Combine the NOTICE files for a apps_only build
    $(eval $(call combine-notice-files, \
    $(target_notice_file_txt), \
    $(target_notice_file_html), \
    "Notices for files for apps:", \
    $(TARGET_OUT_NOTICE_FILES), \
    $(apps_only_installed_files)))
    else # TARGET_BUILD_APPS
    $(call dist-for-goals, droidcore, \
    $(INTERNAL_UPDATE_PACKAGE_TARGET) \
    $(INTERNAL_OTA_PACKAGE_TARGET) \
    $(SYMBOLS_ZIP) \
    $(INSTALLED_FILES_FILE) \
    $(INSTALLED_BUILD_PROP_TARGET) \
    $(BUILT_TARGET_FILES_PACKAGE) \
    $(INSTALLED_ANDROID_INFO_TXT_TARGET) \
    $(INSTALLED_RAMDISK_TARGET) \
    $(INSTALLED_FACTORY_RAMDISK_TARGET) \
    $(INSTALLED_FACTORY_BUNDLE_TARGET) \
    # Put a copy of the radio/bootloader files in the dist dir.
    $(foreach f,$(INSTALLED_RADIOIMAGE_TARGET), \
    $(call dist-for-goals, droidcore, $(f)))
    ifneq ($(TARGET_BUILD_PDK),true)
    $(call dist-for-goals, droidcore, \
    $(APPS_ZIP) \
    $(INTERNAL_EMULATOR_PACKAGE_TARGET) \
    $(PACKAGE_STATS_FILE) \
    endif
    ifeq ($(EMMA_INSTRUMENT),true)
    $(EMMA_META_ZIP) : $(INSTALLED_SYSTEMIMAGE)
    $(call dist-for-goals, dist_files, $(EMMA_META_ZIP))
    endif
    # Building a full system-- the default is to build droidcore
    droid: droidcore dist_files
    endif # TARGET_BUILD_APPS
    .PHONY: docs
    docs: $(ALL_DOCS)
    .PHONY: sdk
    ALL_SDK_TARGETS := $(INTERNAL_SDK_TARGET)
    sdk: $(ALL_SDK_TARGETS)
    $(call dist-for-goals,sdk win_sdk, \
    $(ALL_SDK_TARGETS) \
    $(SYMBOLS_ZIP) \
    $(INSTALLED_BUILD_PROP_TARGET) \
    # umbrella targets to assit engineers in verifying builds
    .PHONY: java native target host java-host java-target native-host native-target \
    java-host-tests java-target-tests native-host-tests native-target-tests \
    java-tests native-tests host-tests target-tests
    # some synonyms
    .PHONY: host-java target-java host-native target-native \
    target-java-tests target-native-tests
    host-java : java-host
    target-java : java-target
    host-native : native-host
    target-native : native-target
    target-java-tests : java-target-tests
    target-native-tests : native-target-tests
    .PHONY: lintall
    .PHONY: samplecode
    sample_MODULES := $(sort $(call get-tagged-modules,samples))
    sample_APKS_DEST_PATH := $(TARGET_COMMON_OUT_ROOT)/samples
    sample_APKS_COLLECTION := \
    $(foreach module,$(sample_MODULES),$(sample_APKS_DEST_PATH)/$(notdir $(module)))
    $(foreach module,$(sample_MODULES),$(eval $(call \
    copy-one-file,$(module),$(sample_APKS_DEST_PATH)/$(notdir $(module)))))
    sample_ADDITIONAL_INSTALLED := \
    $(filter-out $(modules_to_install) $(modules_to_check) $(ALL_PREBUILT),$(sample_MODULES))
    samplecode: $(sample_APKS_COLLECTION)
    @echo -e ${PRT_TGT}"Collect sample code apks:"${CL_RST}" $^"
    # remove apks that are not intended to be installed.
    rm -f $(sample_ADDITIONAL_INSTALLED)
    .PHONY: findbugs
    findbugs: $(INTERNAL_FINDBUGS_HTML_TARGET) $(INTERNAL_FINDBUGS_XML_TARGET)
    .PHONY: clean
    clean:
    @rm -rf $(OUT_DIR)
    @echo -e ${PRT_TGT}"Entire build directory removed."${CL_RST}
    .PHONY: clobber
    clobber: clean
    # The rules for dataclean and installclean are defined in cleanbuild.mk.
    #xxx scrape this from ALL_MODULE_NAME_TAGS
    .PHONY: modules
    modules:
    @echo -e ${PRT_TGT}"Available sub-modules:"${CL_RST}
    @echo "$(call module-names-for-tag-list,$(ALL_MODULE_TAGS))" | \
    tr -s ' ' '\n' | sort -u | $(COLUMN)
    .PHONY: showcommands
    showcommands:
    @echo >/dev/null
    .PHONY: nothing
    nothing:
    @echo Successfully read the makefiles.

  • How can I copy media from an HFS case-sensitive drive to an HFS case-insensitive drive without getting an error?

    About a year ago, I accidentally created a partition on my drive for my iTunes Music. On that parition, called MUSIC, I selected the filesystem to be an HFS, Journaled, case-sensitive partition. Since then, all of my music, new and old, lives on the case-sensitive MUSIC parition.
    My other partition, called BOX, is an HFS, Journaled, case-insensitive filesystem, as are my external drives I use for archiving and backing up my music.
    My dilemma: when I try to copy my music/iTunes media from the MUSIC partition to a different partition that's case-insensitive, I obviously run into errors saying that certain files can't be copied because they will overwrite others. Subsequently, I can't back up my music and iTunes media to another drive unless it has the same filesystem parameters favoring case-sensitivity. I want to move my media to a case-insenstive drive/partition.
    As the story goes, I'd like to avoid having to reformat and worry about moving my media around because I feel, in the end, I'd end up doing more harm then good in my pursuit to fix this issue.
    My question: is there some way I can detect which files are conflicting with each other, and then manually rename them? My music library runs about 16,000 songs deep, but I'd still feel saved even if I had to go through and manually rename all of the music files so they don't conflict with each other in order to get them on to a case-insensitive drive. Perhaps there's an AppleScript someone knows about that I could execute in my MUSIC partition to see which files/directories are causing my problems? In other words, I'm thinking there could be a way to detect the same file/directory names that are only different soley because of their case.
    Any help, suggestions, or solutions are welcome. Thank you all for your time in helping me solve this!
    And have a Happy Thanksgiving

    How do I restore a case-sensitive,...: Apple Support Communities

  • How do I get Iphoto to preserve the sort order when I transfer an album?

    Here's my problem. I carefully sorted my album of 230 photos manually. Each photo was then numbered from 1 to 230.   Then I used IPhoto Library Manager to transfer this album someplace else -- to my desktop, to a thumb drive, to Dropbox---   In every case, when I did that, the photos themselves transfered just fine,  but the sort order I had so carefully constructed has fallen apart and cannot by retrieved. Even  when I  close and then reopen an Album I have transferred to my Desktop, it loses its sort order.  This is driving my crazy  because I need to transfer this album so that it preserves the slideshow I have designed for it. A slideshow, of course, demands preserving the order of the slides.
    In short, how can I preserve the sort order of an album when I transfer it out of one library to another?

    If you're transferring to another library, why are you exporting to the Finder (which is what Desktop, thumbdrive and DropBox are). This doesn’t understand manual sorting from iPhoto.
    Here's one (of several) way(s) to do what you want:
    Make an Album of the photos, then drag the pics into your preferred order.
    Then Photos Menu: Batch Change -> Set Title to Text "John's Birthday", for instance, and tick the box to append a number to each Photo. Now your photos are titled 'John's Birthday 001, John's Birthday 002 ... etc'
    Then File -> Export and in the Export dialogue set the Filename to "Use Title"
    Sort on Filename in the FInder and you end up with a folder full of images in the same order as the Album in iPhoto.

Maybe you are looking for

  • Choppy mp4 playback in iTunes

    Until tonight, I've never had issues with video playback in iTunes. I have a library of mp4 video files that I've played successfully in the past with little or no video quality issues. All of a sudden, none of my videos will play correctly in iTunes

  • XML data source and relative path

    Hi, I'm developing my reports in a Windows environment and deploying it on a Linux. My problem is, I cannot seem to specify a relative path for my XML datasource. Since, my deployement is in Linux, I cannot have the standard "C:\myreport\def.xml". Is

  • People picker is not working for ie11 but working fine for other lower version

    i am using sharepoint 2010 and windows authentication recently i have updated my ie to ie11 and problem goes here. when i try to select from people picker, there are an unexpected error happened  however when i use other ie version, people picker wor

  • Purchase Order not subject to release strategy

    Good day everyone! I've created one release strategy for all my purchasing documents. The characteristic is net value, and the value of this characteristic is >=0.00. Meaning, ALL purchase orders are subject to release strategy. After I did the relea

  • How to reference an application without opening it?

    The attached vi is used to determine the currently installed version of Microsoft Word. I have used this in the past with built applications. This is placed in the calling vi's initialization. However, just now, it opens the Word program. (Before it