Skip to content

Commit

Permalink
Use Readline instead of Editline
Browse files Browse the repository at this point in the history
  • Loading branch information
sabel83 committed Sep 17, 2013
1 parent 7ab4ff1 commit 3fa6b00
Show file tree
Hide file tree
Showing 70 changed files with 2,090 additions and 510 deletions.
24 changes: 18 additions & 6 deletions CMakeLists.txt
@@ -1,7 +1,18 @@
# Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Metashell - Interactive C++ template metaprogramming shell
# Copyright (C) 2013, Abel Sinkovics (abel@sinkovics.hu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

cmake_minimum_required(VERSION 2.6)

Expand All @@ -24,6 +35,7 @@ find_package(Boost COMPONENTS
program_options
unit_test_framework
)
find_package(Threads) # used by Boost.Thread

include_directories(${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS})
Expand All @@ -40,7 +52,7 @@ endif()
# Clang
find_package(Clang)

# Editline lib
# Readline lib
include_directories("include")

# Unit testing
Expand All @@ -67,7 +79,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}_${CMAKE_SYSTEM_PROCESSOR}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}")

set(CPACK_DEBIAN_PACKAGE_DEPENDS "libedit2")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libreadline6")

set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
Expand Down
611 changes: 611 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -33,7 +33,7 @@ metaprograms.
* Download the source code from [github](http://github.com/sabel83/metashell).
* Install the dependent libraries:
* libclang
* Editline
* Readline
* Install CMake
* In the source directory run the following commands:
* `mkdir bin`
Expand Down Expand Up @@ -260,5 +260,5 @@ of the header.
## License
Metashell is published under the
[Boost Software License](http://www.boost.org/LICENSE_1_0.txt).
[GNU General Public License, version 3](http://www.gnu.org/licenses/gpl.html).
45 changes: 27 additions & 18 deletions app/CMakeLists.txt
@@ -1,28 +1,25 @@
# Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Metashell - Interactive C++ template metaprogramming shell
# Copyright (C) 2013, Abel Sinkovics (abel@sinkovics.hu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

aux_source_directory(. SOURCES)
add_executable(metashell ${SOURCES})

# Editline
find_package(Editline)
include_directories(${Editline_INCLUDE_DIR})

# Metashell
target_link_libraries(metashell metashell_lib)

# Editline
target_link_libraries(metashell ${Editline_LIBRARY})

# Program_options
target_link_libraries(metashell ${Boost_PROGRAM_OPTIONS_LIBRARIES})

# Clang
target_link_libraries(metashell ${CLANG_LIBRARY})
include_directories(${CLANG_INCLUDE_DIR})

# Wave
target_link_libraries(metashell
${Boost_SYSTEM_LIBRARIES}
Expand All @@ -32,5 +29,17 @@ target_link_libraries(metashell
${CMAKE_THREAD_LIBS_INIT}
)

# Readline
find_package(Readline)
include_directories(${Readline_INCLUDE_DIR})
target_link_libraries(metashell ${Readline_LIBRARY})

# Program_options
target_link_libraries(metashell ${Boost_PROGRAM_OPTIONS_LIBRARIES})

# Clang
target_link_libraries(metashell ${CLANG_LIBRARY})
include_directories(${CLANG_INCLUDE_DIR})

install(TARGETS metashell DESTINATION bin)

19 changes: 15 additions & 4 deletions app/console.cpp
@@ -1,7 +1,18 @@
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// Metashell - Interactive C++ template metaprogramming shell
// Copyright (C) 2013, Abel Sinkovics (abel@sinkovics.hu)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

#include "console.hpp"

Expand Down
19 changes: 15 additions & 4 deletions app/console.hpp
@@ -1,10 +1,21 @@
#ifndef CONSOLE_HPP
#define CONSOLE_HPP

// Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// Metashell - Interactive C++ template metaprogramming shell
// Copyright (C) 2013, Abel Sinkovics (abel@sinkovics.hu)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

namespace console
{
Expand Down
184 changes: 0 additions & 184 deletions app/editline_shell.cpp

This file was deleted.

37 changes: 0 additions & 37 deletions app/editline_shell.hpp

This file was deleted.

0 comments on commit 3fa6b00

Please sign in to comment.