aboutsummaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-02-01 22:07:58 +0100
committerRon Yorston <rmy@pobox.com>2017-07-14 15:14:30 +0100
commitc56f1e06c4c470a023b02c7019112eb852f08d44 (patch)
tree96139e253d0ce2e2fb95bdd42af7b31f737fe393 /scripts/basic/split-include.c
parentb41c851312876dbf146fb674265b86c72ed611ab (diff)
downloadbusybox-w32-c56f1e06c4c470a023b02c7019112eb852f08d44.tar.gz
busybox-w32-c56f1e06c4c470a023b02c7019112eb852f08d44.tar.bz2
busybox-w32-c56f1e06c4c470a023b02c7019112eb852f08d44.zip
kbuild: support at least non-interactive mode on Windows
without POSIX, kbuild has some trouble compiling its support executables. Luckily, the parts that really lean on POSIX functionality are pretty much all only needed when configuring the build interactively. When compiling BusyBox for Win32, we do not actually need interactive configuration at all: we simply choose the default. Therefore, a lot of the stuff that is typically built for the Kconfig system is totally unnecessary (such as: compiling documentation via fork()&exec(), changing the window size, etc). Liberally put all of the problematic code behind #ifndef __MINGW32__ guards, just to get `make mingw64_defconfig` going in Git for Windows' SDK (which is a special-purpose version of MSYS2). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'scripts/basic/split-include.c')
-rw-r--r--scripts/basic/split-include.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c
index e328788e2..8127fe261 100644
--- a/scripts/basic/split-include.c
+++ b/scripts/basic/split-include.c
@@ -39,8 +39,6 @@
39 exit(1); \ 39 exit(1); \
40 } 40 }
41 41
42
43
44int main(int argc, const char * argv []) 42int main(int argc, const char * argv [])
45{ 43{
46 const char * str_my_name; 44 const char * str_my_name;
@@ -89,7 +87,11 @@ int main(int argc, const char * argv [])
89 /* Make output directory if needed. */ 87 /* Make output directory if needed. */
90 if (stat(str_dir_config, &stat_buf) != 0) 88 if (stat(str_dir_config, &stat_buf) != 0)
91 { 89 {
90#ifdef __MINGW32__
91 if (mkdir(str_dir_config) != 0)
92#else
92 if (mkdir(str_dir_config, 0755) != 0) 93 if (mkdir(str_dir_config, 0755) != 0)
94#endif
93 ERROR_EXIT(str_dir_config); 95 ERROR_EXIT(str_dir_config);
94 } 96 }
95 97
@@ -148,7 +150,12 @@ int main(int argc, const char * argv [])
148 { 150 {
149 ptarget[islash] = '\0'; 151 ptarget[islash] = '\0';
150 if (stat(ptarget, &stat_buf) != 0 152 if (stat(ptarget, &stat_buf) != 0
151 && mkdir(ptarget, 0755) != 0) 153#ifdef __MINGW32__
154 && mkdir(ptarget) != 0
155#else
156 && mkdir(ptarget, 0755) != 0
157#endif
158 )
152 ERROR_EXIT( ptarget ); 159 ERROR_EXIT( ptarget );
153 ptarget[islash] = '/'; 160 ptarget[islash] = '/';
154 } 161 }