]> git.donarmstrong.com Git - lilypond.git/blobdiff - make/Variables.make
release: 0.1.7
[lilypond.git] / make / Variables.make
index fb024505012be0835252fb303bf51c5af92bd36b..c1a022fa1981a41f4f3399c1ee8644caecb2f74c 100644 (file)
@@ -5,8 +5,10 @@
 # abstract 
 #
 # do not change this file for site-wide extensions; please use 
-# make/out/Site.make; 
-# Any change in files in this directory (make/) would be distributed.
+# make/$(OUTDIR_NAME)/Site.make; 
+#
+# Any change in files in this directory (make/) would be distributed, if 
+# you do make dist 
 #
 # Copyright (c) 1997 by    
 #      Jan Nieuwenhuizen <jan@digicash.com>
 
 # toplevel version info, might be handy?
 #
-include ./$(depth)/.version
-#
-include ./$(depth)/make/out/Configure_variables.make
+include $(depth)/VERSION
+
 
 ifeq (0,${MAKELEVEL})
+
+# Don't try to outsmart us, you puny computer!
 MAKE:=$(MAKE) --no-builtin-rules
 endif
 
+ifndef OUTDIR_NAME
+OUTDIR_NAME=out
+endif
+
 # directory names:
-#
-outdir = out
-lily_bindir = ./$(depth)/bin
-distdir = ./$(depth)/$(DIST_NAME)
-module-distdir = ./$(depth)/$(MODULE_DIST_NAME)
+buildprefix=$(depth)
+outdir=$(OUTDIR_NAME)
+
+# derived names
+lily_bindir = $(depth)/bin
+distdir = $(depth)/$(DIST_NAME)
+module-distdir = $(depth)/$(MODULE_DIST_NAME)
 depdir = $(outdir)
-flowerout = ./$(depth)/flower/$(outdir)
-libout = ./$(depth)/lib/$(outdir)
-lilyout = ./$(depth)/lily/$(outdir)
-mi2muout = ./$(depth)/mi2mu/$(outdir)
-makeout = ./$(depth)/make/$(outdir)
-doc-dir = ./$(depth)/Documentation
-flower-dir = ./$(depth)/flower
-lib-dir = ./$(depth)/lib
-lily-dir = ./$(depth)/lily
-mi2mu-dir = ./$(depth)/mi2mu
-make-dir = ./$(depth)/make
-include-lib = ./$(depth)/lib/include
-include-flower = ./$(depth)/flower/include
-#
+
+flowerout = $(buildprefix)/flower/$(OUTDIR_NAME)
+libout = $(buildprefix)/lib/$(OUTDIR_NAME)
+lilyout = $(buildprefix)/lily/$(OUTDIR_NAME)
+mi2muout = $(buildprefix)/mi2mu/$(OUTDIR_NAME)
+makeout = $(buildprefix)/make/$(OUTDIR_NAME)
+docout = $(buildprefix)/Documentation/$(OUTDIR_NAME)
+binout = $(buildprefix)/bin/$(OUTDIR_NAME)
+
+doc-dir = $(depth)/Documentation
+flower-dir = $(depth)/flower
+lib-dir = $(depth)/lib
+lily-dir = $(depth)/lily
+mi2mu-dir = $(depth)/mi2mu
+make-dir = $(depth)/make
+include-lib = $(depth)/lib/include
+include-flower = $(depth)/flower/include
+
+
 rpm-sources = ${HOME}/rpms/SOURCES
 #
 
+include $(makeout)/Configure_variables.make
+
 # user settings:
 #
-include ./$(depth)/make/User.make
+include $(depth)/make/User.make
 #
 #
 # need to be defined in local Makefiles:
@@ -69,6 +85,7 @@ TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_
 # fix naming, use TOPLEVEL_ prefix _or_ MODULE?
 MODULE_DIST_NAME = $(MODULE_NAME)-$(VERSION)
 DIST_NAME = lilypond-$(TOPLEVEL_VERSION)
+NO_DOOS_DIST = bin flower lib lily make mi2mu out
 #
 
 # list of object files:
@@ -96,11 +113,6 @@ DUMMYDEPS=\
 ERROR_LOG = 2> /dev/null
 SILENT_LOG = 2>&1 >  /dev/null
 date = $(shell date +%x)
