]> granicus.if.org Git - graphviz/commitdiff
move plugin/*/* to lib/plugin since plugins are really libs anyway
authorellson <devnull@localhost>
Thu, 28 Jul 2005 17:52:09 +0000 (17:52 +0000)
committerellson <devnull@localhost>
Thu, 28 Jul 2005 17:52:09 +0000 (17:52 +0000)
   some plugins depended on libs which was causing unresolvable dependencies

resolve lib dependency ordering in lib/Makefile.am

move plugin/plugins.c (describing builtins) to lib/gvc/builtins.c
(pending something fancier using ./configure --with-builtins=... )

fix cmd/tools/Makefile.am to pick up layout plugin from new location

remove plugin/

Makefile.am
cmd/tools/Makefile.am
configure.ac
lib/Makefile.am
lib/gvc/Makefile.am
lib/gvc/builtins.c [new file with mode: 0644]
plugin/dot_layout/gvlayout_dot_layout.c [new file with mode: 0644]
plugin/dot_layout/gvplugin_dot_layout.c [new file with mode: 0644]
plugin/neato_layout/gvlayout_neato_layout.c [new file with mode: 0644]
plugin/neato_layout/gvplugin_neato_layout.c [new file with mode: 0644]

index 942dcfc8aa3ef460a6e0649cc2cbd8f5e769e892..fc49a5344dbb771f72cfd3a6d51518c9f9abf4e7 100644 (file)
@@ -12,7 +12,7 @@ txt_DATA = $(txt)
 html_DATA = $(html)
 
 # $(subdirs) contains the list from: AC_CONFIG_SUBDIRS
-SUBDIRS = $(subdirs) lib plugin cmd tclpkg doc contrib graphs
+SUBDIRS = $(subdirs) lib cmd tclpkg doc contrib graphs
 
 .PHONY: doxygen
 doxygen:
index d54f04dfd1f2098f020632d9ea34a629504df42d..e064d12f32d2860d2396a2b01b02f06f3741e4d2 100644 (file)
@@ -102,7 +102,7 @@ gvpack_LDADD = \
        $(top_builddir)/lib/gvc/libgvc.la \
        $(top_builddir)/lib/ingraphs/libingraphs.la \
        $(top_builddir)/lib/graph/libgraph.la \
-       $(top_builddir)/plugin/layout/libgvplugin_neato_layout.la
+       $(top_builddir)/lib/plugin/libgvplugin_neato_layout.la
 
 dijkstra_SOURCES = dijkstra.c
 
index d99d5043b6663626a62812676602e5a899a3be49..0a225a52c358e62b7aa3dc9a49ccc2c487fe9a4d 100644 (file)
@@ -1501,9 +1501,7 @@ AC_CONFIG_FILES(Makefile
        lib/ingraphs/Makefile
        lib/gvc/Makefile
        lib/gvc/libgvc.pc
-       plugin/Makefile
-       plugin/layout/Makefile
-       plugin/usershape/Makefile
+       lib/plugin/Makefile
        cmd/Makefile
        cmd/dot/Makefile
        cmd/tools/Makefile
index 430ffaccfff606fb4db83b315bcd2763b4ea30f0..0958a0a7169dd556a0cb813d9352f13703773908 100644 (file)
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
 SUBDIRS = cdt graph agraph gd pathplan agutil sfio vmalloc ast circogen \
-       dotgen fdpgen neatogen pack twopigen common gvc ingraphs expr
+       dotgen fdpgen neatogen pack twopigen plugin common gvc ingraphs expr
 
 EXTRA_DIST = Makefile.old
index 0d3dc89b1c437ec075ddd2de70f12861679c5d36..dd5e7d4764971cbfdb925105b4168c9cda22ea41 100644 (file)
@@ -18,7 +18,7 @@ pkginclude_HEADERS = gvc.h gvcint.h gvplugin.h gvcproc.h gvplugin_render.h \
 pkglib_LTLIBRARIES = libgvc.la
 pkgconfig_DATA = libgvc.pc
 
-libgvc_la_SOURCES = gvrender.c gvlayout.c gvtextlayout.c gvdevice.c \
+libgvc_la_SOURCES = builtins.c gvrender.c gvlayout.c gvtextlayout.c gvdevice.c \
        gvcontext.c gvjobs.c gvevent.c gvplugin.c gvconfig.c gvusershape.c \
        gvc.c
 
@@ -26,7 +26,9 @@ libgvc_la_LIBADD = \
        $(top_builddir)/lib/common/libcommon.la \
        $(top_builddir)/lib/graph/libgraph.la \
        $(top_builddir)/lib/pathplan/libpathplan.la \
-       $(top_builddir)/plugin/libplugins.la \
+       $(top_builddir)/lib/plugin/libgvplugin_dot_layout.la \
+       $(top_builddir)/lib/plugin/libgvplugin_neato_layout.la \
+       $(top_builddir)/lib/plugin/libgvplugin_usershape_gd.la \
        @GD_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@
 
 EXTRA_DIST = Makefile.old
diff --git a/lib/gvc/builtins.c b/lib/gvc/builtins.c
new file mode 100644 (file)
index 0000000..dcc3066
--- /dev/null
@@ -0,0 +1,30 @@
+/* $Id$ $Revision$ */
+/* vim:set shiftwidth=4 ts=8: */
+
+/**********************************************************
+*      This software is part of the graphviz package      *
+*                http://www.graphviz.org/                 *
+*                                                         *
+*            Copyright (c) 1994-2004 AT&T Corp.           *
+*                and is licensed under the                *
+*            Common Public License, Version 1.0           *
+*                      by AT&T Corp.                      *
+*                                                         *
+*        Information and Software Systems Research        *
+*              AT&T Research, Florham Park NJ             *
+**********************************************************/
+
+#include        "gvplugin.h"
+
+extern gvplugin_library_t
+    gvplugin_dot_layout_LTX_library,
+    gvplugin_neato_layout_LTX_library,
+    gvplugin_usershape_gd_LTX_library;
+
+gvplugin_library_t *builtins[] = {
+    &gvplugin_dot_layout_LTX_library,
+    &gvplugin_neato_layout_LTX_library,
+    &gvplugin_usershape_gd_LTX_library,
+    NULL
+};
+
diff --git a/plugin/dot_layout/gvlayout_dot_layout.c b/plugin/dot_layout/gvlayout_dot_layout.c
new file mode 100644 (file)
index 0000000..dd186ff
--- /dev/null
@@ -0,0 +1,47 @@
+/* $Id$ $Revision$ */
+/* vim:set shiftwidth=4 ts=8: */
+
+/**********************************************************
+*      This software is part of the graphviz package      *
+*                http://www.graphviz.org/                 *
+*                                                         *
+*            Copyright (c) 1994-2004 AT&T Corp.           *
+*                and is licensed under the                *
+*            Common Public License, Version 1.0           *
+*                      by AT&T Corp.                      *
+*                                                         *
+*        Information and Software Systems Research        *
+*              AT&T Research, Florham Park NJ             *
+**********************************************************/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+#include "macros.h"
+#include "const.h"
+#include "types.h"
+
+#include "gvplugin_layout.h"
+
+typedef enum { LAYOUT_DOT, } layout_type;
+
+extern void dot_layout(graph_t * g);
+extern void dot_cleanup(graph_t * g);
+
+gvlayout_engine_t dotgen_engine = {
+    dot_layout,
+    dot_cleanup,
+};
+
+gvlayout_features_t dotgen_features = {
+    LAYOUT_USES_RANKDIR,
+};
+
+gvplugin_installed_t gvlayout_dot_layout[] = {
+    {LAYOUT_DOT, "dot", 0, &dotgen_engine, &dotgen_features},
+    {0, NULL, 0, NULL, NULL}
+};
diff --git a/plugin/dot_layout/gvplugin_dot_layout.c b/plugin/dot_layout/gvplugin_dot_layout.c
new file mode 100644 (file)
index 0000000..fb84ecf
--- /dev/null
@@ -0,0 +1,26 @@
+/* $Id$ $Revision$ */
+/* vim:set shiftwidth=4 ts=8: */
+
+/**********************************************************
+*      This software is part of the graphviz package      *
+*                http://www.graphviz.org/                 *
+*                                                         *
+*            Copyright (c) 1994-2004 AT&T Corp.           *
+*                and is licensed under the                *
+*            Common Public License, Version 1.0           *
+*                      by AT&T Corp.                      *
+*                                                         *
+*        Information and Software Systems Research        *
+*              AT&T Research, Florham Park NJ             *
+**********************************************************/
+
+#include "gvplugin.h"
+
+extern gvplugin_installed_t gvlayout_dot_layout;
+
+static gvplugin_api_t apis[] = {
+    {API_layout, &gvlayout_dot_layout},
+    {(api_t)0, NULL},
+};
+
+gvplugin_library_t gvplugin_dot_layout_LTX_library = { "dot_layout", apis };
diff --git a/plugin/neato_layout/gvlayout_neato_layout.c b/plugin/neato_layout/gvlayout_neato_layout.c
new file mode 100644 (file)
index 0000000..7b7da8c
--- /dev/null
@@ -0,0 +1,81 @@
+/* $Id$ $Revision$ */
+/* vim:set shiftwidth=4 ts=8: */
+
+/**********************************************************
+*      This software is part of the graphviz package      *
+*                http://www.graphviz.org/                 *
+*                                                         *
+*            Copyright (c) 1994-2004 AT&T Corp.           *
+*                and is licensed under the                *
+*            Common Public License, Version 1.0           *
+*                      by AT&T Corp.                      *
+*                                                         *
+*        Information and Software Systems Research        *
+*              AT&T Research, Florham Park NJ             *
+**********************************************************/
+
+/*
+ *  neato layout plugin
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+#include "macros.h"
+#include "const.h"
+#include "types.h"
+
+#include "gvplugin_layout.h"
+
+typedef enum { LAYOUT_NEATO,
+               LAYOUT_FDP,
+               LAYOUT_TWOPI,
+               LAYOUT_CIRCO,
+       } layout_type;
+
+extern void neato_layout(graph_t * g);
+extern void fdp_layout(graph_t * g);
+extern void twopi_layout(graph_t * g);
+extern void circo_layout(graph_t * g);
+
+extern void neato_cleanup(graph_t * g);
+extern void fdp_cleanup(graph_t * g);
+extern void twopi_cleanup(graph_t * g);
+extern void circo_cleanup(graph_t * g);
+
+gvlayout_engine_t neatogen_engine = {
+    neato_layout,
+    neato_cleanup,
+};
+
+gvlayout_engine_t fdpgen_engine = {
+    fdp_layout,
+    fdp_cleanup,
+};
+
+gvlayout_engine_t twopigen_engine = {
+    twopi_layout,
+    twopi_cleanup,
+};
+
+gvlayout_engine_t circogen_engine = {
+    circo_layout,
+    circo_cleanup,
+};
+
+gvlayout_features_t neatogen_features = {
+        0,
+};
+
+gvplugin_installed_t gvlayout_neato_types[] = {
+    {LAYOUT_NEATO, "neato", 0, &neatogen_engine, &neatogen_features},
+    {LAYOUT_FDP, "fdp", 0, &fdpgen_engine, &neatogen_features},
+    {LAYOUT_TWOPI, "twopi", 0, &twopigen_engine, &neatogen_features},
+    {LAYOUT_CIRCO, "circo", 0, &circogen_engine, &neatogen_features},
+    {0, NULL, 0, NULL, NULL}
+};
diff --git a/plugin/neato_layout/gvplugin_neato_layout.c b/plugin/neato_layout/gvplugin_neato_layout.c
new file mode 100644 (file)
index 0000000..c56c0a1
--- /dev/null
@@ -0,0 +1,26 @@
+/* $Id$ $Revision$ */
+/* vim:set shiftwidth=4 ts=8: */
+
+/**********************************************************
+*      This software is part of the graphviz package      *
+*                http://www.graphviz.org/                 *
+*                                                         *
+*            Copyright (c) 1994-2004 AT&T Corp.           *
+*                and is licensed under the                *
+*            Common Public License, Version 1.0           *
+*                      by AT&T Corp.                      *
+*                                                         *
+*        Information and Software Systems Research        *
+*              AT&T Research, Florham Park NJ             *
+**********************************************************/
+
+#include "gvplugin.h"
+
+extern gvplugin_installed_t gvlayout_neato_types;
+
+static gvplugin_api_t apis[] = {
+    {API_layout, &gvlayout_neato_types},
+    {(api_t)0, NULL},
+};
+
+gvplugin_library_t gvplugin_neato_layout_LTX_library = { "neato_layout", apis };