Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DIR_O in nppSpecifics.mak properly #15086

Closed
ArkadiuszMichalski opened this issue May 5, 2024 · 0 comments
Closed

Use DIR_O in nppSpecifics.mak properly #15086

ArkadiuszMichalski opened this issue May 5, 2024 · 0 comments

Comments

@ArkadiuszMichalski
Copy link
Contributor

ArkadiuszMichalski commented May 5, 2024

In nppSpecifics.mak file we use DIR_O variable in condition but in the compile command we don't do this:

$(DIR_O)\UTF8DocumentIterator.obj:: ../../boostregex/UTF8DocumentIterator.cxx
	$(CC) $(CXXFLAGS) -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -c ../../boostregex/UTF8DocumentIterator.cxx	

This causes that when the DIR_O variable is set, this rule does not work properly, the rule try checks the resulting file in a different folder (DIR_O) than it is generated (current folder). No one noticed this because in the case of CMAKE job we do not set DIR_O (unlike MSYS2 job and its makefile, where everything works fine). This happened to me by accident (ref) and it would be good to correct it.

We just have to change:

$(DIR_O)\UTF8DocumentIterator.obj:: ../../boostregex/UTF8DocumentIterator.cxx
	$(CC) $(CXXFLAGS) -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -c ../../boostregex/UTF8DocumentIterator.cxx	
	
$(DIR_O)\BoostRegexSearch.obj:: ../../boostregex/BoostRegexSearch.cxx ../src/CharClassify.h ../src/RESearch.h	
	$(CC) $(CXXFLAGS) -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -c ../../boostregex/BoostRegexSearch.cxx

for example to:

$(DIR_O)\UTF8DocumentIterator.obj:: ../../boostregex/UTF8DocumentIterator.cxx
	$(CC) $(CXXFLAGS) -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -c -Fo$@ %s
	
$(DIR_O)\BoostRegexSearch.obj:: ../../boostregex/BoostRegexSearch.cxx ../src/CharClassify.h ../src/RESearch.h	
	$(CC) $(CXXFLAGS) -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -c -Fo$@ %s

The symbol %s maps to the first dependency in the list.

Edit: One more thing, we use the CC variable here, where everywhere else it's CXX, maybe it's worth changing it to CXX too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant