Skip to content

Commit

Permalink
Partially bootstrap autoconf/automake toolchain
Browse files Browse the repository at this point in the history
Still need to restore the docs, javascript, python ext, and tests, but
this does actually build jsonnet and a shared libjsonnet.so with
libtool now.

Fixes: google#53
  • Loading branch information
benley committed Dec 9, 2015
1 parent 4a1235a commit ddeea2f
Show file tree
Hide file tree
Showing 4 changed files with 616 additions and 169 deletions.
169 changes: 0 additions & 169 deletions Makefile

This file was deleted.

25 changes: 25 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ACLOCAL_AMFLAGS = -I m4
AM_CXXFLAGS = ${my_CPPFLAGS} -Wall -Werror -pedantic -fPIC -I$(top_srcdir)/include
AM_CFLAGS = ${my_CFLAGS} -Wall -Werror -pedantic -std=c99 -fPIC -I$(top_srcdir)/include

bin_PROGRAMS = jsonnet
jsonnet_SOURCES = cmd/jsonnet.cpp
jsonnet_LDADD = libjsonnet.la $(LDADD)

lib_LTLIBRARIES = libjsonnet.la
libjsonnet_la_SOURCES = core/desugaring.cpp core/lexer.cpp core/libjsonnet.cpp \
core/parser.cpp core/static_analysis.cpp core/vm.cpp
nodist_libjsonnet_la_SOURCES = core/std.jsonnet.h
libjsonnet_la_SOURCES += core/ast.h core/desugaring.h core/lexer.h \
core/parser.h core/state.h core/static_analysis.h \
core/static_error.h core/vm.h
libjsonnet_HEADERS =$(top_srcdir)/include/libjsonnet.h
libjsonnetdir = $(pkgincludedir)

BUILT_SOURCES = core/std.jsonnet.h
CLEANFILES = core/std.jsonnet.h
core/std.jsonnet.h: stdlib/std.jsonnet
(($(OD) -v -Anone -t u1 $< \
| $(TR) " " "\n" \
| $(GREP) -v "^$$" \
| $(TR) "\n" "," ) && echo "0") > $@
33 changes: 33 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
AC_PREREQ([2.61])
AC_INIT([jsonnet], [0.8.5])
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
AC_CANONICAL_TARGET
AC_DISABLE_STATIC

AC_LANG([C++])
AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AM_MAINTAINER_MODE([enable])

AC_PROG_CC
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])

#AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
])
AC_CHECK_HEADERS([alloca.h features.h libio.h stdc-predef.h stdio.h stdlib.h wchar.h])
AM_MISSING_PROG(OD, od)
AM_MISSING_PROG(GREP, grep)
AM_MISSING_PROG(TR, tr)
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])

LT_PREREQ([2.2])
LT_INIT
LT_LANG([C++])
LT_OUTPUT

AC_OUTPUT
Loading

0 comments on commit ddeea2f

Please sign in to comment.