make: Support GNUmakefile too, where applicable

Add support for GNUmakefile, where originally only Makefile was supported.
Not done everywhere, as some of the code involving makefiles is dead
anyway.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2018-12-27 17:30:10 +00:00
commit f19831245f
7 changed files with 14 additions and 12 deletions

View file

@ -97,8 +97,10 @@ CREATE_DEVEL = false
endif
endif
VERSION := $(shell $(CAT) $(VERSION_FILE))
DIST_VERSION ?= $(shell $(SED) -e "s/-dev//" $(VERSION_FILE))
ifneq ($(wildcard $(VERSION_FILE)),)
VERSION ?= $(shell $(CAT) $(VERSION_FILE))
endif
DIST_VERSION ?= $(patsubst %-dev,%,$(VERSION))
HEX_VERSION = $(shell echo $(DIST_VERSION) | \
$(SED) 's/-dev//; s/pre[^\.]*//; s/F[^\.]//; s/[\.-]/ /g' | xargs printf "0x%02x%02x%02x%02x")
BINARY_VERSION = $(shell echo $(PROJECT)_$(DIST_VERSION) | tr [a-z] [A-Z] | $(SED) 's/-[^-]*$$//; s/-/_/g')
@ -274,7 +276,7 @@ endif
# makefile helpers
FIND_SUBDIRS = $(filter-out . .. nomake CVS $(IGNORE_SUBDIRS),\
$(patsubst ./%,%,$(patsubst %/,%,$(dir $(shell find . -maxdepth 2 -mindepth 2 -iname Makefile)))))
$(patsubst ./%,%,$(patsubst %/,%,$(dir $(shell find . -maxdepth 2 -mindepth 2 -a \( -iname Makefile -o -iname GNUmakefile \))))))
SUBDIRS_TO_ITERATE = $(filter-out $(IGNORE_SUBDIRS),$(SUBDIRS))
# compiler and linker
@ -359,6 +361,7 @@ UPLOAD_URL_DEVEL_DOC = rsync_ssh://root@feitnix.jannet.de:/srv/www/htdocs/jann
IMAGES += $(wildcard *.png *.jpg *.bmp *.gif *.ico *.svg)
FONTS += $(wildcard *.woff *.svg)
LOCAL_MKFILES ?= $(wildcard GNUmakefile makefile Makefile *.mk)
# -- standard dirs and files for build and install
@ -514,7 +517,7 @@ INSTALLED_HTML += $(addprefix $(INSTALL_HTMLDIR)/,$(LOCAL_HTML))
# -- TMPL
INSTALLATION_FILE_TYPES += TMPL
BUILD_TMPLDIR = $(TOPDIR)/tmpl
LOCAL_TMPL += $(filter-out $(DONT_INSTALL) Makefile,$(wildcard *.tmpl))
LOCAL_TMPL += $(filter-out $(DONT_INSTALL),$(wildcard *.tmpl))
TMPL_SUBDIR ?= $(shell $(PWD) | $(SED) '/.*\/tmpl\(\/\|$$\)/!d; s%.*/tmpl\(/\|$$\)%%')
ifeq ($(TMPL_SUBDIR),)
INSTALL_TMPLDIR = $(PROJECT_TMPLDIR)
@ -1092,4 +1095,3 @@ doc-project:
$(BROWSER) $(JANWARE_URL_DOC_PROJECT)
endif