mirror of
https://github.com/sheumann/hush.git
synced 2024-12-26 10:32:02 +00:00
- work around missing features and bugs in make-3.79.1:
- no order-only prerequisites; incomplete workaround (see comment in diff) - no internal variable MAKEFILE_LIST; workaround - define bar\nfoo:=<long-list> doesn't work; workaround also: - reinstate clean, distclean as noconfig_target. - unconditionally clean libbusybox.so*
This commit is contained in:
parent
56ee779074
commit
a59721166a
30
Makefile
30
Makefile
@ -10,8 +10,15 @@
|
|||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
noconfig_targets := menuconfig config oldconfig randconfig \
|
noconfig_targets := menuconfig config oldconfig randconfig \
|
||||||
defconfig allyesconfig allnoconfig allbareconfig \
|
defconfig allyesconfig allnoconfig allbareconfig \
|
||||||
|
clean distclean \
|
||||||
release tags
|
release tags
|
||||||
|
|
||||||
|
# make-3.79.1 didn't support MAKEFILE_LIST
|
||||||
|
# for building out-of-tree, users of make-3.79 still have to pass top_srcdir=
|
||||||
|
# to make: make -f /srcs/busybox/Makefile top_srcdir=/srcs/busybox
|
||||||
|
ifndef MAKEFILE_LIST
|
||||||
|
MAKEFILE_LIST=.
|
||||||
|
endif
|
||||||
# the toplevel sourcedir
|
# the toplevel sourcedir
|
||||||
ifndef top_srcdir
|
ifndef top_srcdir
|
||||||
top_srcdir:=$(shell cd $(dir $(firstword $(MAKEFILE_LIST))) && pwd)
|
top_srcdir:=$(shell cd $(dir $(firstword $(MAKEFILE_LIST))) && pwd)
|
||||||
@ -59,6 +66,13 @@ endif
|
|||||||
#######################################################################
|
#######################################################################
|
||||||
# Try to workaround bugs in make
|
# Try to workaround bugs in make
|
||||||
|
|
||||||
|
# make-3.79.1 didn't understand order-only prerequisites ('|').
|
||||||
|
# Just treat them as normal prerequisites. Note that this will lead to
|
||||||
|
# spurious rebuilds.
|
||||||
|
ifeq ($(MAKE_VERSION),3.79.1)
|
||||||
|
|: ;
|
||||||
|
endif
|
||||||
|
|
||||||
# Workaround for bugs in make-3.80
|
# Workaround for bugs in make-3.80
|
||||||
# eval is broken if it is in a conditional
|
# eval is broken if it is in a conditional
|
||||||
|
|
||||||
@ -86,7 +100,6 @@ endef
|
|||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
||||||
|
|
||||||
-include $(top_srcdir)/Rules.mak
|
-include $(top_srcdir)/Rules.mak
|
||||||
|
|
||||||
# Handle building out of tree
|
# Handle building out of tree
|
||||||
@ -251,20 +264,21 @@ include $(patsubst %,%/Makefile.in,$(SRC_DIRS))
|
|||||||
# Then we need the dependencies for ..._OBJ
|
# Then we need the dependencies for ..._OBJ
|
||||||
define dir_pattern.o
|
define dir_pattern.o
|
||||||
ifeq ($(os),.os)
|
ifeq ($(os),.os)
|
||||||
# write patterns for both .os and .o
|
|
||||||
$(if $($(1)_OBJ.os),$($(1)_OBJ.os:.os=.o): $(top_builddir)/$(2)/%.o: $(top_srcdir)/$(2)/%.c)
|
$(if $($(1)_OBJ.os),$($(1)_OBJ.os:.os=.o): $(top_builddir)/$(2)/%.o: $(top_srcdir)/$(2)/%.c)
|
||||||
endif
|
endif
|
||||||
$(if $($(1)_OBJ$(os)),$($(1)_OBJ$(os)): $(top_builddir)/$(2)/%$(os): $(top_srcdir)/$(2)/%.c)
|
$(if $($(1)_OBJ$(os)),$($(1)_OBJ$(os)): $(top_builddir)/$(2)/%$(os): $(top_srcdir)/$(2)/%.c)
|
||||||
$(if $($(1)_OBJ),$($(1)_OBJ): $(top_builddir)/$(2)/%.o: $(top_srcdir)/$(2)/%.c)
|
$(if $($(1)_OBJ),$($(1)_OBJ): $(top_builddir)/$(2)/%.o: $(top_srcdir)/$(2)/%.c)
|
||||||
|
|
||||||
lib-obj-y+=$($(1)_OBJ) $($(1)_OBJ.o) $($(1)_OBJ.os)
|
|
||||||
lib-mobj-y+=$($(1)_MOBJ.o) $($(1)_MOBJ.os)
|
|
||||||
bin-obj-y+=$($(1)_OBJ:.os=.o) $($(1)_OBJ.o:.os=.o) $($(1)_OBJ.os:.os=.o)
|
|
||||||
bin-mobj-y+=$($(1)_MOBJ.o:.osm=.om) $($(1)_MOBJ.os:.osm=.om)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# The actual directory patterns for .o*
|
# The actual directory patterns for .o*
|
||||||
$(foreach d,$(DIRS),$(eval $(call dir_pattern.o,$(subst /,_,$(d)),$(d))))
|
$(foreach d,$(DIRS),$(eval $(call dir_pattern.o,$(subst /,_,$(d)),$(d))))
|
||||||
|
|
||||||
|
define file_lists
|
||||||
|
$($(1)$(2)) $($(1)$(2).o) $($(1)$(2).os)
|
||||||
|
endef
|
||||||
|
bin-obj-y:=$(subst .os,.o,$(foreach d,$(DIRS),$(call file_lists,$(subst /,_,$(d)),_OBJ)))
|
||||||
|
bin-mobj-y:=$(subst .osm,.om,$(foreach d,$(DIRS),$(call file_lists,$(subst /,_,$(d)),_MOBJ)))
|
||||||
|
|
||||||
ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
|
ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
|
||||||
# Finally pull in the dependencies (headers and other includes) of the
|
# Finally pull in the dependencies (headers and other includes) of the
|
||||||
# individual object files
|
# individual object files
|
||||||
@ -481,7 +495,7 @@ clean:
|
|||||||
docs/busybox pod2htm* *.gdb *.elf *~ core .*config.log \
|
docs/busybox pod2htm* *.gdb *.elf *~ core .*config.log \
|
||||||
docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \
|
docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \
|
||||||
docs/busybox.net/BusyBox.html busybox.links \
|
docs/busybox.net/BusyBox.html busybox.links \
|
||||||
$(DO_INSTALL_LIBS) $(LIBBUSYBOX_SONAME) \
|
libbusybox.so* \
|
||||||
.config.old busybox busybox_unstripped
|
.config.old busybox busybox_unstripped
|
||||||
- rm -r -f _install testsuite/links
|
- rm -r -f _install testsuite/links
|
||||||
- find . -name .\*.flags -exec rm -f {} \;
|
- find . -name .\*.flags -exec rm -f {} \;
|
||||||
|
Loading…
Reference in New Issue
Block a user