summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile.in6
-rw-r--r--ruby-runner.c (renamed from template/ruby-runner.c.in)4
-rw-r--r--template/ruby-runner.h.in3
4 files changed, 8 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index 80c1259..320ccc2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -103,7 +103,7 @@ y.tab.c
/rubicon
/ruby
/ruby-runner
-/ruby-runner.c
+/ruby-runner.h
/ruby-man.rd.gz
/sizes.c
/test.rb
diff --git a/Makefile.in b/Makefile.in
index 1db6bd8..60fb44f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -254,11 +254,11 @@ ruby_pc = @ruby_pc@
$(ruby_pc):
@./config.status --file=$@:$(srcdir)/template/ruby.pc.in
-ruby-runner.c: template/ruby-runner.c.in
+ruby-runner.h: template/ruby-runner.h.in
@./config.status --file=$@:$(srcdir)/template/$(@F).in
-ruby-runner$(EXEEXT): ruby-runner.c
- $(Q) $(PURIFY) $(CC) $(CFLAGS) $(CPPFLAGS) -DRUBY_INSTALL_NAME=$(RUBY_INSTALL_NAME) $(LDFLAGS) $(LIBS) $(OUTFLAG)$@ ruby-runner.c
+ruby-runner$(EXEEXT): ruby-runner.c ruby-runner.h
+ $(Q) $(PURIFY) $(CC) $(CFLAGS) $(CPPFLAGS) -DRUBY_INSTALL_NAME=$(RUBY_INSTALL_NAME) $(LDFLAGS) $(LIBS) $(OUTFLAG)$@ $<
$(RBCONFIG): $(PREP)
diff --git a/template/ruby-runner.c.in b/ruby-runner.c
index 75be215..c16e7c6 100644
--- a/template/ruby-runner.c.in
+++ b/ruby-runner.c
@@ -3,9 +3,7 @@
#include <string.h>
#include <unistd.h>
-#define BUILDDIR "@abs_top_builddir@"
-#define LIBPATHENV "@LIBPATHENV@"
-#define PATH_SEP '@PATH_SEPARATOR@'
+#include "ruby-runner.h"
#define STRINGIZE(expr) STRINGIZE0(expr)
#define STRINGIZE0(expr) #expr
diff --git a/template/ruby-runner.h.in b/template/ruby-runner.h.in
new file mode 100644
index 0000000..b0647fd
--- /dev/null
+++ b/template/ruby-runner.h.in
@@ -0,0 +1,3 @@
+#define BUILDDIR "@abs_top_builddir@"
+#define LIBPATHENV "@LIBPATHENV@"
+#define PATH_SEP '@PATH_SEPARATOR@'