2002-07-18 Jan Nieuwenhuizen <janneke@gnu.org>
+ * stepmake/stepmake/compile-vars.make:
+ * stepmake/stepmake/executable-rules.make:
+ * stepmake/stepmake/python-module-rules.make:
+ * stepmake/stepmake/shared-library-rules.make: Use ALL_LDFLAGS, to
+ guard agains user override of LDFLAGS.
+
* Documentation/user/refman.itely: Compile fix for \mark #'(music ...).
* Documentation/user/internals.itely: Use ly-set-mus-property!.
+++ /dev/null
-#!@SHELL@
-# walk.sh
-# ugh
-# print reversed relative path to $1
-
-function base ()
-{
- expr "$1" : "\(/[^/]*\)"
-}
-
-function unbase ()
-{
- expr "$1" : "/[^/]*\(.*\)"
-}
-
-function walk ()
-{
- if expr "$1" : '/' > /dev/null 2>&1; then
- c=../
- fi
- from=`(cd "$1" && pwd) | sed 's://*:/:g'`
- to=`pwd | sed 's://*:/:g'`
- t=`base "$to"`
- f=`base "$from"`
- while [ -n "$t" -a "$t" = "$f" ]; do
- to=`unbase "$to"`
- from=`unbase "$from"`
- t=`base "$to"`
- f=`base "$from"`
- done
- i=`echo $from | sed -e 's:[^/]\+:..:g'`
- i=`echo $i | sed -e 's:/[.][.]:..:'`
- echo $c$i$to
-}
-
-walk $1
-
# you do make dist
#
-
-# using src-depth iso depth is only necessary for broken rules that do
-# cd $(outdir) && foo $(depth) ...
buildscript-dir = $(src-depth)/buildscripts
script-dir = $(src-depth)/scripts
input-dir = $(src-depth)/input
ARFLAGS = ru
-LDFLAGS = $(ILDFLAGS) $(EXTRA_LDFLAGS) $($(PACKAGE)_LDFLAGS) $(MODULE_LDFLAGS) $(USER_LDFLAGS)
+ALL_LDFLAGS = $(LDFLAGS) $(ILDFLAGS) $(EXTRA_LDFLAGS) $($(PACKAGE)_LDFLAGS) $(MODULE_LDFLAGS) $(USER_LDFLAGS)
PIC_FLAGS = -fpic -fPIC
SHARED_FLAGS = -shared
$(EXECUTABLE): $(outdir)/config.h $(O_FILES) $(outdir)/version.hh
$(foreach a, $(MODULE_LIBS), $(MAKE) -C $(a) && ) true
- $(LD) -o $@ $(O_FILES) $(LOADLIBES) $(LDFLAGS)
+ $(LD) -o $@ $(O_FILES) $(LOADLIBES) $(ALL_LDFLAGS)
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)
+ifeq ($(srcdir),.)
+src-depth = $(depth)
+else
+src-depth = $(srcdir)
+endif
# derived names
ifeq ($(distdir),)
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
$(outdir)/%$(SHARED_LIB_SUFFIX): $(outdir)/%.lo
- $(LD) $(SHARED_FLAGS) -o $@ $< $(LDFLAGS)
+ $(LD) $(SHARED_FLAGS) -o $@ $< $(ALL_LDFLAGS)
$(SHARED_LIBRARY): $(outdir)/config.h $(LO_FILES)
- $(LD) $(SHARED_FLAGS) -o $@.$(VERSION) $(LO_FILES) $(LDFLAGS)
+ $(LD) $(SHARED_FLAGS) -o $@.$(VERSION) $(LO_FILES) $(ALL_LDFLAGS)
rm -f $@.$(MAJOR_VERSION)
ln -sf $(outdir)/$(LIB_PREFIX)$(NAME).so.$(VERSION) $@.$(MAJOR_VERSION)
rm -f $@