Skip to content

Commit

Permalink
Merge pull request #6 from willcipriano/feature/traceback_system
Browse files Browse the repository at this point in the history
Feature/traceback system
  • Loading branch information
willcipriano authored May 1, 2021
2 parents 13ce57d + 905f27d commit f245a59
Show file tree
Hide file tree
Showing 25 changed files with 709 additions and 372 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Project exclude paths
/cmake-build-debug/
.idea
/.idea/*
/.idea/*
cmake_install.cmake
CMakeCache.txt
Connery
Makefile
/CMakeFiles/
7 changes: 7 additions & 0 deletions .run/Connery [test.connery].run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Connery [test.connery]" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="test.connery" REDIRECT_INPUT="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="Connery" TARGET_NAME="Connery" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="Connery" RUN_TARGET_NAME="Connery">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
</component>
7 changes: 7 additions & 0 deletions .run/Connery.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Connery" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="Connery" TARGET_NAME="Connery" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="Connery" RUN_TARGET_NAME="Connery">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
</component>
8 changes: 8 additions & 0 deletions .run/local.run.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="local.run" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile">
<makefile filename="$PROJECT_DIR$/Buildfile" target="local.run" workingDirectory="" arguments="">
<envs />
</makefile>
<method v="2" />
</configuration>
</component>
29 changes: 29 additions & 0 deletions Buildfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
local.install:
sudo apt-get -y install build-essential
sudo apt-get -y install cmake
sudo apt-get -y install libcurl4-openssl-dev
sudo apt-get -y install libedit-dev

local.build:
cmake src/.
make Connery

local.clean:
make clean || true
rm cmake_install.cmake || true
rm CMakeCache.txt || true
rm -r CMakeFiles || true
rm -r stdlib || true
rm Makefile || true

local.run:
./Connery || cmake src/. && make Connery && ./Connery || sudo apt-get -y install build-essential; sudo apt-get -y install cmake; sudo apt-get -y install libcurl4-openssl-dev; sudo apt-get -y install libedit-dev; cmake src/. && make Connery && ./Connery || echo "There is nothing like a challenge to bring out the best in man."

docker.build:
docker build --tag connerylang .

docker.clean:
docker rmi connerylang --force

docker.run:
docker run -it connerylang || docker build --tag connerylang . && docker run -it connerylang
30 changes: 30 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

connery_install_path=$(eval echo ~$user);
export CONNERY_INSTALL_PATH=$connery_install_path;
export CONNERY_PATH=$connery_install_path"/Connery"

pushd ./

cd "$CONNERY_INSTALL_PATH" || exit &&
git clone --single-branch --branch feature/traceback_system https://github.com/willcipriano/Connery.git


cd "$CONNERY_PATH" || exit &&
make -f Buildfile local.install ; make -f Buildfile local.build

rm Buildfile || true ;
rm CMakeCache.txt || true ;
rm -rf CMakeFiles || true ;
rm cmake_install.cmake || true ;
rm Dockerfile || true ;
rm -rf Makefile || true ;
rm -rf src || true ;

export PATH=$PATH:$CONNERY_PATH






2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(CMAKE_C_STANDARD 99)
set(CURL_LIBRARY "-lcurl")
find_package(CURL REQUIRED)

add_executable(Connery main.c mpc.c util.c util.h hashtable.c hashtable.h cval.h cval.c)
add_executable(Connery main.c mpc.c util.c util.h hashtable.c hashtable.h cval.h cval.c trace.c trace.h)
include_directories(${CURL_INCLUDE_DIR})
target_link_libraries(Connery PRIVATE /usr/lib/x86_64-linux-gnu/libedit.so ${CURL_LIBRARIES})

Expand Down
Loading

0 comments on commit f245a59

Please sign in to comment.