X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fstepmake%2Fgeneric-vars.make;h=fb75166e1ba61c35d0b1ad7e51237df30567bcfb;hb=87268b9c1e409ec326fa0a2ecdfdeabc02d708a3;hp=223c59d0935f460e35ed7991c367485b8f8a9d48;hpb=a41bc3e06fca46daa875419b5dc00dd958e1fde0;p=lilypond.git diff --git a/stepmake/stepmake/generic-vars.make b/stepmake/stepmake/generic-vars.make index 223c59d093..fb75166e1b 100644 --- a/stepmake/stepmake/generic-vars.make +++ b/stepmake/stepmake/generic-vars.make @@ -1,76 +1,70 @@ -# title generic variables -# file make/Variables.make -# -# do not change this file for site-wide extensions; please use -# make/$(outdir)/Site.make; -# -# Any change in files in this directory (make/) would be distributed, if -# you do make dist +top-build-dir := $(realpath $(depth) ) +build-dir := $(realpath . ) -# directory names: +tree-dir = $(subst $(top-build-dir),,$(build-dir)) -# depth from group-dir -# not eh, normally used -DEPTH = $(depth)/$(package-depth) +ifneq ($(configure-srcdir),.) +srcdir-build = 1 +endif -topdir := $(shell cd $(depth); pwd) -pwd := $(shell pwd) +ifndef srcdir-build +src-depth = $(depth) +else +src-depth = $(configure-srcdir) +endif +top-src-dir := $(realpath $(src-depth)) -# derived names -ifeq ($(distdir),) - distdir = $(depth)/$(outdir)/$(DIST_NAME) - DIST_NAME = $(package)-$(TOPLEVEL_VERSION) +ifndef srcdir-build +src-dir = . +else +src-dir = $(top-src-dir)$(tree-dir) +VPATH = $(src-dir) endif -distname = $(package)-$(TOPLEVEL_VERSION) +abs-src-dir = $(top-src-dir)$(tree-dir) +.UNEXPORT: build-dir src-dir tree-dir +src-wildcard = $(subst $(src-dir)/,,$(wildcard $(src-dir)/$(1))) -# obsolete? -makeout = $(depth)/make/$(outdir) -docout = $(depth)/Documentation/$(outdir) -binout = $(depth)/bin/$(outdir) +ifeq ($(distdir),) + distdir = $(top-build-dir)/$(outdir)/$(DIST_NAME) + DIST_NAME = $(package)-$(TOPLEVEL_VERSION) +endif +distname = $(package)-$(TOPLEVEL_VERSION) -doc-dir = $(depth)/Documentation -po-dir = $(depth)/po +doc-dir = $(src-depth)/Documentation +po-srcdir = $(src-depth)/po +po-outdir = $(depth)/po/$(outdir) -# sort-out which of these are still needed -# -$(package)_bindir = $(depth)/bin -step-bindir = $(depth)/$(stepmake)/bin -abs-step-bindir = $(topdir)/$(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) +INSTALLPY=$(buildscript-dir)/install -c +INSTALL=$(INSTALLPY) -# need to be defined in local Makefiles: -# -FOOBAR = -# the version: -# -ifneq ($(MY_PATCH_LEVEL),$(FOOBAR)) +package-icon = $(outdir)/$(package)-icon.xpm + +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: # @@ -78,63 +72,40 @@ ERROR_LOG = 2> /dev/null SILENT_LOG = 2>&1 > /dev/null date := $(shell date +%x) #duplicated? -# compile and link options: -# -ARFLAGS = ru - -INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES) -LDFLAGS = $(ILDFLAGS) $(USER_LDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) $($(PACKAGE)_LDFLAGS) - -MODULE_LIBES=$(addsuffix /$(outdir)/library.a, $(MODULE_LIBS)) -LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES) -# urg: for windows ? -# LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES) -lstdc++ -# +INCLUDES = $(src-dir)/include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES) -# macro compiler: -# M4 = m4 -# - -# -LD_COMMAND = $(LD) $(LDFLAGS) -o $@ -# - -# dependencies: -# -depfile = $(outdir)/$(subst .o,.dep,$(notdir $@))# -DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)" -# +DOCDIR=$(depth)/$(outdir) -# generic target names: -# -ifdef NAME -EXECUTABLE = $(outdir)/$(NAME)$(EXE) -else -EXECUTABLE = -endif +#? +STRIPDEBUG=true +STRIP=strip --strip-debug +DO_STRIP=true -EXECUTABLES = $(notdir $(EXECUTABLE)) +LOOP=+$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true +ETAGS_FLAGS = +CTAGS_FLAGS = -# +makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%)))) -#replace to do stripping of certain objects -STRIPDEBUG=true +IN_FILES := $(call src-wildcard,*.in) +SOURCE_FILES += $(IN_FILES) -DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES) -DOCDIR=$(depth)/$(outdir) +# Preprocessed .in documentation _FILES: +OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%)) +ALL_SOURCES = $(SOURCE_FILES) -STRIP=strip --strip-debug -ifdef stablecc - STABLEOBS=$(addprefix $(outdir)/,$(stablecc:.cc=.o)) +ifeq (cygwin,$(findstring cygwin,$(HOST_ARCH))) +CYGWIN_BUILD = yes endif -# substitute $(STRIP) in Site.make if you want stripping -DO_STRIP=true -LOOP=$(foreach i, $(SUBDIRS), $(MAKE) -C $(i) $@ &&) true - +ifeq (mingw,$(findstring mingw,$(HOST_ARCH))) +MINGW_BUILD = yes +endif -include $(stepdir)/files.make +ifeq (darwin,$(findstring darwin,$(HOST_ARCH))) +DARWIN_BUILD = yes +endif