#8744 closed patch
Make: reconfigure on configure change (saving environment)
Reported by: | jvprat | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | --Other-- |
Version: | Keywords: | ||
Cc: | Game: |
Description
This is an updated and (hopefully) complete version of patch #1550165 saving all the environment variables documented on the configure help. I'll revive a question from the original tracker item: should make fail if config.mk is missing? (just reconfiguring if it was properly configured before)
Ticket imported from: #1826459. Ticket imported from: patches/849.
Attachments (3)
Change History (12)
by , 17 years ago
Attachment: | reconfigure.patch added |
---|
by , 17 years ago
Attachment: | reconfigure2.patch added |
---|
comment:1 by , 17 years ago
comment:2 by , 17 years ago
I prefer the 2nd patch, i.e. that "make" fails with an error if config.mk is missing.
One small caveat, though: This patch will produce incorrect results if the user has never run the "new" configure. In particular, in that case SAVE_CONFIGFLAGS won't be set. So, instead of checking for BACKENDS in Makefile, I'd check for SAVE_CONFIGFLAGS. That seems to be more logical anyway. Or is there a specific reasons you check for BACKENDS?
comment:3 by , 17 years ago
My first approach was to check for SAVE_CONFIGFLAGS, but ifndef interprets it's undefined if it's empty, so if you called configure with no parameters it acted like you had no config.mk. I chose BACKEND because it always has a value, you can't assure any of the environment variables will be always set. Should we add a new always-set variable just for this? (SAVED_ENV=1?)
comment:4 by , 17 years ago
Owner: | set to |
---|
comment:5 by , 17 years ago
Hmmm, I see. So, maybe we should do it that way, i.e. added a SAVED_ENV:=1 or so. Or maybe call it CONFIG_MAK_IS_PRESENT :-)
Also, shouldn't we rename SAVE_CONFIGFLAGS to SAVED_CONFIGFLAGS?
Finally: Eugene, anything else to remark before we commit this? :)
by , 17 years ago
Attachment: | reconfigure3.patch added |
---|
comment:6 by , 17 years ago
I'm attaching an updated patch with the changes you proposed. File Added: reconfigure3.patch
comment:8 by , 17 years ago
Owner: | changed from | to
---|---|
Status: | new → closed |
comment:9 by , 6 years ago
Component: | → --Other-- |
---|
I'm attaching an updated version of the patch that fails when config.mk is missing and it just reconfigures when it was previously configured. File Added: reconfigure2.patch