Skip to content

Commit 42477ed

Browse files
committed
make: Drop 3.80 support
make 3.81 was released 14 years ago, we can safely require it now. Removed also make check as not necessary any more because the latest LTP release does not compile on systems with make 3.81 due old libc and kernel headers. Acked-by: Cyril Hrubis <[email protected]> Signed-off-by: Petr Vorel <[email protected]>
1 parent 554516e commit 42477ed

File tree

5 files changed

+12
-96
lines changed

5 files changed

+12
-96
lines changed

Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#
22
# Top-level Makefile for LTP. See INSTALL for more info.
33
#
4-
# Copyright (C) 2009-2010, Cisco Systems Inc.
5-
# Copyright (C) 2010-2011, Linux Test Project.
4+
# Copyright (c) Linux Test Project, 2009-2020
5+
# Copyright (c) Cisco Systems Inc., 2009-2010
66
#
77
# This program is free software; you can redistribute it and/or modify
88
# it under the terms of the GNU General Public License as published by
@@ -89,11 +89,7 @@ include-install: $(top_builddir)/include/config.h include/mk/config.mk include-a
8989
INSTALL_DIR := $(DESTDIR)/$(prefix)
9090

9191
# DO NOT REMOVE THIS CALL (see clean_install_dir call below...)!!!!
92-
ifdef MAKE_3_80_COMPAT
93-
INSTALL_DIR := $(call MAKE_3_80_abspath,$(INSTALL_DIR))
94-
else
9592
INSTALL_DIR := $(abspath $(INSTALL_DIR))
96-
endif
9793

9894
# build tree bootstrap targets and $(INSTALL_DIR) target.
9995
$(sort $(addprefix $(abs_top_builddir)/,$(BOOTSTRAP_TARGETS)) $(INSTALL_DIR) $(DESTDIR)/$(bindir)):

include/mk/env_post.mk

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#
22
# Environment post-setup Makefile.
33
#
4-
# Copyright (C) 2009, Cisco Systems Inc.
4+
# Copyright (c) Linux Test Project, 2009-2020
5+
# Copyright (c) Cisco Systems Inc., 2009
56
#
67
# This program is free software; you can redistribute it and/or modify
78
# it under the terms of the GNU General Public License as published by
@@ -79,28 +80,10 @@ INSTALL_TARGETS := $(patsubst $(abs_srcdir)/%,%,$(INSTALL_TARGETS))
7980
# scripts, so let's chmod them like that.
8081
INSTALL_MODE ?= 00775
8182

82-
ifdef MAKE_3_80_COMPAT
83-
84-
INSTALL_PATH := $(call MAKE_3_80_abspath,$(DESTDIR)/$(INSTALL_DIR))
85-
86-
INSTALL_TARGETS_ABS := $(call MAKE_3_80_abspath,$(addprefix $(INSTALL_PATH)/,$(INSTALL_TARGETS)))
87-
MAKE_TARGETS_ABS := $(call MAKE_3_80_abspath,$(addprefix $(INSTALL_PATH)/,$(MAKE_TARGETS)))
88-
89-
INSTALL_FILES := $(INSTALL_TARGETS_ABS) $(MAKE_TARGETS_ABS)
90-
91-
$(INSTALL_TARGETS_ABS):
92-
test -d "$(@D)" || mkdir -p "$(@D)"
93-
install -m $(INSTALL_MODE) "$(abs_srcdir)/$(subst $(INSTALL_PATH)/,,$@)" "$@"
94-
95-
$(MAKE_TARGETS_ABS):
96-
test -d "$(@D)" || mkdir -p "$(@D)"
97-
install -m $(INSTALL_MODE) "$(abs_builddir)/$(subst $(INSTALL_PATH)/,,$@)" "$@"
98-
else
9983
$(abspath $(addprefix $(DESTDIR)/$(INSTALL_DIR)/,$(sort $(dir $(INSTALL_TARGETS) $(MAKE_TARGETS))))):
10084
mkdir -p "$@"
10185
$(foreach install_target,$(INSTALL_TARGETS),$(eval $(call generate_install_rule,$(install_target),$(abs_srcdir),$(INSTALL_DIR))))
10286
$(foreach make_target,$(MAKE_TARGETS),$(eval $(call generate_install_rule,$(make_target),$(abs_builddir),$(INSTALL_DIR))))
103-
endif
10487

