Add ntime_max.inc dependency to Makefile#76
Open
sahiljhawar wants to merge 2 commits into
Open
Conversation
Author
There was a problem hiding this comment.
Pull request overview
This PR updates the build to make NTIME_MAX configurable via a new IRBEM_NTIME_MAX Makefile variable, by generating an include file (source/ntime_max.inc) during the build and wiring it into the compilation dependencies.
Changes:
- Added
IRBEM_NTIME_MAX(default100000) as a configurable Makefile variable. - Added a Makefile rule to generate
source/ntime_max.incdefiningNTIME_MAX. - Updated
onera_desp_lib.oto depend onntime_max.incand added the include file targets to.PHONY.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -96,7 +102,7 @@ C99_SOURCES = $(wildcard $(SRC_DIR)/*.c) | |||
| F77_OBJS = $(patsubst $(SRC_DIR)/%.f,$(BIN_DIR)/%.o,$(F77_SOURCES)) | |||
| C99_OBJS = $(patsubst $(SRC_DIR)/%.c,$(BIN_DIR)/%.o,$(C99_SOURCES)) | |||
|
|
|||
Comment on lines
+36
to
+37
| @echo " INTEGER*4 NTIME_MAX ! generated by Make File" > $@ | ||
| @echo " PARAMETER (NTIME_MAX = $(IRBEM_NTIME_MAX) ) ! Generated by Make File" >> $@ |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines
+105
to
107
| $(BIN_DIR)/onera_desp_lib.o : $(SRC_DIR)/fortran_version.inc $(SRC_DIR)/fortran_release.inc $(SRC_DIR)/ntime_max.inc | ||
|
|
||
| $(BIN_DIR)/%.o : $(SRC_DIR)/%.f |
Comment on lines
+34
to
+38
| $(SRC_DIR)/ntime_max.inc: | ||
| @echo "Creating $@ with NTIME_MAX=$(IRBEM_NTIME_MAX). Set IRBEM_NTIME_MAX to override." | ||
| @echo " INTEGER*4 NTIME_MAX ! generated by Make File" > $@ | ||
| @echo " PARAMETER (NTIME_MAX = $(IRBEM_NTIME_MAX) ) ! Generated by Make File" >> $@ | ||
|
|
Comment on lines
+36
to
+37
| @echo " INTEGER*4 NTIME_MAX ! generated by Make File" > $@ | ||
| @echo " PARAMETER (NTIME_MAX = $(IRBEM_NTIME_MAX) ) ! Generated by Make File" >> $@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #75
This pull request updates the
Makefileto introduce a configurable maximum value forNTIME_MAX, improving flexibility and maintainability. The changes ensure that a new include file is generated with the specified maximum, and that the build process consistently uses this value.Configuration improvements:
IRBEM_NTIME_MAXvariable (defaulting to 100000) to allow overriding the maximum value forNTIME_MAXvia the build environment.ntime_max.incinclude file, which defines theNTIME_MAXparameter using the value fromIRBEM_NTIME_MAX. This file is now a required dependency for buildingonera_desp_lib.o. [1] [2]Build process updates:
.PHONYtargets and object dependencies to include the newntime_max.incfile, ensuring it is always generated and up-to-date during builds. [1] [2]Pull Request Checklist
New code is easier to review, integrate and maintain if it's
clear, commented, and consistent with the style of the rest
of the IRBEM code.
Please try to follow as much of this checklist as you can for
your PR. If you can't hit everything, or don't know how to,
then submit the PR and the rest can be discussed during review.
Some additional suggestions are given below.
Please also see our Code of Conduct so that the PRBEM community
remains welcoming and inclusive.
Go ahead and replace the text above (and this line!) with your
pull request description.
See issue #orCloses #)