git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
migrate stock user space build to new build system
[lunaix-os.git]
/
lunaix-os
/
scripts
/
build-tools
/
luna_build.py
diff --git
a/lunaix-os/scripts/build-tools/luna_build.py
b/lunaix-os/scripts/build-tools/luna_build.py
index aafdb0ae73cc3ade0100bc6b82460620238f1d5c..0f96e3e4dfd5901e99bf01e5a0d66b353140aff2 100755
(executable)
--- a/
lunaix-os/scripts/build-tools/luna_build.py
+++ b/
lunaix-os/scripts/build-tools/luna_build.py
@@
-12,7
+12,7
@@
from shared.export import ExportJsonFile
from shared.export import ExportHeaderFile
from shared.export import ExportMakefileRules
from shared.export import restore_config_value
from shared.export import ExportHeaderFile
from shared.export import ExportMakefileRules
from shared.export import restore_config_value
-from shared.scopes import ConfigScope
+from shared.scopes import ConfigScope
, EnvScope
from shared.build_gen import BuildScriptGenerator
from shared.shconfig import shconfig
from shared.build_gen import BuildScriptGenerator
from shared.shconfig import shconfig
@@
-35,6
+35,8
@@
class LunaBuild:
scope.subscope("ld")
self.__lbuilder.register_scope(scope)
scope.subscope("ld")
self.__lbuilder.register_scope(scope)
+ self.__lbuilder.register_scope(EnvScope())
+
self.__json = ExportJsonFile(self.__lconfig)
self.__make = ExportMakefileRules(self.__lconfig)
self.__headr = ExportHeaderFile(self.__lconfig)
self.__json = ExportJsonFile(self.__lconfig)
self.__make = ExportMakefileRules(self.__lconfig)
self.__headr = ExportHeaderFile(self.__lconfig)
@@
-76,6
+78,13
@@
class LunaBuild:
self.__headr.export(outdir / "config.h")
def visual_config(self):
self.__headr.export(outdir / "config.h")
def visual_config(self):
+ if not self.__lconfig.loaded():
+ print("no config file loaded, skipped interactive config")
+ return
+
+ if not self.__opt.gen_config:
+ return
+
if not shconfig(self.__lconfig):
print("configuration process aborted")
exit(1)
if not shconfig(self.__lconfig):
print("configuration process aborted")
exit(1)