10588
else # else ! $(filter-out install,$(MAKECMDGOALS)),$(MAKECMDGOALS)
10689
$(error You must define $$(prefix) before executing install)

include/mk/env_pre.mk

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#
22
# Make pre-include environment Makefile.
33
#
4-
# Copyright (C) 2009, Cisco Systems Inc.
4+
# Copyright (c) Linux Test Project, 2009-2020
5+
# Copyright (c) Cisco Systems Inc., 2009
56
#
67
# This program is free software; you can redistribute it and/or modify
78
# it under the terms of the GNU General Public License as published by
@@ -36,28 +37,13 @@ BUILD_TREE_NONSRCDIR_INSTALL := 3
3637
# configure not run.
3738
BUILD_TREE_UNCONFIGURED := 4
3839

39-
ifndef MAKE_VERSION_CHECK
40-
export MAKE_VERSION_CHECK = 1
41-
ifneq ($(firstword $(sort 3.80 $(MAKE_VERSION))),3.80)
42-
$(error Your version of make $(MAKE_VERSION) is too old. Upgrade to at least 3.80; 3.81+ is preferred)
43-
else
44-
ifneq ($(filter 3.80%,$(MAKE_VERSION)),)
45-
export MAKE_3_80_COMPAT := 1
46-
endif # make 3.80?
47-
endif # At least make 3.80?
48-
endif # MAKE_VERSION_CHECK
49-
5040
# Get the absolute path for the source directory.
5141
top_srcdir ?= $(error You must define top_srcdir before including this file)
5242

5343
include $(top_srcdir)/include/mk/functions.mk
5444

5545
# Where's the root source directory?
56-
ifdef MAKE_3_80_COMPAT
57-
abs_top_srcdir := $(call MAKE_3_80_abspath,$(top_srcdir))
58-
else
5946
abs_top_srcdir := $(abspath $(top_srcdir))
60-
endif
6147

6248
#
6349
# Where's the root object directory?
@@ -67,12 +53,8 @@ endif
6753
#
6854
top_builddir ?= $(top_srcdir)
6955

70-
# We need the absolute path...
71-
ifdef MAKE_3_80_COMPAT
72-
abs_top_builddir := $(call MAKE_3_80_abspath,$(top_builddir))
73-
else
56+
# We need the absolute path
7457
abs_top_builddir := $(abspath $(top_builddir))
75-
endif
7658

7759
# Where's the root object directory?
7860
builddir := .
@@ -83,12 +65,8 @@ cwd_rel1 := $(subst $(abs_top_builddir),,$(abs_builddir))
8365
cwd_rel2 := $(subst $(abs_top_builddir)/,,$(abs_builddir))
8466
cwd_rel_from_top := $(if $(cwd_rel1),$(cwd_rel2),$(cwd_rel1))
8567

86-
# Where's the source located at? Squish all of the / away by using abspath...
87-
ifdef MAKE_3_80_COMPAT
88-
abs_srcdir := $(call MAKE_3_80_abspath,$(abs_top_srcdir)/$(cwd_rel_from_top))
89-
else
68+
# Where's the source located at? Squish all of the / away by using abspath
9069
abs_srcdir := $(abspath $(abs_top_srcdir)/$(cwd_rel_from_top))
91-
endif
9270

9371
srcdir := $(strip $(subst $(abs_top_srcdir)/,,$(abs_srcdir)))
9472

@@ -138,13 +116,7 @@ BUILD_TREE_STATE := $(BUILD_TREE_NONSRCDIR_INSTALL)
138116
endif
139117
endif
140118

141-
ifeq ($(MAKE_3_80_COMPAT),1)
142-
# Trick make 3.80 into thinking that the default goal is all.
143-
.PHONY: default
144-
default: all
145-
else
146119
.DEFAULT_GOAL := all
147-
endif
148120

149121
endif # END autotools, *clean...
150122

