Skip to content
Permalink
Browse files
- s/config.h/qgsconfig.h [0]
- qgsconfig.h now has header sentinals

- now will install headers in $(prefix)/qgis/include and libqis.* library in
  $(prefix)/lib [1]

- "src/Makefile" no longer relies on explicit dependencies and uses better
  naming scheme for created source files [2]

Notes:

[0] To eliminate any file namespace collisions.  Unfortunately there will
    still be some macro name collisions.  These are harmless, though annoying.
    What needs to happen is that all header file references to "qgsconfig.h"
    be moved to implementation files, thus breaking any include dependencies
    for external software.

[1] There currently does not exist a way to make this optional; these will
    always install.  In the future, this might be something toggleable by a
    configure script option.  Moreover, there does not currently exist a
    "qgis-config" script for getting command line options for external,
    dependant software; there might be one in a future release.

    I decided to err on including too many header files; almost certainly some
    of the header files that are currently installed can be culled from the
    "to install" list.

    The new make file has two targets: the old qgis application target, and a
    second one for the library.  As plug-ins are developed, there may be a
    need to add more source files to the library to link against.  I just
    added in the bare minimum for the current set of plug-ins.  If more
    sources need to be added, just add them to libqgis_la_SOURCES, near the
    bottom of  "src/Makefile.am".

[2] All *.ui files will create corresponding *.uic.h and *.uic.cpp files.
    Since these also need MOC files, *.moc.uic.cpp files are also
    automatically created.


git-svn-id: http://svn.osgeo.org/qgis/trunk@1056 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mcoletti committed Mar 22, 2004
1 parent 9e7c4fd commit 27740e4155558997c475946796f394f44f190a7f
@@ -2,7 +2,7 @@
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

@@ -313,7 +313,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) year name of author
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@@ -22,6 +22,8 @@ EXTRA_DIST = doc \

SUBDIRS = src providers plugins doc

pkginclude_HEADERS = qgsconfig.h

release: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(AMTAR)$(TAR) chozf $(distdir).tar.gz $(distdir)
@@ -1,11 +1,20 @@
dnl Process this file with autoconf to produce a configure script.
dnl configure.in,v 1.28 2004/03/12 16:44:41 gsherman Exp
dnl configure.in,v 1.29 2004/03/22 20:00:54 mcoletti Exp

AC_INIT

#AC_CONFIG_SRCDIR([libtool])

AC_CONFIG_HEADERS([config.h])
dnl header sentinals for qgsconfig.h
AH_TOP(
[#ifndef QGSCONFIG_H
#define QGSCONFIG_H
])
AH_BOTTOM(
[#endif]
)

AC_CONFIG_HEADERS([qgsconfig.h])

dnl ---------------------------------------------------------------------------
dnl version number
59 depcomp
@@ -206,6 +206,44 @@ aix)
rm -f "$tmpdepfile"
;;

icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...

"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;

tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -265,9 +303,7 @@ dashmstdout)
shift
fi

# Remove `-o $object'. We will use -o /dev/null later,
# however we can't do the remplacement now because
# `-o $object' might simply not be used
# Remove `-o $object'.
IFS=" "
for arg
do
@@ -287,7 +323,11 @@ dashmstdout)
done

test -z "$dashmflag" && dashmflag=-M
"$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
@@ -306,6 +346,13 @@ dashXmstdout)

makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
@@ -318,7 +365,9 @@ makedepend)
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
-*)
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
@@ -1,19 +1,37 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
@@ -221,8 +239,8 @@ else

# Make a couple of temp file names in the proper directory.

dsttmp=$dstdir/#inst.$$#
rmtmp=$dstdir/#rm.$$#
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_

# Trap to clean up temp files at exit.

@@ -1,3 +1,5 @@
## Makefile.in generated from automake

if HAVE_SPIT
SPIT = spit
endif
@@ -8,24 +10,27 @@ endif

SUBDIRS = $(GEOPROCESSING) $(SPIT) delimited_text

EXTRA_DIST = qgisplugin.h \
plugin_builder.pl \
plugin_template/icon.xpm \
plugin_template/Makefile.am \
plugin_template/plugin.cpp \
plugin_template/pluginguibase.ui \
plugin_template/pluginguibase.ui.h \
plugin_template/plugingui.cpp \
plugin_template/plugingui.h \
plugin_template/plugin.h \
plugin_template/README \
maplayer/Makefile.am \
maplayer/Makefile.in \
maplayer/maplayertest.cpp \
maplayer/maplayertest.h \
maplayer/matrix1.xpm \
example/Makefile.am \
example/Makefile.in \
example/exampleplugin.cpp \
example/exampleplugin.h \
example/matrix1.xpm
EXTRA_DIST = qgisplugin.h \
plugin_builder.pl \
plugin_template/icon.xpm \
plugin_template/Makefile.am \
plugin_template/plugin.cpp \
plugin_template/pluginguibase.ui \
plugin_template/pluginguibase.ui.h \
plugin_template/plugingui.cpp \
plugin_template/plugingui.h \
plugin_template/plugin.h \
plugin_template/README \
maplayer/Makefile.am \
maplayer/Makefile.in \
maplayer/maplayertest.cpp \
maplayer/maplayertest.h \
maplayer/matrix1.xpm \
example/Makefile.am \
example/Makefile.in \
example/exampleplugin.cpp \
example/exampleplugin.h \
example/matrix1.xpm


pkginclude_HEADERS=qgisplugin.h
@@ -10,9 +10,10 @@
#
# $Id$

AM_CXXFLAGS := $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(QT_CXXFLAGS) $(DEBUG_QGIS) -I../../src/

