X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fstepmake%2Fgeneric-vars.make;h=da7d7047562b99ea6376473e5ea71560684ad987;hb=c20fff645e325d392d2588721144f4204d0ef9da;hp=01f32a62563fd058217cb677d29d05282d2f7a5e;hpb=6817805afca5e84e74479bdd951609b80210095b;p=lilypond.git diff --git a/stepmake/stepmake/generic-vars.make b/stepmake/stepmake/generic-vars.make index 01f32a6256..da7d704756 100644 --- a/stepmake/stepmake/generic-vars.make +++ b/stepmake/stepmake/generic-vars.make @@ -1,78 +1,77 @@ -# directory names: +top-build-dir = $(shell cd $(depth) && pwd) +build-dir = $(shell cd . && pwd) +tree-dir = $(subst $(top-build-dir),,$(build-dir)) -# depth from group-dir -# internal, not normally used -DEPTH = $(depth)/$(package-depth) +absdir = $(shell cd $(1) ; pwd) -#ifeq ($(topdir),) -#abs-srcdir := $(shell cd $(depth); pwd) -##deprecated -#topdir := $(abs-srcdir) -#endif -## `which pwd` is to prevent symlink resolving intelligence -pwd:=$(shell `which pwd`) -current-relative-dir:=$(subst $(strip $(shell cd $(depth); `which pwd`)),,$(pwd)) +ifneq ($(configure-srcdir),.) +srcdir-build = 1 +endif -ifeq ($(srcdir),.) +ifndef srcdir-build src-depth = $(depth) else -src-depth = $(srcdir) +src-depth = $(configure-srcdir) endif -ifeq ($(topdir),) -abs-srcdir := $(shell cd $(src-depth); pwd) -topdir := $(abs-srcdir) +top-src-dir := $(shell cd $(src-depth); pwd) + +ifndef srcdir-build +src-dir = . +else +src-dir = $(top-src-dir)$(tree-dir) +VPATH = $(src-dir) endif -# derived names +abs-src-dir = $(top-src-dir)$(tree-dir) + +.UNEXPORT: build-dir src-dir tree-dir + +src-wildcard = $(subst $(src-dir)/,,$(wildcard $(src-dir)/$(1))) + ifeq ($(distdir),) - distdir = $(topdir)/$(outdir)/$(DIST_NAME) + distdir = $(top-build-dir)/$(outdir)/$(DIST_NAME) DIST_NAME = $(package)-$(TOPLEVEL_VERSION) endif distname = $(package)-$(TOPLEVEL_VERSION) doc-dir = $(src-depth)/Documentation -po-dir = $(src-depth)/po - -# sort-out which of these are still needed -# -$(package)_bindir = $(depth)/bin +po-srcdir = $(src-depth)/po +po-outdir = $(depth)/po/$(outdir) step-bindir = $(stepmake)/bin +# stepmake package support. +DEPTH = $(depth)/$(package-depth) + +INSTALLPY=$(PYTHON) $(step-bindir)/install.py -c +INSTALL=$(INSTALLPY) + 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 -# - -# package-icon=$(outdir)/$(package)-icon.gif -package-icon=$(outdir)/$(package)-icon.xpm +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: # @@ -80,30 +79,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 + +LOOP=+$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true ETAGS_FLAGS = -CTAGS_FLAGS = +CTAGS_FLAGS = makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%)))) -DEP_FILES := $(wildcard $(outdir)/*.dep) - -IN_FILES := $(wildcard *.in) +IN_FILES := $(call src-wildcard,*.in) SOURCE_FILES += $(IN_FILES) # Preprocessed .in documentation _FILES: @@ -111,14 +105,14 @@ OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%)) ALL_SOURCES = $(SOURCE_FILES) -# Check if we are building for Cygwin -# -HOST_ARCH=$(shell $(CC) -dumpmachine) -ifeq ($(HOST_ARCH),i686-pc-cygwin) +ifeq (cygwin,$(findstring cygwin,$(HOST_ARCH))) CYGWIN_BUILD = yes endif -# -# ugh-- what if someone decides on: 'i568-pc-cygwin-gnu' -ifeq ($(HOST_ARCH),i686-cygwin) -CYGWIN_BUILD = yes + +ifeq (mingw,$(findstring mingw,$(HOST_ARCH))) +MINGW_BUILD = yes +endif + +ifeq (darwin,$(findstring darwin,$(HOST_ARCH))) +DARWIN_BUILD = yes endif