aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c
diff options
context:
space:
mode:
authorGravatar Edward Z. Yang <ezyang@mit.edu>2012-05-02 17:17:57 -0400
committerGravatar Edward Z. Yang <ezyang@mit.edu>2012-05-02 17:17:57 -0400
commit5e29700b15fad9e4ccbbea59b8312c53447df01b (patch)
tree91cc80e8e50847ab4c3b37714f133417df65f59a /src/c
parent1ca9408089542b282078cc1b7f3c8aa71659f00c (diff)
Add support for -boot flag, which allows in-tree execution of Ur/Web
The boot flag rewrites most hardcoded paths to point to the build directory, and also forces static compilation. This is convenient for developing Ur/Web, or if you cannot 'sudo make install' Ur/Web. The following changes were made: * Header files were moved to include/urweb instead of include; this lets FFI users point their C_INCLUDE_PATH at this directory at write <urweb/urweb.h>. For internal Ur/Web executables, we simply pass -I$PATH/include/urweb as normal. * Differentiate between LIB and SRCLIB; SRCLIB is Ur and JavaScript source files, while LIB is compiled products from libtool. For in-tree compilation these live in different places. * No longer reference Config for paths; instead use Settings; these settings can be changed dynamically by Compiler.enableBoot () (TODO: add a disableBoot function.) * config.h is now generated directly in include/urweb/config.h, for consistency's sake (especially since it gets installed along with the rest of the headers!) * All of the autotools build products got updated. * The linkStatic field in protocols now only contains the name of the build product, and not the absolute path. Future users have to be careful not to reference the Settings files to early, lest they get an old version (this was the source of two bugs during development of this patch.)
Diffstat (limited to 'src/c')
-rw-r--r--src/c/Makefile.am2
-rw-r--r--src/c/Makefile.in42
2 files changed, 17 insertions, 27 deletions
diff --git a/src/c/Makefile.am b/src/c/Makefile.am
index c11596bd..250b0325 100644
--- a/src/c/Makefile.am
+++ b/src/c/Makefile.am
@@ -6,5 +6,5 @@ liburweb_cgi_la_SOURCES = cgi.c
liburweb_fastcgi_la_SOURCES = fastcgi.c
liburweb_static_la_SOURCES = static.c
-AM_CPPFLAGS = -I../../include @OPENSSL_INCLUDES@
+AM_CPPFLAGS = -I../../include/urweb @OPENSSL_INCLUDES@
AM_CFLAGS = -Wimplicit -Wall -Werror -Wno-format-security -Wno-deprecated-declarations
diff --git a/src/c/Makefile.in b/src/c/Makefile.in
index ccf03749..a982441d 100644
--- a/src/c/Makefile.in
+++ b/src/c/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -45,7 +45,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_openssl.m4 \
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_HEADER = $(top_builddir)/include/urweb/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -69,12 +69,6 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
- }
am__installdirs = "$(DESTDIR)$(libdir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
liburweb_la_LIBADD =
@@ -93,7 +87,7 @@ liburweb_http_la_OBJECTS = $(am_liburweb_http_la_OBJECTS)
liburweb_static_la_LIBADD =
am_liburweb_static_la_OBJECTS = static.lo
liburweb_static_la_OBJECTS = $(am_liburweb_static_la_OBJECTS)
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/urweb
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
@@ -192,6 +186,7 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SITELISP = @SITELISP@
SQHEADER = @SQHEADER@
+SRCLIB = @SRCLIB@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
@@ -253,7 +248,7 @@ liburweb_http_la_SOURCES = http.c
liburweb_cgi_la_SOURCES = cgi.c
liburweb_fastcgi_la_SOURCES = fastcgi.c
liburweb_static_la_SOURCES = static.c
-AM_CPPFLAGS = -I../../include @OPENSSL_INCLUDES@
+AM_CPPFLAGS = -I../../include/urweb @OPENSSL_INCLUDES@
AM_CFLAGS = -Wimplicit -Wall -Werror -Wno-format-security -Wno-deprecated-declarations
all: all-am
@@ -320,15 +315,15 @@ clean-libLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-liburweb.la: $(liburweb_la_OBJECTS) $(liburweb_la_DEPENDENCIES) $(EXTRA_liburweb_la_DEPENDENCIES)
+liburweb.la: $(liburweb_la_OBJECTS) $(liburweb_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(liburweb_la_OBJECTS) $(liburweb_la_LIBADD) $(LIBS)
-liburweb_cgi.la: $(liburweb_cgi_la_OBJECTS) $(liburweb_cgi_la_DEPENDENCIES) $(EXTRA_liburweb_cgi_la_DEPENDENCIES)
+liburweb_cgi.la: $(liburweb_cgi_la_OBJECTS) $(liburweb_cgi_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(liburweb_cgi_la_OBJECTS) $(liburweb_cgi_la_LIBADD) $(LIBS)
-liburweb_fastcgi.la: $(liburweb_fastcgi_la_OBJECTS) $(liburweb_fastcgi_la_DEPENDENCIES) $(EXTRA_liburweb_fastcgi_la_DEPENDENCIES)
+liburweb_fastcgi.la: $(liburweb_fastcgi_la_OBJECTS) $(liburweb_fastcgi_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(liburweb_fastcgi_la_OBJECTS) $(liburweb_fastcgi_la_LIBADD) $(LIBS)
-liburweb_http.la: $(liburweb_http_la_OBJECTS) $(liburweb_http_la_DEPENDENCIES) $(EXTRA_liburweb_http_la_DEPENDENCIES)
+liburweb_http.la: $(liburweb_http_la_OBJECTS) $(liburweb_http_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(liburweb_http_la_OBJECTS) $(liburweb_http_la_LIBADD) $(LIBS)
-liburweb_static.la: $(liburweb_static_la_OBJECTS) $(liburweb_static_la_DEPENDENCIES) $(EXTRA_liburweb_static_la_DEPENDENCIES)
+liburweb_static.la: $(liburweb_static_la_OBJECTS) $(liburweb_static_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(liburweb_static_la_OBJECTS) $(liburweb_static_la_LIBADD) $(LIBS)
mostlyclean-compile:
@@ -473,15 +468,10 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic: