[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: makefile changes for lilypond shared lib
From: |
Nicolas Sceaux |
Subject: |
Re: makefile changes for lilypond shared lib |
Date: |
Sat, 26 Jun 2004 03:07:27 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Nicolas Sceaux <address@hidden> writes:
> Jan Nieuwenhuizen <address@hidden> writes:
>
>> Ok. Actually I was fishing for patches.
>
> ho, hum, now I'm confused (not for the first time these days).
>
>> Didn't you have something
>> useful already? We could just open a CVS branch to experiment on.
The attached patch might give a start. "libtoolize --force --copy" has
to be run in order to update the config.guess, config.sub and
ltmain.sh files. Also, a libtool.m4 should be copied in stepmake/.
I have not looked at install rules.
Beware, I'm a complete newbie with libtool. I hope someone more
experienced will correct all that.
Index: config.make.in
===================================================================
RCS file: /cvsroot/lilypond/lilypond/config.make.in,v
retrieving revision 1.63
diff -u -r1.63 config.make.in
--- config.make.in 17 Jun 2004 00:17:57 -0000 1.63
+++ config.make.in 26 Jun 2004 00:26:25 -0000
@@ -106,3 +106,10 @@
ZIP = @ZIP@
PAPERSIZE=a4
+
+#LIBTOOL = @LIBTOOL@
+LIBTOOL = $(SHELL) $(builddir)/libtool
+LIBTOOL_CC = $(LIBTOOL) --mode=compile $(CC)
+LIBTOOL_CXX = $(LIBTOOL) --mode=compile $(CXX)
+LIBTOOL_LINK = $(LIBTOOL) --mode=link $(CXX)
+
Index: configure.in
===================================================================
RCS file: /cvsroot/lilypond/lilypond/configure.in,v
retrieving revision 1.113
diff -u -r1.113 configure.in
--- configure.in 20 Jun 2004 19:53:34 -0000 1.113
+++ configure.in 26 Jun 2004 00:26:25 -0000
@@ -13,6 +13,8 @@
STEPMAKE_INIT
+AC_PROG_LIBTOOL
+
# List a file that identifies your package.
Index: lily/GNUmakefile
===================================================================
RCS file: /cvsroot/lilypond/lilypond/lily/GNUmakefile,v
retrieving revision 1.30
diff -u -r1.30 GNUmakefile
--- lily/GNUmakefile 7 Mar 2004 13:07:29 -0000 1.30
+++ lily/GNUmakefile 26 Jun 2004 00:28:17 -0000
@@ -10,7 +10,7 @@
HELP2MAN_EXECS = lilypond-bin
-STEPMAKE_TEMPLATES= c++ executable po help2man
+STEPMAKE_TEMPLATES= c++ shared-library executable po help2man
include $(depth)/make/stepmake.make
@@ -33,6 +33,14 @@
$(outdir)/lily-guile.o: $(outdir)/version.hh
$(outdir)/lily-version.o: $(outdir)/version.hh
+$(outdir)/my-lily-parser.lo: $(outdir)/parser.hh
+$(outdir)/my-lily-lexer.lo: $(outdir)/parser.hh
+$(outdir)/lexer.lo: $(outdir)/parser.hh $(outdir)/version.hh
+
+$(outdir)/kpath.lo: $(outdir)/version.hh
+$(outdir)/lily-guile.lo: $(outdir)/version.hh
+$(outdir)/lily-version.lo: $(outdir)/version.hh
+
# ugh. For --srcdir builds, these must exist to satisfy their broken
# lexer.dep and parser.dep file entries.
ifneq ($(srcdir), .)
Index: stepmake/aclocal.m4
===================================================================
RCS file: /cvsroot/lilypond/lilypond/stepmake/aclocal.m4,v
retrieving revision 1.111
diff -u -r1.111 aclocal.m4
--- stepmake/aclocal.m4 17 Jun 2004 00:17:57 -0000 1.111
+++ stepmake/aclocal.m4 26 Jun 2004 00:32:04 -0000
@@ -1,6 +1,9 @@
dnl aclocal.m4 -*-shell-script-*-
dnl StepMake subroutines for configure.in
+### for using libtool
+sinclude(libtool.m4)
+sinclude(stepmake/libtool.m4)
### mostly interal macros
Index: stepmake/stepmake/c++-rules.make
===================================================================
RCS file: /cvsroot/lilypond/lilypond/stepmake/stepmake/c++-rules.make,v
retrieving revision 1.9
diff -u -r1.9 c++-rules.make
--- stepmake/stepmake/c++-rules.make 18 Sep 2003 10:05:05 -0000 1.9
+++ stepmake/stepmake/c++-rules.make 26 Jun 2004 00:32:19 -0000
@@ -1,16 +1,17 @@
.SUFFIXES: .cc .dep .hh .ll .o .so .yy
-$(outdir)/%.o: %.cc
- $(DO_O_DEP) $(CXX) -c $(ALL_CXXFLAGS) -o $@ $<
-
-$(outdir)/%.o: $(outdir)/%.cc
- $(DO_O_DEP) $(CXX) -c $(ALL_CXXFLAGS) -o $@ $<
-
$(outdir)/%.lo: %.cc
- $(DO_LO_DEP) $(CXX) -c $(ALL_CXXFLAGS) $(PIC_FLAGS) -o $@ $<
+ $(DO_O_DEP) $(LIBTOOL_CXX) -c $(ALL_CXXFLAGS) -o $(@:.lo=.o) $<
$(outdir)/%.lo: $(outdir)/%.cc
- $(DO_LO_DEP) $(CXX) -c $(ALL_CXXFLAGS) $(PIC_FLAGS) -o $@ $<
+ $(DO_O_DEP) $(LIBTOOL_CXX) -c $(ALL_CXXFLAGS) -o $(@:.lo=.o) $<
+
+
+$(outdir)/%.o: %.cc
+ $(DO_O_DEP) $(LIBTOOL_CXX) -c $(ALL_CXXFLAGS) -o $@ $<
+
+$(outdir)/%.o: $(outdir)/%.cc
+ $(DO_O_DEP) $(LIBTOOL_CXX) -c $(ALL_CXXFLAGS) -o $@ $<
$(outdir)/%.cc: %.yy
$(BISON) -o $@ $<
Index: stepmake/stepmake/c++-vars.make
===================================================================
RCS file: /cvsroot/lilypond/lilypond/stepmake/stepmake/c++-vars.make,v
retrieving revision 1.14
diff -u -r1.14 c++-vars.make
--- stepmake/stepmake/c++-vars.make 7 Mar 2004 13:07:28 -0000 1.14
+++ stepmake/stepmake/c++-vars.make 26 Jun 2004 00:32:19 -0000
@@ -18,6 +18,7 @@
ALL_CC_SOURCES += $(HH_FILES) $(INL_FILES) $(CC_FILES) $(YY_FILES) $(LL_FILES)
O_FILES+=$(addprefix $(outdir)/, $(CC_FILES:.cc=.o) $(LL_FILES:.ll=.o)
$(YY_FILES:.yy=.o))
+LO_FILES+=$(addprefix $(outdir)/, $(CC_FILES:.cc=.lo) $(LL_FILES:.ll=.lo)
$(YY_FILES:.yy=.lo))
TAGS_SOURCES += $(TCC_FILES) $(INL_FILES) $(CC_FILES) $(YY_FILES) $(LL_FILES)
TAGS_HEADERS += $(HH_FILES) $(INL_FILES)
Index: stepmake/stepmake/c-rules.make
===================================================================
RCS file: /cvsroot/lilypond/lilypond/stepmake/stepmake/c-rules.make,v
retrieving revision 1.7
diff -u -r1.7 c-rules.make
--- stepmake/stepmake/c-rules.make 18 Sep 2003 10:05:05 -0000 1.7
+++ stepmake/stepmake/c-rules.make 26 Jun 2004 00:32:19 -0000
@@ -1,16 +1,10 @@
.SUFFIXES: .c .dep .h .l .lo .o .so .y
$(outdir)/%.o: %.c
- $(DO_O_DEP) $(CC) -c $(ALL_CFLAGS) -o $@ $<
+ $(DO_O_DEP) $(LIBTOOL_CC) -c $(ALL_CFLAGS) -o $@ $<
$(outdir)/%.o: $(outdir)/%.c
- $(DO_O_DEP) $(CC) -c $(ALL_CFLAGS) -o $@ $<
-
-$(outdir)/%.lo: %.c
- $(DO_LO_DEP) $(CC) -c $(ALL_CFLAGS) $(PIC_FLAGS) -o $@ $<
-
-$(outdir)/%.lo: %.c
- $(DO_LO_DEP) $(CC) -c $(ALL_CFLAGS) $(PIC_FLAGS) -o $@ $<
+ $(DO_O_DEP) $(LIBTOOL_CC) -c $(ALL_CFLAGS) -o $@ $<
$(outdir)/%.c: %.y
$(BISON) $<
Index: stepmake/stepmake/c-vars.make
===================================================================
RCS file: /cvsroot/lilypond/lilypond/stepmake/stepmake/c-vars.make,v
retrieving revision 1.8
diff -u -r1.8 c-vars.make
--- stepmake/stepmake/c-vars.make 7 Mar 2004 13:07:28 -0000 1.8
+++ stepmake/stepmake/c-vars.make 26 Jun 2004 00:32:19 -0000
@@ -8,6 +8,7 @@
SOURCE_FILES+=$(Y_FILES) $(C_FILES) $(L_FILES) $(H_FILES)
O_FILES+=$(addprefix $(outdir)/, $(Y_FILES:.y=.o) $(C_FILES:.c=.o)
$(L_FILES:.l=.o))
+LO_FILES+=$(addprefix $(outdir)/, $(Y_FILES:.y=.lo) $(C_FILES:.c=.lo)
$(L_FILES:.l=.lo))
TAGS_SOURCES += $(C_FILES)
TAGS_HEADERS += $(H_FILES)
Index: stepmake/stepmake/executable-rules.make
===================================================================
RCS file: /cvsroot/lilypond/lilypond/stepmake/stepmake/executable-rules.make,v
retrieving revision 1.4
diff -u -r1.4 executable-rules.make
--- stepmake/stepmake/executable-rules.make 18 Jul 2002 00:36:15 -0000
1.4
+++ stepmake/stepmake/executable-rules.make 26 Jun 2004 00:32:19 -0000
@@ -1,4 +1,4 @@
$(EXECUTABLE): $(outdir)/config.h $(O_FILES) $(outdir)/version.hh
$(foreach a, $(MODULE_LIBS), $(MAKE) -C $(a) && ) true
- $(LD) -o $@ $(O_FILES) $(LOADLIBES) $(ALL_LDFLAGS)
+ $(LIBTOOL_LINK) -o $@ $(O_FILES) $(LOADLIBES) $(ALL_LDFLAGS)
Index: stepmake/stepmake/executable-vars.make
===================================================================
RCS file: /cvsroot/lilypond/lilypond/stepmake/stepmake/executable-vars.make,v
retrieving revision 1.8
diff -u -r1.8 executable-vars.make
--- stepmake/stepmake/executable-vars.make 20 Sep 2001 21:49:23 -0000
1.8
+++ stepmake/stepmake/executable-vars.make 26 Jun 2004 00:32:19 -0000
@@ -1,4 +1,4 @@
-MODULE_LIBES =$(addprefix $(outdir)/../, $(addsuffix /$(outbase)/library.a,
$(MODULE_LIBS)))
+MODULE_LIBES =$(addprefix $(outdir)/../, $(addsuffix /$(outbase)/libflower.la,
$(MODULE_LIBS)))
LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES)
EXECUTABLE = $(outdir)/$(NAME)
Index: stepmake/stepmake/library-rules.make
===================================================================
RCS file: /cvsroot/lilypond/lilypond/stepmake/stepmake/library-rules.make,v
retrieving revision 1.3
diff -u -r1.3 library-rules.make
--- stepmake/stepmake/library-rules.make 11 Feb 2004 15:11:02 -0000
1.3
+++ stepmake/stepmake/library-rules.make 26 Jun 2004 00:32:19 -0000
@@ -1,8 +1,7 @@
-$(LIBRARY): $(outdir)/config.h $(O_FILES)
- $(AR) $(ARFLAGS) $@ $(O_FILES)
-# thanks to Nelson Beebe for this trick.
- $(RANLIB) $@ || $(AR) ts $@ || true
+$(LIBRARY): $(outdir)/config.h $(LO_FILES)
+ $(LIBTOOL_LINK) -o $@ $(LO_FILES) $(ALL_LDFLAGS)
+
Index: stepmake/stepmake/library-vars.make
===================================================================
RCS file: /cvsroot/lilypond/lilypond/stepmake/stepmake/library-vars.make,v
retrieving revision 1.3
diff -u -r1.3 library-vars.make
--- stepmake/stepmake/library-vars.make 20 Sep 2001 21:49:23 -0000 1.3
+++ stepmake/stepmake/library-vars.make 26 Jun 2004 00:32:19 -0000
@@ -1,8 +1,7 @@
LIB_PREFIX = lib
-LIB_SUFFIX = .a
+LIB_SUFFIX = .la
AR=ar
-# LIBRARY = $(outdir)/$(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
-LIBRARY = $(outdir)/$(LIB_PREFIX)rary$(LIB_SUFFIX)
INSTALL_LIBRARY = $(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
+LIBRARY = $(outdir)/$(INSTALL_LIBRARY)
Index: stepmake/stepmake/shared-library-rules.make
===================================================================
RCS file:
/cvsroot/lilypond/lilypond/stepmake/stepmake/shared-library-rules.make,v
retrieving revision 1.3
diff -u -r1.3 shared-library-rules.make
--- stepmake/stepmake/shared-library-rules.make 9 Aug 2002 12:39:27 -0000
1.3
+++ stepmake/stepmake/shared-library-rules.make 26 Jun 2004 00:32:19 -0000
@@ -1,4 +1,4 @@
-$(SHARED_LIBRARY): $(outdir)/config.h $(LO_FILES)
- $(LD) $(SHARED_FLAGS) -o $@ $(LO_FILES) $(ALL_LDFLAGS)
+$(LIBRARY): $(outdir)/config.h $(LO_FILES)
+ $(LIBTOOL_LINK) -o $@ $(LO_FILES) $(SHARED_LIB_LOADLIBES)
$(ALL_LDFLAGS) -rpath $(libdir) -release $(VERSION)
Index: stepmake/stepmake/shared-library-targets.make
===================================================================
RCS file:
/cvsroot/lilypond/lilypond/stepmake/stepmake/shared-library-targets.make,v
retrieving revision 1.2
diff -u -r1.2 shared-library-targets.make
--- stepmake/stepmake/shared-library-targets.make 9 Aug 2002 12:39:27
-0000 1.2
+++ stepmake/stepmake/shared-library-targets.make 26 Jun 2004 00:32:19
-0000
@@ -1,4 +1,4 @@
-default: $(SHARED_LIBRARY)
+lib: $(LIBRARY)
-$(SHARED_LIB_PREFIX)$(NAME): default
\ No newline at end of file
+$(SHARED_LIB_PREFIX)$(NAME): lib
Index: stepmake/stepmake/shared-library-vars.make
===================================================================
RCS file:
/cvsroot/lilypond/lilypond/stepmake/stepmake/shared-library-vars.make,v
retrieving revision 1.2
diff -u -r1.2 shared-library-vars.make
--- stepmake/stepmake/shared-library-vars.make 9 Aug 2002 12:39:27 -0000
1.2
+++ stepmake/stepmake/shared-library-vars.make 26 Jun 2004 00:32:19 -0000
@@ -15,9 +15,7 @@
INSTALL_SHARED_LIBRARY =
$(SHARED_LIB_PREFIX)$(NAME)$(SHARED_LIB_SUFFIX)$(SHARED_LIB_VERSION)$(SHARED_LIB_VERSION_SUFFIX)
SHARED_LIBRARY = $(outdir)/$(INSTALL_SHARED_LIBRARY)
+LIBRARY = $(outdir)/lib$(NAME).la
-lo-dep-out = $(outdir)/$(subst .lo,.dep,$(notdir $@))#
-DO_LO_DEP = rm -f $(lo-dep-out); DEPENDENCIES_OUTPUT="$(lo-dep-out)
$(outdir)/$(notdir $@)"
-
-LO_FILES += $(addprefix $(outdir)/, $(Y_FILES:.y=.lo) $(C_FILES:.c=.lo)
$(L_FILES:.l=.lo))
-
+SHARED_LIB_MODULE_LIBES =$(addprefix $(outdir)/../, $(addsuffix
/$(outbase)/libflower.la, $(MODULE_LIBS)))
+SHARED_LIB_LOADLIBES = $(SHARED_LIB_MODULE_LIBES) $($(PACKAGE)_LIBES)
$(EXTRA_LIBES)
nicolas
- Re: makefile changes for lilypond shared lib, Jan Nieuwenhuizen, 2004/06/23
- Re: makefile changes for lilypond shared lib, Nicolas Sceaux, 2004/06/23
- Re: makefile changes for lilypond shared lib, Jan Nieuwenhuizen, 2004/06/24
- Re: makefile changes for lilypond shared lib, Nicolas Sceaux, 2004/06/25
- Re: makefile changes for lilypond shared lib,
Nicolas Sceaux <=
- Re: makefile changes for lilypond shared lib, Jan Nieuwenhuizen, 2004/06/26
- Re: makefile changes for lilypond shared lib, Nicolas Sceaux, 2004/06/26
- Re: makefile changes for lilypond shared lib, Jan Nieuwenhuizen, 2004/06/28
- Re: makefile changes for lilypond shared lib, Nicolas Sceaux, 2004/06/28
- Re: makefile changes for lilypond shared lib, Jan Nieuwenhuizen, 2004/06/28
- Re: makefile changes for lilypond shared lib, Nicolas Sceaux, 2004/06/29
- Re: makefile changes for lilypond shared lib, Nicolas Sceaux, 2004/06/29
- Re: makefile changes for lilypond shared lib, Nicolas Sceaux, 2004/06/29
- Re: makefile changes for lilypond shared lib, Jan Nieuwenhuizen, 2004/06/29