Skip to content

Commit

Permalink
Rename pret targets to rom targets. (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
vulcandth authored Apr 15, 2022
1 parent fe0b9f1 commit 7a2c617
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ cia: ${cias}
# Ok to depend on the directories, as this target is phony thus never up to date anyway
extract: $(addsuffix /,${rom_dirs})

# Calls for the pret repo to check for updates, then checks if the .cias need to be updated
.PHONY: pretupdate
pretupdate:
# Calls for the rom's repo to check for updates, then checks if the .cias need to be updated
.PHONY: repoupdate
repoupdate:
$(MAKE) -C ${repo_path} $(rom_targets)

# Tides up poke-cia
Expand All @@ -58,14 +58,14 @@ tidy:
clean: tidy
rm -rf ${rom_dirs}

# Tidies up the pret repo and the poke-cia repo.
.PHONY: prettidy
prettidy: tidy
# Tidies up the rom's repo and the poke-cia repo.
.PHONY: repotidy
repotidy: tidy
$(MAKE) -C ${repo_path} tidy

# Cleans the pret repo and the poke-cia repo.
.PHONY: pretclean
pretclean: clean
# Cleans the rom's repo and the poke-cia repo.
.PHONY: repoclean
repoclean: clean
$(MAKE) -C ${repo_path} clean


Expand Down Expand Up @@ -102,14 +102,14 @@ pretclean: clean
# 2. In the `eval` function.

define copy_patch_rule
$(1)/romfs/$(1).patch: $(1)/ pretupdate
$(1)/romfs/$(1).patch: $(1)/ repoupdate
mkdir -p $${@D}
cp -T $${repo_path}/$(1).patch $$@
endef
$(foreach rom,${rom_names},$(eval $(call copy_patch_rule,${rom})))

define copy_rom_rule
$(1)/romfs/rom/$(1): $(1)/ pretupdate
$(1)/romfs/rom/$(1): $(1)/ repoupdate
mkdir -p $${@D}
cp -T $${repo_path}/$(1).gbc $$@
endef
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Modify this new `config.mk` file using a text editor of your choice.
rom_names := magenta turquoise
```

- Still in that same file, you must also set the `repo_path` variable to point to the repository containing the ROMs: (The default `repo_path` setting assumes you are cloning into the pret repo)
- Still in that same file, you must also set the `repo_path` variable to point to the repository containing the ROMs: (The default `repo_path` setting assumes you are cloning into the rom's repo)

```makefile
repo_path := ../
Expand Down Expand Up @@ -87,11 +87,11 @@ The following is a list of notable poke-cia commands:

`make tidy`: Removes any built `.cia`, `.cxi`, or `cfa` files in the poke-cia repo.

`make prettidy`: Performs the same function as `make tidy` above, but also asks the pret repo to run it's version of `make tidy`.
`make repotidy`: Performs the same function as `make tidy` above, but also asks the rom's repo to run it's version of `make tidy`.

`make clean`: Performs the same function as `make tidy`, but also deletes the extracted rom directories in the poke-cia repo.

`make pretclean`: Performs the same function as `make clean` above, but also asks the pret repo to run it's own version of `make clean`.
`make repoclean`: Performs the same function as `make clean` above, but also asks the rom's repo to run it's own version of `make clean`.

## Special Credits

Expand Down

0 comments on commit 7a2c617

Please sign in to comment.