Skip to content

Add ntime_max.inc dependency to Makefile#76

Open
sahiljhawar wants to merge 2 commits into
PRBEM:mainfrom
sahiljhawar:fix-ntime-max
Open

Add ntime_max.inc dependency to Makefile#76
sahiljhawar wants to merge 2 commits into
PRBEM:mainfrom
sahiljhawar:fix-ntime-max

Conversation

@sahiljhawar
Copy link
Copy Markdown

closes #75
This pull request updates the Makefile to introduce a configurable maximum value for NTIME_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:

  • Added a new IRBEM_NTIME_MAX variable (defaulting to 100000) to allow overriding the maximum value for NTIME_MAX via the build environment.
  • Added a rule to generate a new ntime_max.inc include file, which defines the NTIME_MAX parameter using the value from IRBEM_NTIME_MAX. This file is now a required dependency for building onera_desp_lib.o. [1] [2]

Build process updates:

  • Updated the .PHONY targets and object dependencies to include the new ntime_max.inc file, 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.

  • Pull request has descriptive title
  • Pull request gives overview of changes
  • New code has inline comments where necessary
  • Appropriate documentation has been written
  • Relevant issues are linked to (e.g. See issue # or Closes #)

Copilot AI review requested due to automatic review settings May 20, 2026 22:34
@sahiljhawar
Copy link
Copy Markdown
Author

@AntoineBrunet @mshumko FYI

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (default 100000) as a configurable Makefile variable.
  • Added a Makefile rule to generate source/ntime_max.inc defining NTIME_MAX.
  • Updated onera_desp_lib.o to depend on ntime_max.inc and added the include file targets to .PHONY.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile
@@ -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 thread Makefile Outdated
Comment thread Makefile
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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread Makefile
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 thread Makefile
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 thread Makefile
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" >> $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IRBEM_NTIME_MAX is useless

2 participants