summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorYuta Saito <kateinoigakukun@gmail.com>2022-03-01 05:23:44 +0000
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-03-02 09:40:58 +0900
commit32ad8df9d1e07e1b2435a8890d070802fcd2989f (patch)
treeb9893a107ad6d2d86e8610a50dc82fafbd1e1736 /dir.c
parentf7491e89b9daacbdbfb716d585e9c325ab6d3f45 (diff)
downloadruby-32ad8df9d1e07e1b2435a8890d070802fcd2989f.tar.gz
enc/depend: fix out-of-src build with --with-static-linked-ext
When out-of-src build, at the beginning of a build, `make -f enc.mk srcs` generates trans C sources under build dir. On the other hand, enc/trans/*.o were built from trans C sources generated under srcdir due to the following auto-generated rules from enc/depend. ``` encsrcdir = ../src/enc ... enc/trans/big5.$(OBJEXT): $(encsrcdir)/trans/big5.c ``` Therefore, trans C sources are generated twice under srcdir and build dir during a build. Ideally, trans C sources have always been built before compilation of enc/trans/*.o because the source generation is prereq, so making enc/trans/*.o doesn't trigger trans C source generation and shouldn't require MINIRUBY as a make arg for enc.mk. However, the second trans C source gen is unintentionally triggered by enc/trans/*.o, so `make -f enc.mk libencs` requires MINIRUBY for now. When no `--with-static-linked-ext`, `make -f enc.mk libencs` is triggered from common.mk with MINIRUBY, so there is no problem. But when `--with-static-linked-ext`, libencs should be statically-linked to ruby, so `make -f enc.mk libencs` is triggered from exts.mk, and exts.mk invokes it without MINIRUBY. Therefore, when out-of-src build and with `--with-static-linked-ext`, the second trans C source gen fails due to missing MINIRUBY. This issue is deterministically reproducible without -j because common.mk's `main` rule also has libencs prerequisite. This patch supresses the second trans C source gen.
Diffstat (limited to 'dir.c')
0 files changed, 0 insertions, 0 deletions