From c8089f8bf9d66c8428e8869895c61145ee4dd5e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Mon, 25 Mar 2002 11:15:27 +0000 Subject: [PATCH] makefile cleanup, and avoid some warnings git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3821 a592a061-630c-0410-9148-cb99ea01b6c8 --- Makefile.am | 2 +- config/common.am | 2 ++ lib/Makefile.am | 24 ++++++++++++------------ lib/reLyX/Makefile.am | 14 +++++++------- src/CutAndPaste.C | 2 +- src/Makefile.am | 6 +++++- src/buffer.C | 10 +++++----- src/frontends/Makefile.am | 2 ++ src/frontends/controllers/Makefile.am | 6 +++--- src/frontends/gnome/Makefile.am | 14 +++++++------- src/frontends/qt2/moc/Makefile.am | 12 ++++++------ src/frontends/qt2/ui/moc/Makefile.am | 11 +++++------ src/frontends/qt2/xforms/Makefile.am | 10 +++++----- src/frontends/xforms/Makefile.am | 12 ++++++------ src/graphics/Makefile.am | 2 +- src/insets/Makefile.am | 2 +- src/mathed/Makefile.am | 2 +- src/support/Makefile.am | 2 +- 18 files changed, 71 insertions(+), 64 deletions(-) diff --git a/Makefile.am b/Makefile.am index c31c76ceeb..7a24214553 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,7 +31,7 @@ dist-hook: rpmdist: dist ln -s lib/images/lyx.xpm . ; \ - rpm -ta ${PACKAGE}-${VERSION}.tar.gz ; saved_status=$$?; \ + rpm -ta $(PACKAGE)-$(VERSION).tar.gz ; saved_status=$$?; \ rm lyx.xpm; exit $$saved_status diff --git a/config/common.am b/config/common.am index 0f14f70ad6..f7eb781203 100644 --- a/config/common.am +++ b/config/common.am @@ -8,3 +8,5 @@ ETAGS_ARGS = --lang=c++ BOOST_INCLUDES = -I$(top_srcdir)/boost SIGC_INCLUDES = -I$(top_srcdir) -I$(top_builddir) + +LIBS = diff --git a/lib/Makefile.am b/lib/Makefile.am index bf7c43122c..a72ff9c144 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -52,37 +52,37 @@ libinstalldirs: install-xfonts: files=`sed -e 's/^\([^ ]*\) .*$$/\1/' xfonts/fonts.dir` ; \ - for i in $${files} ; do \ + for i in $$(files) ; do \ ln -sf `kpsewhich $$i` $(DESTDIR)$(pkgdatadir)/xfonts/$$i ; \ done $(INSTALL_DATA) xfonts/fonts.dir $(DESTDIR)$(pkgdatadir)/xfonts/fonts.dir $(INSTALL_DATA) xfonts/fonts.scale $(DESTDIR)$(pkgdatadir)/xfonts/fonts.scale install-data-local: libinstalldirs install-xfonts - files=`cd ${srcdir} ; echo $(LIBINSTFILES)` ; \ - for i in $${files} ; do \ - $(INSTALL_DATA) ${srcdir}/$$i $(DESTDIR)$(pkgdatadir)/$$i ; \ + files=`cd $(srcdir) ; echo $(LIBINSTFILES)` ; \ + for i in $$(files) ; do \ + $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgdatadir)/$$i ; \ done install-exec-local: libinstalldirs - files=`cd ${srcdir} ; echo $(LYXSCRIPTS)` ; \ - for i in $${files} ; do \ - $(INSTALL_SCRIPT) ${srcdir}/$$i $(DESTDIR)$(pkgdatadir)/$$i ; \ + files=`cd $(srcdir) ; echo $(LYXSCRIPTS)` ; \ + for i in $$(files) ; do \ + $(INSTALL_SCRIPT) $(srcdir)/$$i $(DESTDIR)$(pkgdatadir)/$$i ; \ done uninstall-local: @$(NORMAL_UNINSTALL) - files=`cd ${srcdir} ; echo $(LIBINSTFILES) $(LYXSCRIPTS)` ; \ - for i in $${files} ; do \ + files=`cd $(srcdir) ; echo $(LIBINSTFILES) $(LYXSCRIPTS)` ; \ + for i in $$(files) ; do \ rm -f $(pkgdatadir)/$$i ; \ done ; \ - dirs=`cd ${srcdir} ; echo $(LYXLIBDIRS)` ; \ - for i in $${dirs} ; do \ + dirs=`cd $(srcdir) ; echo $(LYXLIBDIRS)` ; \ + for i in $$(dirs) ; do \ rm -rf $(pkgdatadir)/$$i ; \ done dist-hook: - cd ${distdir} ; rm -rf `find . -name \*CVS\*` ; \ + cd $(distdir) ; rm -rf `find . -name \*CVS\*` ; \ rm -rf doc/.cvsignore; \ [ -f doc/UserGuide.lyx ] || { cvs -Q export -r HEAD -d doc lyxdoc || \ echo "WARNING: Unable to get LyX Documentation from CVS!" ; true ; } diff --git a/lib/reLyX/Makefile.am b/lib/reLyX/Makefile.am index d69ce56769..9171176874 100644 --- a/lib/reLyX/Makefile.am +++ b/lib/reLyX/Makefile.am @@ -23,18 +23,18 @@ libinstalldirs: done install-data-local: libinstalldirs - files=`cd ${srcdir} ; echo $(LIBINSTFILES)` ; \ - for i in $${files} ; do \ - $(INSTALL_DATA) ${srcdir}/$$i $(DESTDIR)$(pkgdatadir)/reLyX/$$i ; \ + files=`cd $(srcdir) ; echo $(LIBINSTFILES)` ; \ + for i in $$(files) ; do \ + $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgdatadir)/reLyX/$$i ; \ done uninstall-local: @$(NORMAL_UNINSTALL) - files=`cd ${srcdir} ; echo $(LIBINSTFILES)` ; \ - for i in $${files} ; do \ + files=`cd $(srcdir) ; echo $(LIBINSTFILES)` ; \ + for i in $$(files) ; do \ rm -f $(pkgdatadir)/reLyX/$$i ; \ done ; \ - dirs=`cd ${srcdir} ; echo $(LYXDATADIRS)` ; \ - for i in $${dirs} ; do \ + dirs=`cd $(srcdir) ; echo $(LYXDATADIRS)` ; \ + for i in $$(dirs) ; do \ rm -rf $(pkgdatadir)/$$i ; \ done diff --git a/src/CutAndPaste.C b/src/CutAndPaste.C index 4fd6363155..c6eec1d8b6 100644 --- a/src/CutAndPaste.C +++ b/src/CutAndPaste.C @@ -400,7 +400,7 @@ int CutAndPaste::nrOfParagraphs() int CutAndPaste::SwitchLayoutsBetweenClasses(textclass_type c1, textclass_type c2, Paragraph * par, - BufferParams const & bparams) + BufferParams const & /*bparams*/) { int ret = 0; if (!par || c1 == c2) diff --git a/src/Makefile.am b/src/Makefile.am index d42470bcb3..cecc43e101 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,6 +6,8 @@ MAINTAINERCLEANFILES += $(srcdir)/config.h.in SUBDIRS = mathed insets graphics support frontends +LIBS += @LIBS@ + bin_PROGRAMS = lyx LYX_CONV_LIBS = mathed/libmathed.la insets/libinsets.la \ @@ -16,7 +18,9 @@ LYX_CONV_LIBS = mathed/libmathed.la insets/libinsets.la \ #lyx_DEPENDENCIES = $(LYX_CONV_LIBS) $(INCLUDED_SIGC) lyx_LDADD = $(LYX_CONV_LIBS) $(SIGC_LIBS) $(INCLUDED_SIGC) @INTLLIBS@ \ - $(PSPELL_LIBS) @AIKSAURUS_LIBS@ @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@ + $(PSPELL_LIBS) @AIKSAURUS_LIBS@ + +# @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@ #lyx_LDFLAGS=-Wl,-O1 diff --git a/src/buffer.C b/src/buffer.C index 77a16b31c7..67ddc7672e 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -2880,13 +2880,13 @@ void reset(PAR_TAG & p1, PAR_TAG const & p2) p1 = static_cast(p1 & ~p2); } -} // namespace anon +} // anon // Handle internal paragraph parsing -- layout already processed. void Buffer::simpleLinuxDocOnePar(ostream & os, - Paragraph * par, - Paragraph::depth_type /*depth*/) + Paragraph * par, + Paragraph::depth_type /*depth*/) { LyXLayout const & style = textclasslist[params.textclass][par->layout()]; @@ -3078,8 +3078,8 @@ void Buffer::simpleLinuxDocOnePar(ostream & os, // Print an error message. -void Buffer::sgmlError(Paragraph * par, int pos, - string const & message) const +void Buffer::sgmlError(Paragraph * /*par*/, int /*pos*/, + string const & /*message*/) const { #warning This is wrong we cannot insert an inset like this!!! // I guess this was Jose' so I explain you more or less why this diff --git a/src/frontends/Makefile.am b/src/frontends/Makefile.am index a237643990..734dcaf7ff 100644 --- a/src/frontends/Makefile.am +++ b/src/frontends/Makefile.am @@ -4,6 +4,8 @@ SUBDIRS = controllers @FRONTEND@ noinst_LTLIBRARIES = libfrontends.la +LIBS += @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@ + INCLUDES = $(FRONTEND_INCLUDES) -I$(srcdir)/.. $(SIGC_CFLAGS) $(BOOST_INCLUDES) libfrontends_la_LIBADD= @FRONTEND_GUILIB@ \ diff --git a/src/frontends/controllers/Makefile.am b/src/frontends/controllers/Makefile.am index 38e84dd7f9..72cf929f7d 100644 --- a/src/frontends/controllers/Makefile.am +++ b/src/frontends/controllers/Makefile.am @@ -2,9 +2,9 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libcontrollers.la -INCLUDES = -I${top_srcdir}/src/ \ - -I${top_srcdir}/src/frontends/ \ - ${SIGC_CFLAGS} $(BOOST_INCLUDES) +INCLUDES = -I$(top_srcdir)/src/ \ + -I$(top_srcdir)/src/frontends/ \ + $(SIGC_CFLAGS) $(BOOST_INCLUDES) EXTRA_DIST = ButtonController.tmpl ControlDialog.tmpl ControlInset.tmpl diff --git a/src/frontends/gnome/Makefile.am b/src/frontends/gnome/Makefile.am index 8cf3771380..6c7a11a751 100644 --- a/src/frontends/gnome/Makefile.am +++ b/src/frontends/gnome/Makefile.am @@ -2,11 +2,11 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libgnome.la -INCLUDES = ${FRONTEND_INCLUDES} -I${top_srcdir}/src/ \ - -I${top_srcdir}/src/frontends/ \ - -I${top_srcdir}/src/frontends/xforms \ - -I${top_srcdir}/src/frontends/controllers \ - ${SIGC_CFLAGS} $(BOOST_INCLUDES) +INCLUDES = $(FRONTEND_INCLUDES) -I$(top_srcdir)/src/ \ + -I$(top_srcdir)/src/frontends/ \ + -I$(top_srcdir)/src/frontends/xforms \ + -I$(top_srcdir)/src/frontends/controllers \ + $(SIGC_CFLAGS) $(BOOST_INCLUDES) if USE_BASIC_IMAGE_LOADER else @@ -41,7 +41,7 @@ xforms_objects = \ ../xforms/Tooltips.lo \ ../xforms/xforms_helpers.lo \ ../xforms/xformsBC.lo \ - $(XFORMSGIMAGE) + $(XFORMSGIMAGE) libgnome.la: xforms.lo $(libgnome_la_OBJECTS) $(libgnome_la_DEPENDENCIES) @@ -53,7 +53,7 @@ xforms.lo: $(xforms_objects) ### #LDFLAGS= $(libgnome_la_OBJADD) -LYXDATADIRS = +LYXDATADIRS = libgnome_la_SOURCES = \ Dialogs.C \ diff --git a/src/frontends/qt2/moc/Makefile.am b/src/frontends/qt2/moc/Makefile.am index 5a5f682cac..62a21a667e 100644 --- a/src/frontends/qt2/moc/Makefile.am +++ b/src/frontends/qt2/moc/Makefile.am @@ -4,12 +4,12 @@ DISTCLEANFILES += $(libqt2moc_la_SOURCES) noinst_LTLIBRARIES = libqt2moc.la -INCLUDES = -I${top_srcdir}/src/ \ - -I${top_srcdir}/src/frontends/ \ - -I${top_srcdir}/src/frontends/controllers \ - -I${top_builddir}/src/frontends/qt2 \ - ${SIGC_CFLAGS} \ - ${FRONTEND_INCLUDES} \ +INCLUDES = -I$(top_srcdir)/src/ \ + -I$(top_srcdir)/src/frontends/ \ + -I$(top_srcdir)/src/frontends/controllers \ + -I$(top_builddir)/src/frontends/qt2 \ + $(SIGC_CFLAGS) \ + $(FRONTEND_INCLUDES) \ $(BOOST_INCLUDES) AM_CXXFLAGS = -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR diff --git a/src/frontends/qt2/ui/moc/Makefile.am b/src/frontends/qt2/ui/moc/Makefile.am index 26da688932..20d1143eab 100644 --- a/src/frontends/qt2/ui/moc/Makefile.am +++ b/src/frontends/qt2/ui/moc/Makefile.am @@ -4,11 +4,11 @@ DISTCLEANFILES += $(libqt2uimoc_la_SOURCES) noinst_LTLIBRARIES = libqt2uimoc.la -INCLUDES = -I${top_srcdir}/src/ \ - -I${top_srcdir}/src/frontends/ \ - -I${top_srcdir}/src/frontends/controllers \ - ${SIGC_CFLAGS} \ - ${FRONTEND_INCLUDES} \ +INCLUDES = -I$(top_srcdir)/src/ \ + -I$(top_srcdir)/src/frontends/ \ + -I$(top_srcdir)/src/frontends/controllers \ + $(SIGC_CFLAGS) \ + $(FRONTEND_INCLUDES) \ $(BOOST_INCLUDES) AM_CXXFLAGS = -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR @@ -21,4 +21,3 @@ libqt2uimoc.la: $(libqt2uimoc_la_OBJECTS) $(libqt2uimoc_la_DEPENDENCIES) %_moc.C: ../%.h $(MOC) -o $@ $< - diff --git a/src/frontends/qt2/xforms/Makefile.am b/src/frontends/qt2/xforms/Makefile.am index 10672a7caf..a834e9ccdc 100644 --- a/src/frontends/qt2/xforms/Makefile.am +++ b/src/frontends/qt2/xforms/Makefile.am @@ -2,9 +2,9 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libqt2xforms.la -INCLUDES = -I${top_srcdir}/src/ -I${top_srcdir}/src/frontends/ \ - ${SIGC_CFLAGS} -I$(top_srcdir)/images \ - ${FRONTEND_INCLUDES} $(BOOST_INCLUDES) \ +INCLUDES = -I$(top_srcdir)/src/ -I$(top_srcdir)/src/frontends/ \ + $(SIGC_CFLAGS) -I$(top_srcdir)/images \ + $(FRONTEND_INCLUDES) $(BOOST_INCLUDES) \ -I$(top_srcdir)/src/frontends/controllers EXTRA_DIST = xformsGImage.C xformsGImage.h @@ -92,5 +92,5 @@ libqt2xforms.la: link_files $(libqt2xforms_la_OBJECTS) link_files: for i in $(libqt2xforms_la_SOURCES); do \ - ln -sf "${top_srcdir}/src/frontends/xforms/$$i" . ; \ - done + ln -sf "$(top_srcdir)/src/frontends/xforms/$$i" . ; \ + done diff --git a/src/frontends/xforms/Makefile.am b/src/frontends/xforms/Makefile.am index 9da6c59fee..0a292488c2 100644 --- a/src/frontends/xforms/Makefile.am +++ b/src/frontends/xforms/Makefile.am @@ -2,10 +2,10 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libxforms.la -INCLUDES = -I${top_srcdir}/images -I${top_srcdir}/src/ \ - -I${top_srcdir}/src/frontends/ \ - -I${top_srcdir}/src/frontends/controllers \ - ${SIGC_CFLAGS} $(BOOST_INCLUDES) +INCLUDES = -I$(top_srcdir)/images -I$(top_srcdir)/src/ \ + -I$(top_srcdir)/src/frontends/ \ + -I$(top_srcdir)/src/frontends/controllers \ + $(SIGC_CFLAGS) $(BOOST_INCLUDES) LYXDATADIRS = forms @@ -16,7 +16,7 @@ else XFORMSGIMAGE = xformsGImage.C xformsGImage.h endif -# Alphabetical order please. It makes it easier to figure out what's missing. +# Alphabetical order please. It makes it easier to figure out what's missing. libxforms_la_SOURCES = \ Alert_pimpl.C \ bmtable.c \ @@ -225,7 +225,7 @@ libxforms.la: $(libxforms_la_OBJECTS) $(libxforms_la_DEPENDENCIES) # for convenience only updatesrc: $(MAKE) -C forms updatesrc - + # just copied from old lyx repository dist-hook: for subdir in $(LYXDATADIRS) ; do \ diff --git a/src/graphics/Makefile.am b/src/graphics/Makefile.am index 51e9c966ff..2d68913eb5 100644 --- a/src/graphics/Makefile.am +++ b/src/graphics/Makefile.am @@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libgraphics.la -INCLUDES = -I${srcdir}/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES) +INCLUDES = -I$(srcdir)/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES) EXTRA_DIST = GraphicsImageXPM.C GraphicsImageXPM.h diff --git a/src/insets/Makefile.am b/src/insets/Makefile.am index 615dad63af..8817b75e06 100644 --- a/src/insets/Makefile.am +++ b/src/insets/Makefile.am @@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libinsets.la -INCLUDES = -I${srcdir}/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES) +INCLUDES = -I$(srcdir)/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES) EXTRA_DIST = \ insetlist.C \ diff --git a/src/mathed/Makefile.am b/src/mathed/Makefile.am index aa7664df5e..2013797755 100644 --- a/src/mathed/Makefile.am +++ b/src/mathed/Makefile.am @@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libmathed.la -INCLUDES = -I${srcdir}/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES) +INCLUDES = -I$(srcdir)/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES) libmathed_la_SOURCES = \ textpainter.C \ diff --git a/src/support/Makefile.am b/src/support/Makefile.am index 247976880c..5633ecfaa4 100644 --- a/src/support/Makefile.am +++ b/src/support/Makefile.am @@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libsupport.la -INCLUDES = -I${srcdir}/../ $(SIGC_INCLUDES) $(BOOST_INCLUDES) +INCLUDES = -I$(srcdir)/../ $(SIGC_INCLUDES) $(BOOST_INCLUDES) EXTRA_DIST = lyxstring.C lyxstring.h regex.c lyxregex.h \ os_unix.C os_win32.C os_os2.C