plugindir = ${pkglibdir}
#DelimitedTextLayer below to be replaced with the name of the plugin
plugin_LTLIBRARIES = delimitedtextlayerplugin.la


%.moc.cpp: %.h
$(MOC) -o $@ $<
@@ -23,33 +24,31 @@ plugin_LTLIBRARIES = delimitedtextlayerplugin.la
%.cpp: %.ui
$(UIC) -o $@ -impl $*.h $<

delimitedtextlayerplugin_la_SOURCES = qgsdelimitedtextplugin.cpp \
qgsdelimitedtextplugin.h \
qgsdelimitedtextplugingui.cpp \
qgsdelimitedtextplugingui.h \
../../src/qgsmaplayer.cpp\
../../src/qgsvectorlayer.cpp\
../../src/qgssymbol.cpp\
$(plugin_UI)\
$(plugin_MOC)

plugin_MOC = qgsdelimitedtextplugin.moc.cpp \
../../src/qgsmaplayer.moc.cpp \
../../src/qgsvectorlayer.moc.cpp \
qgsdelimitedtextplugingui.moc.cpp \

# DelimitedTextLayer below to be replaced with the name of the plugin
plugin_LTLIBRARIES = delimitedtextlayerplugin.la

plugin_MOC = qgsdelimitedtextplugin.moc.cpp \
qgsdelimitedtextplugingui.moc.cpp \
qgsdelimitedtextpluginguibase.moc.cpp

plugin_UI = qgsdelimitedtextpluginguibase.h \
plugin_UI = qgsdelimitedtextpluginguibase.h \
qgsdelimitedtextpluginguibase.cpp

plugin_UIC = qgsdelimitedtextpluginguibase.ui

delimitedtextlayerplugin_la_SOURCES = qgsdelimitedtextplugin.cpp \
qgsdelimitedtextplugin.h \
qgsdelimitedtextplugingui.cpp \
qgsdelimitedtextplugingui.h \
$(plugin_UI) \
$(plugin_MOC)

BUILT_SOURCES = $(plugin_MOC) $(plugin_UI)

AM_CXXFLAGS := $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(QT_CXXFLAGS) $(DEBUG_QGIS)

delimitedtextlayerplugin_la_LIBADD = $(QT_LDADD)

delimitedtextlayerplugin_la_LIBADD = $(QT_LDADD) ../../src/libqgis.la
delimitedtextlayerplugin_la_LDFLAGS = -avoid-version -module

EXTRA_DIST = $(plugin_UIC) icon.xpm
@@ -10,8 +10,11 @@
#
# $Id$

AM_CXXFLAGS := $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(QT_CXXFLAGS) $(PGDB) -I$(PG_INC) $(DEBUG_QGIS) -I../../src

plugindir = ${pkglibdir}
plugin_LTLIBRARIES = pggeoprocessingplugin.la



%.moc.cpp: %.h
$(MOC) -o $@ $<
@@ -22,38 +25,36 @@ plugin_LTLIBRARIES = pggeoprocessingplugin.la
%.cpp: %.ui
$(UIC) -o $@ -impl $*.h $<

pggeoprocessingplugin_la_SOURCES = qgspggeoprocessing.cpp \
qgspggeoprocessing.h \
qgsdlgpgbuffer.cpp \
qgsdlgpgbuffer.h \
../../src/qgsmaplayer.cpp \
../../src/qgsvectorlayer.cpp \
../../src/qgsfield.cpp \
../../src/qgssymbol.cpp \
$(pggeoprocessing_UI)

nodist_pggeoprocessingplugin_la_SOURCES = $(pggeoprocessing_MOC)
plugin_LTLIBRARIES = pggeoprocessingplugin.la


pggeoprocessing_MOC = qgspggeoprocessing.moc.cpp \
../../src/qgsmaplayer.moc.cpp \
../../src/qgsvectorlayer.moc.cpp \
qgsdlgpgbufferbase.moc.cpp \
qgsdlgpgbuffer.moc.cpp
qgsdlgpgbufferbase.moc.cpp \
qgsdlgpgbuffer.moc.cpp

pggeoprocessing_UI = qgsdlgpgbufferbase.h \
qgsdlgpgbufferbase.cpp
qgsdlgpgbufferbase.cpp

pggeoprocessing_UIC = qgsdlgpgbufferbase.ui

pggeoprocessingplugin_la_SOURCES = qgspggeoprocessing.cpp \
qgspggeoprocessing.h \
qgsdlgpgbuffer.cpp \
qgsdlgpgbuffer.h \
$(pggeoprocessing_UI)

nodist_pggeoprocessingplugin_la_SOURCES = $(pggeoprocessing_MOC)

# UI dependencies
qgsdlgpgbufferbase.cpp: qgsdlgpgbufferbase.h qgsdlgpgbufferbase.ui
qgsdlgpgbufferbase.h: qgsdlgpgbufferbase.ui


BUILT_SOURCES = $(pggeoprocessing_MOC) $(pggeoprocessing_UI)

AM_CXXFLAGS := $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(QT_CXXFLAGS) $(PGDB) -I$(PG_INC) $(DEBUG_QGIS) -I../../src

pggeoprocessingplugin_la_LIBADD = $(QT_LDADD) $(PG_LIB)
pggeoprocessingplugin_la_LIBADD = $(QT_LDADD) $(PG_LIB) ../../src/libqgis.la
pggeoprocessingplugin_la_LDFLAGS = -avoid-version -module

EXTRA_DIST = $(pggeoprocessing_UIC) icon_buffer.xpm

0 comments on commit 27740e4

Please sign in to comment.