Permalink
Browse files

Autoconf & Automake

  • Loading branch information...
1 parent 40932c4 commit 3ee65b2bd78fcb2502e34bfc3124edda871f00ee cHoBi committed Jun 19, 2008
View
0 AUTHORS
No changes.
View
0 ChangeLog
No changes.
View
8 Makefile.am
@@ -0,0 +1,8 @@
+SUBDIRS= lib/ lib/dom/ lib/xml/
+
+DIST_SUBDIRS = lib/ lib/dom/ lib/xml/
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xml++lib-1.0.pc
+
+EXTRA_DIST=autogen.sh
View
0 NEWS
No changes.
View
33 configure.ac
@@ -0,0 +1,33 @@
+AC_INIT(lib/xml++.h)
+AM_CONFIG_HEADER(config.h)
+
+GENERIC_LIBARY_NAME=xml++
+
+GENERIC_MAJOR_VERSION=0
+GENERIC_MINOR_VERSION=1
+GENERIC_MICRO_VERSION=0
+
+PACKAGE=$GENERIC_LIBRARY_NAME
+AC_SUBST(lib)
+
+GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION
+GENERIC_RELEASE=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION
+AC_SUBST(GENERIC_RELEASE)
+AC_SUBST(GENERIC_VERSION)
+
+VERSION=$GENERIC_VERSION
+
+AM_INIT_AUTOMAKE(lib, $VERSION, no-define)
+
+AC_PROG_CC
+AC_PROG_CXX
+AM_PROG_LIBTOOL
+AM_SANITY_CHECK
+
+AC_LANG_CPLUSPLUS
+
+AC_HEADER_STDC
+AC_PROG_CXX
+AC_LANG_CPLUSPLUS
+
+AC_OUTPUT(Makefile lib/Makefile lib/dom/Makefile lib/xml/Makefile lib/exception/Makefile lib/utils/Makefile)
View
12 lib/Makefile.am
@@ -0,0 +1,12 @@
+SUBDIRS = dom xml exception utils
+
+h_sources = xml++.h common.h dom.h
+library_includedir=$(includedir)/$(GENERIC_LIBRARY_NAME)-$(GENERIC_API_VERSION)/$(GENERIC_LIBRARY_NAME)
+library_include_HEADERS = $(h_sources)
+
+INCLUDES = -I$(top_srcdir)
+
+lib_LTLIBRARIES= libxmlpp-0.1.la
+libxmlpp_0_1_la_SOURCE= $(h_sources)
+libxmlpp_0_1_la_LIBADD= dom/libdom.la xml/libxml.la exception/libexception.la utils/libutils.la
+libxmlpp_0_1_la_LDFLAGS= -version-info $(GENERIC_LIBRARY_VERSION) -release $(GENERIC_RELEASE)
View
4 lib/common.h
@@ -34,8 +34,8 @@
// Default typedefs
typedef int DOMNodeType;
-#include "exception.h"
-#include "utils.h"
+#include "exception/exception.h"
+#include "utils/utils.h"
#endif
View
8 lib/dom/Makefile.am
@@ -0,0 +1,8 @@
+h_sources = document.h child.h attribute.h element.h text.h
+cc_sources = document.cpp child.cpp attribute.cpp element.cpp text.cpp
+
+library_includedir=$(includedir)/$(GENERIC_LIBRARY_NAME)-$(GENERIC_API_VERSION)/$(GENERIC_LIBRARY_NAME)
+library_include_HEADERS = $(h_sources)
+
+noinst_LTLIBRARIES= libdom.la
+libdom_la_SOURCES= $(h_sources) $(cc_sources)
View
4 lib/dom/document.cpp
@@ -25,8 +25,8 @@
namespace xmlpp {
-DOM::DOM() {
-
+DOM::DOM (void)
+{
}
};
View
2 lib/dom/document.h
@@ -33,7 +33,7 @@ namespace xmlpp {
class DOM
{
public:
- DOM();
+ DOM (void);
};
};
View
8 lib/exception/Makefile.am
@@ -0,0 +1,8 @@
+h_sources = exception.h xml_exception.h dom_exception.h
+cc_sources = exception.cpp xml_exception.cpp dom_exception.cpp
+
+library_includedir=$(includedir)/$(GENERIC_LIBRARY_NAME)-$(GENERIC_API_VERSION)/$(GENERIC_LIBRARY_NAME)
+library_include_HEADERS = $(h_sources)
+
+noinst_LTLIBRARIES= libexception.la
+libexception_la_SOURCES= $(h_sources) $(cc_sources)
View
46 lib/exception/dom_exception.cpp
@@ -0,0 +1,46 @@
+/// @file dom_exception.cpp
+/// @brief This file includes the dom exception implementations.
+
+/****************************************************************************
+* XML++ is a library to work with XML files. *
+* Copyright (C) 2008 cHoBi *
+* *
+* This file is part of XML++ *
+* *
+* XML++ is free software: you can redistribute it and/or modify *
+* it under the terms of the GNU Affero General Public License as *
+* published by the Free Software Foundation, either version 3 of the *
+* License, or (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU Affero General Public License for more details. *
+* *
+* You should have received a copy of the GNU Affero General Public License *
+* along with this program. If not, see <http://www.gnu.org/licenses/>. *
+****************************************************************************/
+
+#include "dom_exception.h"
+
+namespace xmlpp {
+
+DOMException::DOMException (int code) : Exception ()
+{
+ switch (code) {
+ case EX_ATTRIBUTE_MODE_NOT_EXISTENT:
+ this->description = "The modes are only 'name' or 'value'.";
+ break;
+
+ case EX_NODE_IS_ELEMENT:
+ this->description = "The node is an element, that method isn't supported.";
+ break;
+
+ case EX_NODE_IS_TEXT:
+ this->description = "The node is an element, that method isn't supported.";
+ break;
+ }
+}
+
+};
+
View
62 lib/exception.h → lib/exception/dom_exception.h
@@ -1,5 +1,5 @@
-/// @file exception.h
-/// @brief This file includes the XML attribute implementations.
+/// @file dom_exception.h
+/// @brief This file includes the dom exception definitions.
/****************************************************************************
* XML++ is a library to work with XML files. *
@@ -21,71 +21,21 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************/
+#if !defined (XMLPP_DOM_EXCEPTION)
+#define XMLPP_XML_EXCEPTION TRUE
namespace xmlpp {
-class Exception {
- protected:
- std::string description;
-
- public:
- Exception (void) { };
-
- Exception(std::string description) {
- this->description = description;
- }
-
- Exception(const char* description) {
- this->description = description;
- }
-
- std::string getMessage() {
- return this->description;
- }
-
-};
-
-// XMLException codes.
-#define EX_PARSER_FILE_READ_ERROR 1
-
-class XMLException : public Exception
-{
- public:
- XMLException (int code) : Exception()
- {
- switch (code) {
- case EX_PARSER_FILE_READ_ERROR:
- this->description = "Error while reading the text file, maybe it doesn't exist.";
- break;
- }
- }
-};
-
-// DOMException codes.
#define EX_ATTRIBUTE_MODE_NOT_EXISTENT 1
#define EX_NODE_IS_ELEMENT 2
#define EX_NODE_IS_TEXT 3
class DOMException : public Exception
{
public:
- DOMException (int code) : Exception()
- {
- switch (code) {
- case EX_ATTRIBUTE_MODE_NOT_EXISTENT:
- this->description = "The modes are only 'name' or 'value'.";
- break;
-
- case EX_NODE_IS_ELEMENT:
- this->description = "The node is an element, that method isn't supported.";
- break;
-
- case EX_NODE_IS_TEXT:
- this->description = "The node is an element, that method isn't supported.";
- break;
- }
- }
+ DOMException (int code);
};
};
+#endif
View
48 lib/exception/exception.cpp
@@ -0,0 +1,48 @@
+/// @file exception.cpp
+/// @brief This file includes the base exception implmentations.
+
+/****************************************************************************
+* XML++ is a library to work with XML files. *
+* Copyright (C) 2008 cHoBi *
+* *
+* This file is part of XML++ *
+* *
+* XML++ is free software: you can redistribute it and/or modify *
+* it under the terms of the GNU Affero General Public License as *
+* published by the Free Software Foundation, either version 3 of the *
+* License, or (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU Affero General Public License for more details. *
+* *
+* You should have received a copy of the GNU Affero General Public License *
+* along with this program. If not, see <http://www.gnu.org/licenses/>. *
+****************************************************************************/
+
+#include "exception.h"
+
+namespace xmlpp {
+
+Exception::Exception (void)
+{
+}
+
+Exception::Exception (std::string description)
+{
+ this->description = description;
+}
+
+Exception::Exception (const char* description)
+{
+ this->description = description;
+}
+
+std::string Exception::getMessage (void)
+{
+ return this->description;
+}
+
+};
+
View
50 lib/exception/exception.h
@@ -0,0 +1,50 @@
+/// @file exception.h
+/// @brief This file includes the base exception definitions.
+
+/****************************************************************************
+* XML++ is a library to work with XML files. *
+* Copyright (C) 2008 cHoBi *
+* *
+* This file is part of XML++ *
+* *
+* XML++ is free software: you can redistribute it and/or modify *
+* it under the terms of the GNU Affero General Public License as *
+* published by the Free Software Foundation, either version 3 of the *
+* License, or (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU Affero General Public License for more details. *
+* *
+* You should have received a copy of the GNU Affero General Public License *
+* along with this program. If not, see <http://www.gnu.org/licenses/>. *
+****************************************************************************/
+
+#if !defined(XMLPP_EXCEPTION)
+#define XMLPP_EXCEPTION TRUE
+
+#include <string>
+
+namespace xmlpp {
+
+class Exception {
+ protected:
+ std::string description;
+
+ public:
+ Exception (void);
+ Exception (std::string description);
+ Exception (const char* description);
+
+ std::string getMessage (void);
+};
+
+};
+
+#include "xml_exception.h"
+#include "dom_exception.h"
+
+#endif
+
+
View
12 lib/exception/exception.lo
@@ -0,0 +1,12 @@
+# exception.lo - a libtool object file
+# Generated by ltmain.sh (GNU libtool) 2.2.4
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object='.libs/exception.o'
+
+# Name of the non-PIC object
+non_pic_object='exception.o'
+
View
BIN lib/exception/exception.o
Binary file not shown.
View
38 lib/exception/xml_exception.cpp
@@ -0,0 +1,38 @@
+/// @file xml_exception.cpp
+/// @brief This file includes the xml exception implementations.
+
+/****************************************************************************
+* XML++ is a library to work with XML files. *
+* Copyright (C) 2008 cHoBi *
+* *
+* This file is part of XML++ *
+* *
+* XML++ is free software: you can redistribute it and/or modify *
+* it under the terms of the GNU Affero General Public License as *
+* published by the Free Software Foundation, either version 3 of the *
+* License, or (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU Affero General Public License for more details. *
+* *
+* You should have received a copy of the GNU Affero General Public License *
+* along with this program. If not, see <http://www.gnu.org/licenses/>. *
+****************************************************************************/
+
+#include "xml_exception.h"
+
+namespace xmlpp {
+
+XMLException::XMLException (int code) : Exception ()
+{
+ switch (code) {
+ case EX_PARSER_FILE_READ_ERROR:
+ this->description = "Error while reading the text file, maybe it doesn't exist.";
+ break;
+ }
+}
+
+};
+
View
41 lib/exception/xml_exception.h
@@ -0,0 +1,41 @@
+/// @file xml_exception.h
+/// @brief This file includes the xml exception definitions.
+
+/****************************************************************************
+* XML++ is a library to work with XML files. *
+* Copyright (C) 2008 cHoBi *
+* *
+* This file is part of XML++ *
+* *
+* XML++ is free software: you can redistribute it and/or modify *
+* it under the terms of the GNU Affero General Public License as *
+* published by the Free Software Foundation, either version 3 of the *
+* License, or (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU Affero General Public License for more details. *
+* *
+* You should have received a copy of the GNU Affero General Public License *
+* along with this program. If not, see <http://www.gnu.org/licenses/>. *
+****************************************************************************/
+
+#if !defined(XMLPP_XML_EXCEPTION)
+#define XMLPP_XML_EXCEPTION TRUE
+
+namespace xmlpp {
+
+#define EX_PARSER_FILE_READ_ERROR 1
+
+class XMLException : public Exception
+{
+ public:
+ XMLException (int code);
+};
+
+};
+
+#endif
+
+
View
8 lib/utils/Makefile.am
@@ -0,0 +1,8 @@
+h_sources = utils.h
+cc_sources = utils.cpp
+
+library_includedir=$(includedir)/$(GENERIC_LIBRARY_NAME)-$(GENERIC_API_VERSION)/$(GENERIC_LIBRARY_NAME)
+library_include_HEADERS = $(h_sources)
+
+noinst_LTLIBRARIES= libutils.la
+libutils_la_SOURCES= $(h_sources) $(cc_sources)
View
0 lib/utils.cpp → lib/utils/utils.cpp
File renamed without changes.
View
2 lib/utils.h → lib/utils/utils.h
@@ -21,7 +21,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************/
-#include "common.h"
+#include "../common.h"
namespace xmlpp {
namespace utils {
View
8 lib/xml/Makefile.am
@@ -0,0 +1,8 @@
+h_sources = parser.h
+cc_sources = parser.cpp
+
+library_includedir=$(includedir)/$(GENERIC_LIBRARY_NAME)-$(GENERIC_API_VERSION)/$(GENERIC_LIBRARY_NAME)
+library_include_HEADERS = $(h_sources)
+
+noinst_LTLIBRARIES= libxml.la
+libxml_la_SOURCES= $(h_sources) $(cc_sources)

0 comments on commit 3ee65b2

Please sign in to comment.