X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fstepmake%2Fgeneric-vars.make;h=fb75166e1ba61c35d0b1ad7e51237df30567bcfb;hb=e578d9000fb5e1fc6b2c34bc05948aa6b0865ed3;hp=1679e6b90d1da89b84c8e25627c742a2261ee717;hpb=72c67220d22e607b82d2919b71b7de849af6bbeb;p=lilypond.git diff --git a/stepmake/stepmake/generic-vars.make b/stepmake/stepmake/generic-vars.make index 1679e6b90d..fb75166e1b 100644 --- a/stepmake/stepmake/generic-vars.make +++ b/stepmake/stepmake/generic-vars.make @@ -1,75 +1,70 @@ -# directory names: +top-build-dir := $(realpath $(depth) ) +build-dir := $(realpath . ) -# depth from group-dir -# internal, not normally used -DEPTH = $(depth)/$(package-depth) +tree-dir = $(subst $(top-build-dir),,$(build-dir)) -ifeq ($(topdir),) -topdir := $(shell cd $(depth); pwd) +ifneq ($(configure-srcdir),.) +srcdir-build = 1 endif -pwd := $(shell pwd) -# $(depth) is deprecated, for most cases you'll want $(src-depth) -# -# Well, on second thought. -# It can do no harm, but using src-depth iso depth is only necessary -# for broken rules that do -# cd $(outdir) && foo $(depth) ... -src-depth = $(depth)/$(srcdir) +ifndef srcdir-build +src-depth = $(depth) +else +src-depth = $(configure-srcdir) +endif + +top-src-dir := $(realpath $(src-depth)) + +ifndef srcdir-build +src-dir = . +else +src-dir = $(top-src-dir)$(tree-dir) +VPATH = $(src-dir) +endif + +abs-src-dir = $(top-src-dir)$(tree-dir) + +.UNEXPORT: build-dir src-dir tree-dir + +src-wildcard = $(subst $(src-dir)/,,$(wildcard $(src-dir)/$(1))) -# derived names ifeq ($(distdir),) - distdir = $(topdir)/$(outdir)/$(DIST_NAME) + distdir = $(top-build-dir)/$(outdir)/$(DIST_NAME) DIST_NAME = $(package)-$(TOPLEVEL_VERSION) endif distname = $(package)-$(TOPLEVEL_VERSION) -# obsolete? -#makeout = $(depth)/make/$(outdir) -#docout = $(depth)/Documentation/$(outdir) -#binout = $(depth)/bin/$(outdir) - doc-dir = $(src-depth)/Documentation -po-dir = $(src-depth)/po +po-srcdir = $(src-depth)/po +po-outdir = $(depth)/po/$(outdir) -# sort-out which of these are still needed -# -$(package)_bindir = $(depth)/bin -step-bindir = $(stepmake)/bin - -group-dir = $(shell cd $(DEPTH)/..; pwd) -release-dir = $(group-dir)/releases -patch-dir = $(group-dir)/patches -# -# i have in $HOME/.rpmrc -# topdir: /home/fred/usr/src/Redhat -# -rpm-sources = $(release-dir) -rpm-build = $(group-dir)/RedHat/BUILD -# +# stepmake package support. +DEPTH = $(depth)/$(package-depth) -# package-icon=$(outdir)/$(package)-icon.gif -package-icon=$(outdir)/$(package)-icon.xpm +INSTALLPY=$(buildscript-dir)/install -c +INSTALL=$(INSTALLPY) +package-icon = $(outdir)/$(package)-icon.xpm -# need to be defined in local Makefiles: -# -FOOBAR = -# the version: -# -ifneq ($(MY_PATCH_LEVEL),$(FOOBAR)) +ifneq ($(strip $(MY_PATCH_LEVEL)),) VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL) else VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL) endif -ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR)) +ifneq ($(strip $(TOPLEVEL_MY_PATCH_LEVEL)),) TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL) else TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL) endif +# no locale settings in the build process. +LANG= +export LANG + + +INFO_DIRECTORIES = Documentation # clean file lists: # @@ -77,31 +72,25 @@ ERROR_LOG = 2> /dev/null SILENT_LOG = 2>&1 > /dev/null date := $(shell date +%x) #duplicated? -INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES) +INCLUDES = $(src-dir)/include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES) M4 = m4 -#replace to do stripping of certain objects -STRIPDEBUG=true - -DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES) DOCDIR=$(depth)/$(outdir) +#? +STRIPDEBUG=true STRIP=strip --strip-debug - -# substitute $(STRIP) in Site.make if you want stripping DO_STRIP=true -LOOP=$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true -# different redhat releases need different flags for etags. Just use defaults. -ETAGS_FLAGS= # -CT -CTAGS_FLAGS=-h +LOOP=+$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true -makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%)))) +ETAGS_FLAGS = +CTAGS_FLAGS = -DEP_FILES := $(wildcard $(outdir)/*.dep) +makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%)))) -IN_FILES := $(wildcard *.in) +IN_FILES := $(call src-wildcard,*.in) SOURCE_FILES += $(IN_FILES) # Preprocessed .in documentation _FILES: @@ -109,4 +98,14 @@ OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%)) ALL_SOURCES = $(SOURCE_FILES) +ifeq (cygwin,$(findstring cygwin,$(HOST_ARCH))) +CYGWIN_BUILD = yes +endif +ifeq (mingw,$(findstring mingw,$(HOST_ARCH))) +MINGW_BUILD = yes +endif + +ifeq (darwin,$(findstring darwin,$(HOST_ARCH))) +DARWIN_BUILD = yes +endif