OSDN Git Service

Set errno to EROFS on failure to open the device in RW mode.
[android-x86/external-exfat.git] / SConstruct
index f11b803..dc31c21 100644 (file)
@@ -2,11 +2,12 @@
 #      SConstruct (10.09.09)
 #      SConscript for all components.
 #
-#      Copyright (C) 2010-2012  Andrew Nayenko
+#      Free exFAT implementation.
+#      Copyright (C) 2010-2013  Andrew Nayenko
 #
-#      This program is free software: you can redistribute it and/or modify
+#      This program is free software; you can redistribute it and/or modify
 #      it under the terms of the GNU General Public License as published by
-#      the Free Software Foundation, either version 3 of the License, or
+#      the Free Software Foundation, either version 2 of the License, or
 #      (at your option) any later version.
 #
 #      This program is distributed in the hope that it will be useful,
@@ -14,8 +15,9 @@
 #      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 #      GNU General Public License for more details.
 #
-#      You should have received a copy of the GNU General Public License
-#      along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#      You should have received a copy of the GNU General Public License along
+#      with this program; if not, write to the Free Software Foundation, Inc.,
+#      51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
 import os
@@ -23,10 +25,11 @@ import platform
 import SCons
 
 env = Environment(**ARGUMENTS)
-env['ENV']['PATH'] = os.environ['PATH']
+for var in ['PATH', 'SYSROOT']:
+       if var in os.environ:
+               env['ENV'][var] = os.environ[var]
 
 destdir = env.get('DESTDIR', '/sbin');
-targets = []
 libs = ['exfat']
 libfuse = 'fuse'
 
@@ -121,7 +124,6 @@ def program(pattern, output, alias, libs):
                                destdir + '/' + alias)
        else:
                Alias('install', Install(destdir, target))
-       targets.append(target)
 
 env.Library('libexfat/exfat', Glob('libexfat/*.c'))
 
@@ -130,5 +132,3 @@ program('dump/*.c', 'dump/dumpexfat', None, libs)
 program('fsck/*.c', 'fsck/exfatfsck', 'fsck.exfat', libs)
 program('mkfs/*.c', 'mkfs/mkexfatfs', 'mkfs.exfat', libs)
 program('label/*.c', 'label/exfatlabel', None, libs)
-
-Default(targets)