diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-10-01 12:01:33 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2012-10-01 12:01:33 +0200 |
commit | 4dc3c1ad4d317a6bb59db4295eb0edfbfbaa5d6f (patch) | |
tree | e7b5b03a982de7a4f05c0be1bff2c15336b8120a | |
parent | de0baad88c11fbb8fe087f752826d5e5a7272b40 (diff) | |
download | initramdisk-master.tar.gz initramdisk-master.tar.xz initramdisk-master.zip |
-rw-r--r-- | Makefile | 54 |
1 files changed, 31 insertions, 23 deletions
@@ -6,43 +6,51 @@ DATE=$(shell date +%F_%T) all: initramfs initramfs: initramfs.cpio - gzip > initramfs < initramfs.cpio + @echo "Compressing archive" + @gzip > initramfs < initramfs.cpio initramfs.cpio: .root-done/.complete - cd root ;\ - find . | cpio -H newc -o > ../initramfs.cpio + @echo "Generating cpio archive" + @cd root ;\ + find . | cpio -H newc --quiet -o > ../initramfs.cpio .root-done/.complete: $(CONTENT-MARKER) .root-done/.links - touch .root-done/.complete + @touch .root-done/.complete $(CONTENT-MARKER): .root-done/%: % - -ldd $* | cut -d" " -f 3 | while read i ; do \ - if [ -n "$$i" ]; then \ - mkdir -p $$(dirname $$i) ;\ - cp --parents $$i root/ ;\ - fi ;\ - done - - -ldd $* | grep -v "=>" | cut -f1 -d" " | while read i ; do \ - if [ -n "$$i" ]; then \ - mkdir -p $$(dirname $$i) ;\ - cp --parents $$i root/ ;\ - fi ;\ - done + @echo "Installing $*" + @if ldd $* > /dev/null 2>&1 ; then \ + ldd $* | cut -d" " -f 3 | while read i ; do \ + if [ -n "$$i" ]; then \ + mkdir -p $$(dirname $$i) ;\ + cp --parents $$i root/ ;\ + echo -e "\tCopy library: $$i" ;\ + fi ;\ + done ;\ + \ + ldd $* | grep -v "=>" | cut -f1 -d" " | while read i ; do \ + if [ -n "$$i" ]; then \ + mkdir -p $$(dirname $$i) ;\ + cp --parents $$i root/ ;\ + echo -e "\tCopy library: $$i" ;\ + fi ;\ + done #;\ + fi - mkdir -p $(shell dirname $*) - cp -a --parents $* root/ + @mkdir -p $(shell dirname $*) + @cp -a --parents $* root/ - mkdir -p $(dir .root-done/$*) - touch .root-done/$* + @mkdir -p $(dir .root-done/$*) + @touch .root-done/$* + @echo .root-done/.links: Makefile - for i in $(CONTENT-LINKS) ; do \ + @for i in $(CONTENT-LINKS) ; do \ mkdir -p $$(dirname $$i) ;\ cp -a --parents $$i root/ ;\ done - touch .root-done/.static + @touch .root-done/.static $(CONTENT-MARKER): Makefile |