Source: cmigemo Version: 1:1.2+gh0.20220623-1 Tags: patch upstream User: debian-cr...@lists.debian.org Usertags: ftcbfs
cmigemo fails to cross build from source. It actually completes dh_auto_build successfully. Then as dh_auto_build runs, it considers the "dirs" target out of date and recompiles stuff as a result. Since dh_auto_install does not pass cross toolchains that unnecessary compilation step fails. The use of the dirs target has two problems. For one thing, dirs never exists and therefore always is out of date. I propose removing the target and depending on the relevant directories (via a variable) directly. Then, those directories change all the time, so we should turn them into order-only dependencies to avoid excessive rebuilds. Once doing both, cmigemo cross builds again. This also speeds up the native build. Please consider applying the attached patch and also forwarding it upstream. Helmut
--- cmigemo-1.2+gh0.20220623.orig/compile/unix.mak +++ cmigemo-1.2+gh0.20220623/compile/unix.mak @@ -17,20 +17,19 @@ default: $(outdir)cmigemo$(EXEEXT) -dirs: - @for i in $(objdir) $(outdir); do \ - if test ! -d $$i; then \ - $(MKDIR) $$i; \ - fi \ - done +dirs = $(objdir) $(outdir) +$(dirs): + @if test ! -d $@; then \ + $(MKDIR) $@; \ + fi $(outdir)cmigemo$(EXEEXT): $(objdir)main.$(O) $(libmigemo_LIB) $(CC) -o $@ $(objdir)main.$(O) -L. -L$(outdir) -lmigemo $(LDFLAGS) -$(objdir)main.o: $(srcdir)main.c dirs +$(objdir)main.o: $(srcdir)main.c | $(dirs) $(CC) $(CFLAGS) -o $@ -c $< -$(objdir)%.o: $(srcdir)%.c dirs +$(objdir)%.o: $(srcdir)%.c | $(dirs) $(CC) $(CFLAGS) -o $@ -c $< ##############################################################################