Skip to contentSkip to conversation

svn commit: trunk/buildroot/package/zlib

Buildroot correa at uclibc.org 3 participants 3 messages Oct 31, 2008

lore
Share & tools
lore
#0 lore raw

Author: correa
Date: 2008-10-31 05:10:10 -0700 (Fri, 31 Oct 2008) New Revision: 23879

Log:
Make sure directories are created during install to STAGING_DIR and TARGET_DIR. Thanks to Thomas Petazzoni and Bernhard Reutner-Fischer.

Modified:
trunk/buildroot/package/zlib/zlib.mk

Changeset:
Modified: trunk/buildroot/package/zlib/zlib.mk
===================================================================

buildroot/package/zlib/zlib.mk +8 -10
@@ -37,23 +37,21 @@
 	touch -c $@
 
 $(STAGING_DIR)/usr/lib/libz.so: $(ZLIB_DIR)/libz.so
-	cp -dpf $(ZLIB_DIR)/libz.a $(STAGING_DIR)/usr/lib/
-	cp -dpf $(ZLIB_DIR)/zlib.h $(STAGING_DIR)/usr/include/
-	cp -dpf $(ZLIB_DIR)/zconf.h $(STAGING_DIR)/usr/include/
-	cp -dpf $(ZLIB_DIR)/libz.so* $(STAGING_DIR)/usr/lib/
+	$(INSTALL) -D $(ZLIB_DIR)/libz.a $(STAGING_DIR)/usr/lib/
+	$(INSTALL) -D $(ZLIB_DIR)/zlib.h $(STAGING_DIR)/usr/include/
+	$(INSTALL) $(ZLIB_DIR)/zconf.h $(STAGING_DIR)/usr/include/
+	$(INSTALL) $(ZLIB_DIR)/libz.so* $(STAGING_DIR)/usr/lib/
 	touch -c $@
 
 $(TARGET_DIR)/usr/lib/libz.so: $(STAGING_DIR)/usr/lib/libz.so
-	mkdir -p $(TARGET_DIR)/usr/lib
-	cp -dpf $(STAGING_DIR)/usr/lib/libz.so* $(TARGET_DIR)/usr/lib
+	$(INSTALL) -D $(STAGING_DIR)/usr/lib/libz.so* $(TARGET_DIR)/usr/lib
 	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
 	touch -c $@
 
 $(TARGET_DIR)/usr/lib/libz.a: $(STAGING_DIR)/usr/lib/libz.so
-	mkdir -p $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib
-	cp -dpf $(STAGING_DIR)/usr/include/zlib.h $(TARGET_DIR)/usr/include/
-	cp -dpf $(STAGING_DIR)/usr/include/zconf.h $(TARGET_DIR)/usr/include/
-	cp -dpf $(STAGING_DIR)/usr/lib/libz.a $(TARGET_DIR)/usr/lib/
+	$(INSTALL) -D $(STAGING_DIR)/usr/include/zlib.h $(TARGET_DIR)/usr/include/
+	$(INSTALL) $(STAGING_DIR)/usr/include/zconf.h $(TARGET_DIR)/usr/include/
+	$(INSTALL) -D $(STAGING_DIR)/usr/lib/libz.a $(TARGET_DIR)/usr/lib/
 	touch -c $@
 
 zlib-headers: $(TARGET_DIR)/usr/lib/libz.a
#1 lore raw

Le Fri, 31 Oct 2008 05:10:11 -0700 (PDT),
correa at uclibc.org a ?crit :

buildroot/package/zlib/zlib.mk line 40

Quoted 6 lines

$(STAGING_DIR)/usr/lib/libz.so: $(ZLIB_DIR)/libz.so

buildroot/package/zlib/zlib.mk +1 -4
-	cp -dpf $(ZLIB_DIR)/libz.a $(STAGING_DIR)/usr/lib/
-	cp -dpf $(ZLIB_DIR)/zlib.h $(STAGING_DIR)/usr/include/
-	cp -dpf $(ZLIB_DIR)/zconf.h $(STAGING_DIR)/usr/include/
-	cp -dpf $(ZLIB_DIR)/libz.so* $(STAGING_DIR)/usr/lib/
+	$(INSTALL) -D $(ZLIB_DIR)/libz.a $(STAGING_DIR)/usr/lib/

This doesn't work: even with the -D option, it doesn't create the intermediate directories. It should be:

$(INSTALL) -D $(ZLIB_DIR)/libz.a $(STAGING_DIR)/usr/lib/libz.a

buildroot/package/zlib/zlib.mk line 41

Quoted 1 line
buildroot/package/zlib/zlib.mk +1 -0
+	$(INSTALL) -D $(ZLIB_DIR)/zlib.h $(STAGING_DIR)/usr/include/

Same thing here.

Cheers,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
#2 lore raw

Ops, my bad.

Should be ok in 23885.

Quoted 31 lines · Thomas Petazzoni

Le Fri, 31 Oct 2008 05:10:11 -0700 (PDT),
correa at uclibc.org a ?crit :

buildroot/package/zlib/zlib.mk line 40

Quoted 6 lines

$(STAGING_DIR)/usr/lib/libz.so: $(ZLIB_DIR)/libz.so

buildroot/package/zlib/zlib.mk +1 -4
-     cp -dpf $(ZLIB_DIR)/libz.a $(STAGING_DIR)/usr/lib/
-     cp -dpf $(ZLIB_DIR)/zlib.h $(STAGING_DIR)/usr/include/
-     cp -dpf $(ZLIB_DIR)/zconf.h $(STAGING_DIR)/usr/include/
-     cp -dpf $(ZLIB_DIR)/libz.so* $(STAGING_DIR)/usr/lib/
+     $(INSTALL) -D $(ZLIB_DIR)/libz.a $(STAGING_DIR)/usr/lib/

This doesn't work: even with the -D option, it doesn't create the intermediate directories. It should be:

$(INSTALL) -D $(ZLIB_DIR)/libz.a $(STAGING_DIR)/usr/lib/libz.a

Quoted 1 line

+ $(INSTALL) -D $(ZLIB_DIR)/zlib.h $(STAGING_DIR)/usr/include/

Same thing here.

Cheers,

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot