mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
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:
@@ -44,6 +44,36 @@ License for NuttX in general (authorship of individual files may vary):
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
FAT Long File Names
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
NOTE: If CONFIG_FAT_LFN is defined in your NuttX configuration file, then
|
||||
there may be some legal, patent issues. The following was extracted from
|
||||
the entry "File Allocation Table from Wikipedia, the free encyclopedia:
|
||||
|
||||
"On December 3, 2003 Microsoft announced it would be offering licenses
|
||||
for use of its FAT specification and 'associated intellectual property',
|
||||
at the cost of a US$0.25 royalty per unit sold, with a $250,000 maximum
|
||||
royalty per license agreement.
|
||||
|
||||
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
|
||||
different file name formats. ...
|
||||
o "U.S. Patent 5,579,517 (http://www.google.com/patents?vid=5579517) -
|
||||
Common name space for long and short filenames. ...
|
||||
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) -
|
||||
Method and system for providing a common name space for long and
|
||||
short file names in an operating system. ...
|
||||
|
||||
"Many technical commentators have concluded that these patents only cover
|
||||
FAT implementations that include support for long filenames, and that
|
||||
removable solid state media and consumer devices only using short names
|
||||
would be unaffected. ..."
|
||||
|
||||
So you have been forewarned: Use the long filename at your own risk!
|
||||
|
||||
uIP
|
||||
^^^
|
||||
|
||||
@@ -126,4 +156,3 @@ Documents/rss.gif
|
||||
* 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.
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ LDPATHS = $(addprefix -L$(TOPDIR)/,$(dir $(LINKLIBS)))
|
||||
LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
|
||||
|
||||
all: up_head$(OBJEXT) libarch$(LIBEXT)
|
||||
.PHONY: clean distclean cleanrel depend
|
||||
.PHONY: export_head clean distclean cleanrel depend
|
||||
|
||||
$(AOBJS): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
@@ -36,9 +36,11 @@
|
||||
include $(TOPDIR)/.config
|
||||
include $(EXPORTDIR)/Make.defs
|
||||
|
||||
ifdef ARCHSCRIPT
|
||||
LDPATH = ${shell echo "$(ARCHSCRIPT)" | sed -e "s/^-T[ ]*//g"}
|
||||
LDNAME = ${shell basename ${LDPATH}}
|
||||
LDDIR = ${shell dirname ${LDPATH}}
|
||||
endif
|
||||
ARCHSUBDIR = "arch/$(CONFIG_ARCH)/src"
|
||||
ARCHDIR ="$(TOPDIR)/$(ARCHSUBDIR)"
|
||||
|
||||
@@ -51,9 +53,11 @@ $(EXPORTDIR)/makeinfo.sh: $(TOPDIR)/.config $(EXPORTDIR)/Make.defs
|
||||
@echo "" >> $(EXPORTDIR)/makeinfo.sh
|
||||
@echo "ARCHSUBDIR=\"$(ARCHSUBDIR)\"" >> $(EXPORTDIR)/makeinfo.sh
|
||||
@echo "ARCHDIR=\"$(ARCHDIR)\"" >> $(EXPORTDIR)/makeinfo.sh
|
||||
ifdef ARCHSCRIPT
|
||||
@echo "LDNAME=\"$(LDNAME)\"" >> $(EXPORTDIR)/makeinfo.sh
|
||||
@echo "LDDIR=\"$(LDDIR)\"" >> $(EXPORTDIR)/makeinfo.sh
|
||||
@echo "LDPATH=\"$(LDPATH)\"" >> $(EXPORTDIR)/makeinfo.sh
|
||||
endif
|
||||
@echo "ARCHCFLAGS=\"$(ARCHCFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
|
||||
@echo "ARCHCXXFLAGS=\"$(ARCHCXXFLAGS) $(ARCHCPUFLAGS)\"" >> $(EXPORTDIR)/makeinfo.sh
|
||||
@chmod 755 $(EXPORTDIR)/makeinfo.sh
|
||||
|
||||
+34
-10
@@ -41,9 +41,10 @@
|
||||
|
||||
# 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 LIBLIST
|
||||
unset TGZ
|
||||
LIBEXT=.a
|
||||
|
||||
while [ ! -z "$1" ]; do
|
||||
@@ -63,6 +64,9 @@ while [ ! -z "$1" ]; do
|
||||
shift
|
||||
LIBEXT=$1
|
||||
;;
|
||||
-z )
|
||||
TGZ=y
|
||||
;;
|
||||
-h )
|
||||
echo $USAGE
|
||||
exit 0
|
||||
@@ -113,9 +117,14 @@ if [ -d "${EXPORTDIR}" ]; then
|
||||
rm -rf "${EXPORTDIR}"
|
||||
fi
|
||||
|
||||
# Remove any possible previous results
|
||||
|
||||
rm -f "${EXPORTDIR}.tar"
|
||||
rm -f "${EXPORTDIR}.zip"
|
||||
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}/startup" || { echo "MK: 'mkdir ${EXPORTDIR}/startup' 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}/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
|
||||
echo "MK: Directory ${ARCHDIR} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "${LDPATH}" ]; then
|
||||
echo "MK: File ${LDPATH} does not exist"
|
||||
exit 1
|
||||
# Is there a linker script in this configuration?
|
||||
|
||||
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
|
||||
|
||||
# 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 "ARCHCXXFLAGS = ${ARCHCXXFLAGS}" >>"${EXPORTDIR}/build/Make.defs"
|
||||
|
||||
@@ -221,8 +240,13 @@ done
|
||||
|
||||
cd "${TOPDIR}" || \
|
||||
{ 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user