Permalink
Browse files

improve build script.

now, you don't need call `rake gather` task.
just do following commands.

  git submodule init
  git submodule update
  phpize
  ./configure
  make
  • Loading branch information...
1 parent 1e3bf31 commit b1e80f13ba3c859bffe179efe82f0966d1f4b8d3 @chobie committed May 14, 2012
Showing with 29 additions and 45 deletions.
  1. +0 −17 .gitignore
  2. +2 −12 Rakefile
  3. +27 −16 config.m4
View
@@ -1,22 +1,5 @@
*.o
-# ignore sundown sources.
-autolink.c
-autolink.h
-buffer.c
-buffer.h
-houdini.h
-houdini_href_e.c
-houdini_html_e.c
-html.c
-html.h
-html_blocks.h
-html_smartypants.c
-stack.c
-stack.h
-markdown.c
-markdown.h
-
# ignore phpized files
Makefile.global
acinclude.m4
View
@@ -32,17 +32,8 @@ task "test:conformance" do
end
desc 'Gather required Sundown sources into extension directory'
-task :gather => 'sundown/src/markdown.h' do |t|
- files =
- FileList[
- 'sundown/src/{markdown,buffer,stack,autolink,html_blocks}.h',
- 'sundown/src/{markdown,buffer,stack,autolink}.c',
- 'sundown/html/{html,html_smartypants,houdini_html_e,houdini_href_e}.c',
- 'sundown/html/{html,houdini}.h',
- ]
- cp files, './',
- :preserve => true,
- :verbose => true
+task :gather do
+ abort "gather task become deprecated. now you don't need call this task."
end
file 'sundown/src/markdown.h' do |t|
@@ -52,5 +43,4 @@ end
task :submodule do
sh "git submodule init"
sh "git submodule update"
- Rake::Task['gather'].invoke
end
View
@@ -2,20 +2,31 @@ PHP_ARG_ENABLE(sundown,Whether to enable the "sundown" extension,
[ --enable-sundown Enable "sundown" extension support])
if test $PHP_SUNDOWN != "no"; then
- PHP_NEW_EXTENSION(sundown,
- php_sundown.c \
- sundown_markdown.c \
- render_base.c \
- render_html.c \
- render_xhtml.c \
- render_html_toc.c \
- buffer.c \
- markdown.c \
- html.c \
- html_smartypants.c \
- autolink.c \
- stack.c \
- houdini_href_e.c \
- houdini_html_e.c \
- , $ext_shared)
+ SUNDOWN_SOURCES="
+php_sundown.c
+sundown_markdown.c
+render_base.c
+render_html.c
+render_xhtml.c
+render_html_toc.c
+sundown/src/buffer.c
+sundown/src/markdown.c
+sundown/src/autolink.c
+sundown/src/stack.c
+sundown/html/html.c
+sundown/html/html_smartypants.c
+sundown/html/houdini_href_e.c
+sundown/html/houdini_html_e.c
+"
+
+ PHP_NEW_EXTENSION(sundown,$SUNDOWN_SOURCES, $ext_shared)
+ CFLAGS=" -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration"
+ PHP_SUBST([CFLAGS])
+
+ PHP_ADD_BUILD_DIR([$ext_builddir/sundown/src])
+
+ PHP_ADD_INCLUDE([$ext_srcdir/sundown/src])
+ PHP_ADD_INCLUDE([$ext_srcdir/sundown/html])
+ PHP_ADD_INCLUDE([$ext_builddir/sundown/src])
+ PHP_ADD_INCLUDE([$ext_builddir/sundown/html])
fi

0 comments on commit b1e80f1

Please sign in to comment.