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

Optimize Makefile for pvsneslib #187

Merged
merged 1 commit into from Apr 9, 2023

Conversation

kobenairb
Copy link
Contributor

Hi all,

In the same way, a small optimization for the Makefile used by pvsneslib/.

The changes are:

The export statements can be moved inside the variable definition, and we don't need to export TOPDIR since it's not used outside this Makefile.

The @echo command in the docs target can be made into a single line to avoid unnecessary output.

The if statement in the docs target can be simplified by using @[ -f warn.log ] && cat warn.log to output the warn.log file.

This version uses "$(MAKE)" instead of "make" to ensure that the make command is correctly overridden if the user specifies a different make command.

It also uses "@rm" instead of "rm" and "@mkdir" instead of "mkdir" to suppress command echoing, and removes unnecessary semicolons at the end of some commands.

The mkdir command will fail if the lib directory already exists, which can be the case if the Makefile is run multiple times. To avoid this issue, the -p option is used with the mkdir command to create the directory only if it does not exist.

@RetroAntho RetroAntho merged commit 3e4de03 into alekmaul:develop Apr 9, 2023
@RetroAntho
Copy link
Collaborator

Thanks !

@kobenairb kobenairb deleted the makefile_pvsneslib branch April 10, 2023 03:08
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.

None yet

2 participants