-allhh := $(shell $(FIND) ./ -name "*.hh" $(ERROR_LOG))
-allcc := $(shell $(FIND)  ./ -name "*.cc" $(ERROR_LOG))
-allobs := $(shell $(FIND) ./  $(outdir) -name "*.o" $(ERROR_LOG))
-
-alldeps := $(shell $(FIND)  ./ $(outdir) -name "*.dep" $(ERROR_LOG))
 
 # version stuff:
 #
@@ -111,8 +123,8 @@ mi2mu-version = $(mi2muout)/version.hh
 
 # custom libraries:
 #
-LIBFLOWER = $(depth)/flower/$(outdir)/$(LIB_PREFIX)flower$(LIB_SUFFIX)
-LIBLILY = $(depth)/lib/$(outdir)/$(LIB_PREFIX)lily$(LIB_SUFFIX)
+LIBFLOWER = $(flowerout)/$(LIB_PREFIX)flower$(LIB_SUFFIX)
+LIBLILY = $(libout)/$(LIB_PREFIX)lily$(LIB_SUFFIX)
 #
 
 # compile and link options:
@@ -130,7 +142,7 @@ EXTRA_CXXFLAGS= -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wconversio
 CXXFLAGS = $(CFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS)
 INCLUDES = -Iinclude -I$(outdir) -I$(include-lib) -I$(libout) -I$(include-flower) -I$(flowerout) 
 CXX_OUTPUT_OPTION = $< -o $@
-LDFLAGS = $(ILDFLAGS) $(USER_LDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) -L$(depth)/lib/out -L$(depth)/flower/out
+LDFLAGS = $(ILDFLAGS) $(USER_LDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) -L$(depth)/lib/$(OUTDIR_NAME) -L$(depth)/flower/$(OUTDIR_NAME)
 LOADLIBES = $(EXTRA_LIBES) $(MODULE_LIBES) -lg++ # need lg++ for win32, really!
 #
 
@@ -145,9 +157,6 @@ RANLIB_COMMAND=$(RANLIB) $@
 
 DO_CXX_COMPILE=$(DODEP)\
        $(CXX) -c $(CXXFLAGS) $(CXX_OUTPUT_OPTION) 
-# "CC = $(CC)"
-# "CXX = $(CXX)"
-#
 
 # linker:
 #
@@ -157,7 +166,7 @@ LD_COMMAND = $(LD) $(LDFLAGS) -o $@
 
 # dependencies:
 #
-depfile = ./$(depdir)/$(subst .o,.dep,$(notdir $@)) 
+depfile = $(depdir)/$(subst .o,.dep,$(notdir $@)) 
 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
 #
 
@@ -169,7 +178,12 @@ DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
 
 # generic target names:
 #
+ifdef NAME
 EXECUTABLE = $(outdir)/$(NAME)$(EXE)
+else
+EXECUTABLE =
+endif
+
 EXECUTABLES = $(EXECUTABLE)
 LIB_PREFIX = lib
 
@@ -187,8 +201,9 @@ DISTFILES=$(EXTRA_DISTFILES) Makefile $(ALL_SOURCES)
 DOCDIR=$(depth)/$(outdir)
 
 # .hh should be first. Don't know why
-# take some trouble to vauto ignore sources and obsolete stuff.
-progdocs=$(shell find ./ -name '*.hh' |egrep -v 'obsolete/|out/') $(shell find -name '*.cc'|egrep -v 'out/|obsolete/')
+# take some trouble to auto ignore sources and obsolete stuff.
+progdocs=$(shell $(FIND) ./ -name '*.hh' |egrep -v '$(OUTDIR_NAME)') \
+       $(shell $(FIND) ./ -name '*.cc' |egrep -v '$(OUTDIR_NAME)') \
 
 
 pod2html=pod2html
@@ -201,6 +216,10 @@ ifdef stablecc
  STABLEOBS=$(addprefix $(outdir)/,$(stablecc:.cc=.o))
 endif
 
-# substitute $(STRIP) if you want stripping
+# substitute $(STRIP) in Site.make if you want stripping
 DO_STRIP=true
 
+
+docxx-opts=-S -k -p
+docxx=doc++
+