include/mk/functions.mk

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#
22
# A Makefile with a collection of reusable functions.
33
#
4-
# Copyright (C) 2009, Cisco Systems Inc.
4+
# Copyright (c) Linux Test Project, 2009-2020
5+
# Copyright (c) Cisco Systems Inc., 2009
56
#
67
# This program is free software; you can redistribute it and/or modify
78
# it under the terms of the GNU General Public License as published by
@@ -20,43 +21,14 @@
2021
# Ngie Cooper, July 2009
2122
#
2223

23-
SQUOTE := '
24-
25-
# ' # to keep colorized editors from going nuts
26-
27-
MAKE_3_80_realpath = $(shell $(top_srcdir)/scripts/realpath.sh '$(subst $(SQUOTE),\\$(SQUOTE),$(1))')
28-
29-
MAKE_3_80_abspath = $(shell $(top_srcdir)/scripts/abspath.sh '$(subst $(SQUOTE),\\$(SQUOTE),$(1))')
30-
31-
#
32-
# NOTE (garrcoop):
33-
#
34-
# The following functions are (sometimes) split into 3.80 and 3.81+
35-
# counterparts, and not conditionalized inside of the define(s) to work around
36-
# an issue with how make 3.80 evaluates defines.
37-
#
38-
# SO DO NOT INTERNALIZE CONDITIONALS IN DEFINES OR YOU WILL BREAK MAKE 3.80!
39-
#
40-
41-
#
4224
# Generate an install rule which also creates the install directory if needed
4325
# to avoid unnecessary bourne shell based for-loops and install errors, as well
4426
# as adhoc install rules.
4527
#
4628
# 1 -> Target basename.
4729
# 2 -> Source directory.
4830
# 3 -> Destination directory.
49-
#
50-
ifdef MAKE_3_80_COMPAT
51-
define generate_install_rule
5231

53-
INSTALL_FILES += $$(call MAKE_3_80_abspath,$$(DESTDIR)/$(3)/$(1))
54-
55-
$$(call MAKE_3_80_abspath,$$(DESTDIR)/$(3)/$(1)): \
56-
$$(call MAKE_3_80_abspath,$$(dir $$(DESTDIR)/$(3)/$(1)))
57-
install -m $$(INSTALL_MODE) "$(2)/$(1)" "$$@"
58-
endef
59-
else # not MAKE_3_80_COMPAT
6032
define generate_install_rule
6133

6234
INSTALL_FILES += $$(abspath $$(DESTDIR)/$(3)/$(1))
@@ -65,7 +37,6 @@ $$(abspath $$(DESTDIR)/$(3)/$(1)): \
6537
$$(abspath $$(dir $$(DESTDIR)/$(3)/$(1)))
6638
install -m $$(INSTALL_MODE) "$(2)/$(1)" "$$@"
6739
endef
68-
endif # END MAKE_3_80_COMPAT
6940

7041
#
7142
# Set SUBDIRS to the subdirectories where Makefiles were found.

include/mk/lib.mk

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#
22
# library include Makefile.
33
#
4-
# Copyright (C) 2009, Cisco Systems Inc.
4+
# Copyright (c) Linux Test Project, 2009-2020
5+
# Copyright (c) Cisco Systems Inc., 2009
56
#
67
# This program is free software; you can redistribute it and/or modify
78
# it under the terms of the GNU General Public License as published by
@@ -49,15 +50,8 @@ endif
4950
MAKE_TARGETS += $(LIB)
5051

5152
LIBSRCS ?= $(wildcard $(abs_srcdir)/*.c)
52-
53-
ifdef MAKE_3_80_COMPAT
54-
LIBSRCS := $(call MAKE_3_80_abspath,$(LIBSRCS))
55-
else
5653
LIBSRCS := $(abspath $(LIBSRCS))
57-
endif
58-
5954
LIBSRCS := $(subst $(abs_srcdir)/,,$(wildcard $(LIBSRCS)))
60-
6155
LIBSRCS := $(filter-out $(FILTER_OUT_LIBSRCS),$(LIBSRCS))
6256

6357
LIBOBJS := $(LIBSRCS:.c=.o)

0 commit comments

Comments
 (0)