我用mingw构建freedesktop cppunit
https://www.freedesktop.org/wiki/Software/cppunit/
我已对源文件和makefile进行了一些修复,并且能够实现 成功执行命令:
./autogen.sh
./configure
make
没有任何错误。
需要设置
m4_DATA = m4
而不是价值" cppunit.m4"在Makefile.am中(在构建中没有这样的目录,看起来这样的目录是" m4" dir)。
成功执行后
make --debug install
因错误而失败:
File install-m4DATA not found
来自Makefile.am的:
m4dir = $(datadir)/aclocal //what is datadir btw?
automake生成的Makefile任务:
install-m4DATA: $(m4_DATA)
@$(NORMAL_INSTALL) // fails at this line
test -z "$(m4dir)" || $(MKDIR_P) "$(DESTDIR)$(m4dir)"
@list='$(m4_DATA)'; test -n "$(m4dir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(m4dir)" || exit $$?; \
done
之前,该任务NORMAL_INSTALL设置为:
NORMAL_INSTALL = :
如何修复" make install"执行。
如果我的PC上只有mingw envieronment,它会起作用吗?
版本是从git repo新鲜的1.13.2。
我还发布了" make --debug install"输出
File 'install-m4DATA' does not exist.
Must remake target 'install-m4DATA'.
test -z "/usr/local/share/aclocal" || /usr/bin/mkdir -p "/usr/local/share/aclocal"
/usr/bin/install -c -m 644 ./m4 '/usr/local/share/aclocal'
Makefile:432: recipe for target 'install-m4DATA' failed
make[2]: Leaving directory 'c:/Users/user/projects/cppunit'
Makefile:799: recipe for target 'install-am' failed
make[1]: Leaving directory 'c:/Users/user/projects/cppunit'
Makefile:479: recipe for target 'install-recursive' failed
它还会打印该脚本省略
行的目录 /usr/bin/install -c -m 644 ./m4 '/usr/local/share/aclocal'
这里可能必须从目录中获取文件,而不是目录本身。
如何解决这个问题(我不熟悉Makefile和bash)?