mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-18 02:39:59 +00:00
cleanup initrd tmpfile and reduce recursive make calls
This commit is contained in:
parent
3241499ee3
commit
27e35f6ef7
13
Makefile
13
Makefile
@ -328,10 +328,12 @@ initrd.cpio: $(initrd_bins) $(initrd_libs) dev.cpio FORCE
|
|||||||
cd "$(initrd_dir)"; \
|
cd "$(initrd_dir)"; \
|
||||||
find . \
|
find . \
|
||||||
| cpio --quiet -H newc -o \
|
| cpio --quiet -H newc -o \
|
||||||
| $(pwd)/cpio-clean $(pwd)/dev.cpio - \
|
| $(pwd)/cpio-clean \
|
||||||
|
$(pwd)/dev.cpio \
|
||||||
|
- \
|
||||||
> "$(pwd)/$@" \
|
> "$(pwd)/$@" \
|
||||||
)
|
)
|
||||||
echo should $(RM) -rf "$(initrd_dir)"
|
$(call do,RM,$(initrd_dir),$(RM) -rf "$(initrd_dir)")
|
||||||
|
|
||||||
initrd.intermediate: initrd.cpio
|
initrd.intermediate: initrd.cpio
|
||||||
|
|
||||||
@ -396,13 +398,14 @@ modules.clean:
|
|||||||
else
|
else
|
||||||
# Wrong make version detected -- build our local version
|
# Wrong make version detected -- build our local version
|
||||||
# and re-invoke the Makefile with it instead.
|
# and re-invoke the Makefile with it instead.
|
||||||
$(info Wrong make detected: $(LOCAL_MAKE_VERSION))
|
$(eval $(shell echo >&2 "$(DATE) Wrong make detected: $(LOCAL_MAKE_VERSION)"))
|
||||||
HEADS_MAKE := $(build)/$(make_dir)/make
|
HEADS_MAKE := $(build)/$(make_dir)/make
|
||||||
|
|
||||||
# Once we have a proper Make, we can just pass arguments into it
|
# Once we have a proper Make, we can just pass arguments into it
|
||||||
%: $(HEADS_MAKE)
|
all: $(HEADS_MAKE)
|
||||||
|
LANG=C MAKE=$(HEADS_MAKE) $(HEADS_MAKE) $@
|
||||||
|
%.intermediate: $(HEADS_MAKE)
|
||||||
LANG=C MAKE=$(HEADS_MAKE) $(HEADS_MAKE) $@
|
LANG=C MAKE=$(HEADS_MAKE) $(HEADS_MAKE) $@
|
||||||
all:
|
|
||||||
|
|
||||||
# How to download and build the correct version of make
|
# How to download and build the correct version of make
|
||||||
$(HEADS_MAKE): $(build)/$(make_dir)/Makefile
|
$(HEADS_MAKE): $(build)/$(make_dir)/Makefile
|
||||||
|
Loading…
Reference in New Issue
Block a user