mirror of
https://git.planet-casio.com/Lephenixnoir/GiteaPC.git
synced 2025-04-04 09:37:13 +02:00
build: remember configuration after building
This commit is contained in:
parent
370e01bff1
commit
0ecfed4351
4 changed files with 12 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
__pycache__
|
||||
giteapc-config.make
|
||||
giteapc-config-*.make
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# giteapc: version=1
|
||||
|
||||
ifneq ($(GITEAPC_CONFIG),)
|
||||
include giteapc-config-$(GITEAPC_CONFIG).make
|
||||
endif
|
||||
-include giteapc-config.make
|
||||
|
||||
configure:
|
||||
@ true
|
||||
|
|
|
@ -286,7 +286,8 @@ def build(*args, install=False, skip_configure=False):
|
|||
|
||||
env = os.environ.copy()
|
||||
if s.config:
|
||||
env["GITEAPC_CONFIG"] = config
|
||||
env["GITEAPC_CONFIG"] = s.config
|
||||
r.set_config(s.config)
|
||||
env["GITEAPC_PREFIX"] = PREFIX_FOLDER
|
||||
|
||||
if not skip_configure:
|
||||
|
|
|
@ -141,6 +141,14 @@ class LocalRepo:
|
|||
with ChangeDirectory(self.folder):
|
||||
return run(["make", "-f", "giteapc.make", target], env=env)
|
||||
|
||||
def set_config(self, config):
|
||||
source = self.folder + f"/giteapc-config.make"
|
||||
target = self.folder + f"/giteapc-config-{config}.make"
|
||||
|
||||
if os.path.exists(source):
|
||||
os.remove(source)
|
||||
os.symlink(target, source)
|
||||
|
||||
# Metadata
|
||||
|
||||
def metadata(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue