Skip to content
代码片段 群组 项目
提交 31c7f81d 编辑于 作者: Thomas Petazzoni's avatar Thomas Petazzoni 提交者: Thiago Macieira
浏览文件

Makefile: use installation logic compatible with old make version


The installation logic used by the Makefile causes a problem with old
make versions, such as make 3.81. Indeed, the rule "$(DESTDIR)%/" gets
matched even for targets like "$(DESTDIR)$(libdir)/libtinycbor.a". Due
to this, with those old make versions, tinycbor.a is installed as a
directory, and the library is never copied:

make[1]: Entering directory `/home/test/outputs/b1305500555cbb5b959e5be11dee5cf75907f0ce/output/build/tinycbor-v0.3.1'
install -d /home/test/outputs/b1305500555cbb5b959e5be11dee5cf75907f0ce/output/target/usr/bin/cbordump
install -d /home/test/outputs/b1305500555cbb5b959e5be11dee5cf75907f0ce/output/target/usr/lib/libtinycbor.a
install -d /home/test/outputs/b1305500555cbb5b959e5be11dee5cf75907f0ce/output/target/usr/lib/pkgconfig/tinycbor.pc
install -d /home/test/outputs/b1305500555cbb5b959e5be11dee5cf75907f0ce/output/target/usr/include/tinycbor/cbor.h
install -d /home/test/outputs/b1305500555cbb5b959e5be11dee5cf75907f0ce/output/target/usr/include/tinycbor/cborjson.h
make[1]: Leaving directory `/home/test/outputs/b1305500555cbb5b959e5be11dee5cf75907f0ce/output/build/tinycbor-v0.3.1'

To address this, we create the destination directory directly within
the per-file make targets.

Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarThiago Macieira <thiago.macieira@intel.com>
上级 1735f9cb
No related branches found
标签 v0.3.2
加载中
...@@ -123,15 +123,17 @@ $(PACKAGE).tar.gz: | .git ...@@ -123,15 +123,17 @@ $(PACKAGE).tar.gz: | .git
$(PACKAGE).zip: | .git $(PACKAGE).zip: | .git
GIT_DIR=$(SRCDIR).git $(GIT_ARCHIVE) --format=zip -o "$(PACKAGE).zip" HEAD GIT_DIR=$(SRCDIR).git $(GIT_ARCHIVE) --format=zip -o "$(PACKAGE).zip" HEAD
$(DESTDIR)%/: $(DESTDIR)$(libdir)/%: lib/%
$(INSTALL) -d $@ $(INSTALL) -d $(@D)
$(DESTDIR)$(libdir)/%: lib/% | $(DESTDIR)$(libdir)/
$(INSTALL_DATA) $< $@ $(INSTALL_DATA) $< $@
$(DESTDIR)$(bindir)/%: bin/% | $(DESTDIR)$(bindir)/ $(DESTDIR)$(bindir)/%: bin/%
$(INSTALL) -d $(@D)
$(INSTALL_PROGRAM) $< $@ $(INSTALL_PROGRAM) $< $@
$(DESTDIR)$(pkgconfigdir)/%: % | $(DESTDIR)$(pkgconfigdir)/ $(DESTDIR)$(pkgconfigdir)/%: %
$(INSTALL) -d $(@D)
$(INSTALL_DATA) $< $@ $(INSTALL_DATA) $< $@
$(DESTDIR)$(includedir)/tinycbor/%: src/% | $(DESTDIR)$(includedir)/tinycbor/ $(DESTDIR)$(includedir)/tinycbor/%: src/%
$(INSTALL) -d $(@D)
$(INSTALL_DATA) $< $@ $(INSTALL_DATA) $< $@
install-strip: install-strip:
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册