Skip to content

Commit 83e0a94

Browse files
committed
README: add tip about rebuilding index
1 parent 9542428 commit 83e0a94

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ else
3434
target_libc=.
3535
endif
3636

37-
INDEX = cores/$(target_libc)/latest/.index-extended
37+
CORES_TARGET_DIR ?= cores/$(target_libc)/latest
38+
INDEX ?= $(CORES_TARGET_DIR)/.index-extended
3839

3940
print_info = printf "\033[34m $1\033[0m\n"
4041
print_error = printf "\033[31m $1\033[0m\n"
4142

4243
default: build
43-
@mkdir -p cores/$(target_libc)/latest
44+
@mkdir -p $(CORES_TARGET_DIR)
4445

4546
patch-super:
4647
@if ! test -f $(BUILD_SUPER_DIR)/libretro-build.sh; then \
@@ -105,15 +106,15 @@ index:
105106

106107
index-rebuild:
107108
@echo "Rebuilding \"cores_list\" in ./$(INDEX)"
108-
@cd cores/$(target_libc)/latest; \
109+
@cd $(CORES_TARGET_DIR); \
109110
rm -f $(WORKDIR)/$(INDEX); \
110111
for f in *; do \
111112
[ -f "$$f" ] && \
112113
echo "$$(stat -c '%y' $$f | cut -f 1 -d ' ') $$(crc32 $$f) $$f" | tee -a $(WORKDIR)/$(INDEX); \
113114
done
114115

115116
release: dist-zip index
116-
mv ./dist/$(PLATFORM)/* cores/$(target_libc)/latest/
117+
mv ./dist/$(PLATFORM)/* $(CORES_TARGET_DIR)/
117118

118119
help:
119120
@echo " make fetch|build|dist-zip|index|index-rebuild"

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,13 @@ NOTES:
2727
```
2828
make release
2929
```
30+
31+
## INDEX:
32+
33+
- to manually rebuild .index file from host run:
34+
```
35+
make CORES_TARGET_DIR=<dirpath> INDEX=<filepath> index-rebuild
36+
```
37+
NOTES:
38+
- this method is ill-advised, since git fetching files by host's different UTC locale setup can change date stat(1)
39+
- using docker container can also ovewrite host's current date(1)

0 commit comments

Comments
 (0)