Export make target now produces a .zip file by default

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3778 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-07-12 23:54:13 +00:00
parent 09c2e9b9e3
commit 17e6f2e481
4 changed files with 198 additions and 141 deletions
+158 -129
View File
@@ -1,129 +1,158 @@
COPYING -- Describes the terms under which Nuttx is distributed. A COPYING -- Describes the terms under which Nuttx is distributed. A
copy of the BSD-style licensing is included in this file. In my copy of the BSD-style licensing is included in this file. In my
words -- I believe that you should free to use NuttX in any words -- I believe that you should free to use NuttX in any
environment, private, private, commercial, open, closed, etc. environment, private, private, commercial, open, closed, etc.
provided only that you repect the modest copyright notices as provided only that you repect the modest copyright notices as
described in license (below). Please feel free to contact me if you described in license (below). Please feel free to contact me if you
have any licensing concerns. have any licensing concerns.
NuttX NuttX
^^^^^^ ^^^^^^
License for NuttX in general (authorship of individual files may vary): License for NuttX in general (authorship of individual files may vary):
/************************************************************************* /*************************************************************************
* *
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* *
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * distribution.
* 3. Neither the name NuttX nor the names of its contributors may be * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*************************************************************************/ *************************************************************************/
uIP FAT Long File Names
^^^ ^^^^^^^^^^^^^^^^^^^
Many lower-level networking components of NuttX derive from uIP which NOTE: If CONFIG_FAT_LFN is defined in your NuttX configuration file, then
has a similar BSD style license: there may be some legal, patent issues. The following was extracted from
the entry "File Allocation Table from Wikipedia, the free encyclopedia:
Copyright (c) 2001-2003, Adam Dunkels.
All rights reserved. "On December 3, 2003 Microsoft announced it would be offering licenses
for use of its FAT specification and 'associated intellectual property',
IGMP at the cost of a US$0.25 royalty per unit sold, with a $250,000 maximum
^^^^ royalty per license agreement.
IGMP support, if enabled in uIP, adds additional logic by Steve Reynolds: o "U.S. Patent 5,745,902 (http://www.google.com/patents?vid=5745902) -
Method and system for accessing a file using file names having
Copyright (c) 2002 CITEL Technologies Ltd. different file name formats. ...
All rights reserved. o "U.S. Patent 5,579,517 (http://www.google.com/patents?vid=5579517) -
Common name space for long and short filenames. ...
The HID Parser in drivers/usbhost o "U.S. Patent 5,758,352 (http://www.google.com/patents?vid=5758352) -
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Common name space for long and short filenames. ...
o "U.S. Patent 6,286,013 (http://www.google.com/patents?vid=6286013) -
Adapted from the LUFA Library (MIT license): Method and system for providing a common name space for long and
short file names in an operating system. ...
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
dean [at] fourwalledcubicle [dot] com, www.lufa-lib.org "Many technical commentators have concluded that these patents only cover
FAT implementations that include support for long filenames, and that
Permission to use, copy, modify, distribute, and sell this removable solid state media and consumer devices only using short names
software and its documentation for any purpose is hereby granted would be unaffected. ..."
without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this So you have been forewarned: Use the long filename at your own risk!
permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in uIP
advertising or publicity pertaining to distribution of the ^^^
software without specific, written prior permission.
Many lower-level networking components of NuttX derive from uIP which
The author disclaim all warranties with regard to this has a similar BSD style license:
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any Copyright (c) 2001-2003, Adam Dunkels.
special, indirect or consequential damages or any damages All rights reserved.
whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action, IGMP
arising out of or in connection with the use or performance of ^^^^
this software.
IGMP support, if enabled in uIP, adds additional logic by Steve Reynolds:
Certain functions in the NuttX C-library derive from other BSD-compatible
sources: Copyright (c) 2002 CITEL Technologies Ltd.
All rights reserved.
strtod():
^^^^^^^^ The HID Parser in drivers/usbhost
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Copyright (C) 2002 Michael Ringgaard. All rights reserved.
Copyright (C) 2006-2007 H. Peter Anvin. Adapted from the LUFA Library (MIT license):
dtoa(): Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
^^^^^^ dean [at] fourwalledcubicle [dot] com, www.lufa-lib.org
If you enable floating point conversions with CONFIG_LIBC_FLOATINGPOINT, Permission to use, copy, modify, distribute, and sell this
then some files with an unmodified BSD license will be included. That software and its documentation for any purpose is hereby granted
license is similar to the above (modified) BSD license, but has an without fee, provided that the above copyright notice appear in
additional requirement that I state the following: all copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting
"This product includes software developed by the University of documentation, and that the name of the author not be used in
California, Berkeley and its contributors." advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
Documents/rss.gif
^^^^^^^^^^^^^^^^^ The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability
Licensed under Creative Commons Attribution-Share Alike 2.5 Generic and fitness. In no event shall the author be liable for any
license: special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether
You are free: in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of
* to share to copy, distribute and transmit the work this software.
* to remix to adapt the work
Certain functions in the NuttX C-library derive from other BSD-compatible
Under the following conditions: sources:
* attribution You must attribute the work in the manner specified strtod():
by the author or licensor (but not in any way that suggests that ^^^^^^^^
they endorse you or your use of the work).
* share alike If you alter, transform, or build upon this work, Copyright (C) 2002 Michael Ringgaard. All rights reserved.
you may distribute the resulting work only under the same or Copyright (C) 2006-2007 H. Peter Anvin.
similar license to this one.
dtoa():
^^^^^^
If you enable floating point conversions with CONFIG_LIBC_FLOATINGPOINT,
then some files with an unmodified BSD license will be included. That
license is similar to the above (modified) BSD license, but has an
additional requirement that I state the following:
"This product includes software developed by the University of
California, Berkeley and its contributors."
Documents/rss.gif
^^^^^^^^^^^^^^^^^
Licensed under Creative Commons Attribution-Share Alike 2.5 Generic
license:
You are free:
* to share to copy, distribute and transmit the work
* to remix to adapt the work
Under the following conditions:
* attribution You must attribute the work in the manner specified
by the author or licensor (but not in any way that suggests that
they endorse you or your use of the work).
* share alike If you alter, transform, or build upon this work,
you may distribute the resulting work only under the same or
similar license to this one.
+1 -1
View File
@@ -108,7 +108,7 @@ LDPATHS = $(addprefix -L$(TOPDIR)/,$(dir $(LINKLIBS)))
LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS)))) LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
all: up_head$(OBJEXT) libarch$(LIBEXT) all: up_head$(OBJEXT) libarch$(LIBEXT)
.PHONY: clean distclean cleanrel depend .PHONY: export_head clean distclean cleanrel depend
$(AOBJS): %$(OBJEXT): %.S $(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@) $(call ASSEMBLE, $<, $@)
+4
View File
@@ -36,9 +36,11 @@
include $(TOPDIR)/.config include $(TOPDIR)/.config
include $(EXPORTDIR)/Make.defs include $(EXPORTDIR)/Make.defs
ifdef ARCHSCRIPT
LDPATH = ${shell echo "$(ARCHSCRIPT)" | sed -e "s/^-T[ ]*//g"} LDPATH = ${shell echo "$(ARCHSCRIPT)" | sed -e "s/^-T[ ]*//g"}
LDNAME = ${shell basename ${LDPATH}} LDNAME = ${shell basename ${LDPATH}}
LDDIR = ${shell dirname ${LDPATH}} LDDIR = ${shell dirname ${LDPATH}}
endif
ARCHSUBDIR = "arch/$(CONFIG_ARCH)/src" ARCHSUBDIR = "arch/$(CONFIG_ARCH)/src"
ARCHDIR ="$(TOPDIR)/$(ARCHSUBDIR)" ARCHDIR ="$(TOPDIR)/$(ARCHSUBDIR)"
@@ -51,9 +53,11 @@ $(EXPORTDIR)/makeinfo.sh: $(TOPDIR)/.config $(EXPORTDIR)/Make.defs
@echo "" >> $(EXPORTDIR)/makeinfo.sh @echo "" >> $(EXPORTDIR)/makeinfo.sh
@echo "ARCHSUBDIR=\"$(ARCHSUBDIR)\"" >> $(EXPORTDIR)/makeinfo.sh @echo "ARCHSUBDIR=\"$(ARCHSUBDIR)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "ARCHDIR=\"$(ARCHDIR)\"" >> $(EXPORTDIR)/makeinfo.sh @echo "ARCHDIR=\"$(ARCHDIR)\"" >> $(EXPORTDIR)/makeinfo.sh
ifdef ARCHSCRIPT
@echo "LDNAME=\"$(LDNAME)\"" >> $(EXPORTDIR)/makeinfo.sh @echo "LDNAME=\"$(LDNAME)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "LDDIR=\"$(LDDIR)\"" >> $(EXPORTDIR)/makeinfo.sh @echo "LDDIR=\"$(LDDIR)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "LDPATH=\"$(LDPATH)\"" >> $(EXPORTDIR)/makeinfo.sh @echo "LDPATH=\"$(LDPATH)\"" >> $(EXPORTDIR)/makeinfo.sh
endif
@echo "ARCHCFLAGS=\"$(ARCHCFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh @echo "ARCHCFLAGS=\"$(ARCHCFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
@echo "ARCHCXXFLAGS=\"$(ARCHCXXFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh @echo "ARCHCXXFLAGS=\"$(ARCHCXXFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
@chmod 755 $(EXPORTDIR)/makeinfo.sh @chmod 755 $(EXPORTDIR)/makeinfo.sh
+35 -11
View File
@@ -41,9 +41,10 @@
# Get the input parameter list # Get the input parameter list
USAGE="USAGE: $0 [-d] -t <top-dir> [-x <lib-ext>] -l \"lib1 [lib2 [lib3 ...]]\"" USAGE="USAGE: $0 [-d] [-z] -t <top-dir> [-x <lib-ext>] -l \"lib1 [lib2 [lib3 ...]]\""
unset TOPDIR unset TOPDIR
unset LIBLIST unset LIBLIST
unset TGZ
LIBEXT=.a LIBEXT=.a
while [ ! -z "$1" ]; do while [ ! -z "$1" ]; do
@@ -63,6 +64,9 @@ while [ ! -z "$1" ]; do
shift shift
LIBEXT=$1 LIBEXT=$1
;; ;;
-z )
TGZ=y
;;
-h ) -h )
echo $USAGE echo $USAGE
exit 0 exit 0
@@ -113,9 +117,14 @@ if [ -d "${EXPORTDIR}" ]; then
rm -rf "${EXPORTDIR}" rm -rf "${EXPORTDIR}"
fi fi
# Remove any possible previous results
rm -f "${EXPORTDIR}.tar" rm -f "${EXPORTDIR}.tar"
rm -f "${EXPORTDIR}.zip"
rm -f "${EXPORTDIR}.tar.gz" rm -f "${EXPORTDIR}.tar.gz"
# Create the export directory and some of its subdirectories
mkdir "${EXPORTDIR}" || { echo "MK: 'mkdir ${EXPORTDIR}' failed"; exit 1; } mkdir "${EXPORTDIR}" || { echo "MK: 'mkdir ${EXPORTDIR}' failed"; exit 1; }
mkdir "${EXPORTDIR}/startup" || { echo "MK: 'mkdir ${EXPORTDIR}/startup' failed"; exit 1; } mkdir "${EXPORTDIR}/startup" || { echo "MK: 'mkdir ${EXPORTDIR}/startup' failed"; exit 1; }
mkdir "${EXPORTDIR}/libs" || { echo "MK: 'mkdir ${EXPORTDIR}/libs' failed"; exit 1; } mkdir "${EXPORTDIR}/libs" || { echo "MK: 'mkdir ${EXPORTDIR}/libs' failed"; exit 1; }
@@ -139,22 +148,32 @@ source "${EXPORTDIR}/makeinfo.sh"
rm -f "${EXPORTDIR}/makeinfo.sh" rm -f "${EXPORTDIR}/makeinfo.sh"
rm -f "${EXPORTDIR}/Make.defs" rm -f "${EXPORTDIR}/Make.defs"
# Verifty the build info that we got from makeinfo.sh # Verify the build info that we got from makeinfo.sh
if [ ! -d "${ARCHDIR}" ]; then if [ ! -d "${ARCHDIR}" ]; then
echo "MK: Directory ${ARCHDIR} does not exist" echo "MK: Directory ${ARCHDIR} does not exist"
exit 1 exit 1
fi fi
if [ ! -f "${LDPATH}" ]; then # Is there a linker script in this configuration?
echo "MK: File ${LDPATH} does not exist"
exit 1 if [ ! -z "${LDPATH}" ]; then
# Apparently so. Verify that the script exists
if [ ! -f "${LDPATH}" ]; then
echo "MK: File ${LDPATH} does not exist"
exit 1
fi
# Copy the linker script
cp --preserve=all "${LDPATH}" "${EXPORTDIR}/build/." || \
{ echo "MK: cp ${LDPATH} failed"; exit 1; }
fi fi
# Copy the build info that we got from makeinfo.sh # Save the compilation options
cp --preserve=all "${LDPATH}" "${EXPORTDIR}/build/." || \
{ echo "MK: cp ${LDPATH} failed"; exit 1; }
echo "ARCHCFLAGS = ${ARCHCFLAGS}" >"${EXPORTDIR}/build/Make.defs" echo "ARCHCFLAGS = ${ARCHCFLAGS}" >"${EXPORTDIR}/build/Make.defs"
echo "ARCHCXXFLAGS = ${ARCHCXXFLAGS}" >>"${EXPORTDIR}/build/Make.defs" echo "ARCHCXXFLAGS = ${ARCHCXXFLAGS}" >>"${EXPORTDIR}/build/Make.defs"
@@ -221,9 +240,14 @@ done
cd "${TOPDIR}" || \ cd "${TOPDIR}" || \
{ echo "MK: 'cd ${TOPDIR}' failed"; exit 1; } { echo "MK: 'cd ${TOPDIR}' failed"; exit 1; }
tar cvf "${EXPORTSUBDIR}.tar" "${EXPORTSUBDIR}" 1>/dev/null 2>&1
gzip -f "${EXPORTSUBDIR}.tar" if [ "X${TGZ}" = "Xy" ]; then
tar cvf "${EXPORTSUBDIR}.tar" "${EXPORTSUBDIR}" 1>/dev/null 2>&1
gzip -f "${EXPORTSUBDIR}.tar"
else
zip -r "${EXPORTSUBDIR}.zip" "${EXPORTSUBDIR}" 1>/dev/null 2>&1
fi
# Clean up after ourselves # Clean up after ourselves
rm -rf "${EXPORTSUBDIR}" rm -rf "${EXPORTSUBDIR}"