1
0
Fork 0

script generated deps

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1011 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 2012-07-20 03:26:55 +00:00
parent ffea1f2b0b
commit ae18181f7f
5 changed files with 74 additions and 12 deletions

View File

@ -6,7 +6,11 @@ XCACHE_INCLUDES_SRC=$(srcdir)/includes.c
XCACHE_INCLUDES_I=$(builddir)/includes.i
XCACHE_STRUCTINFO_OUT=$(builddir)/structinfo.m4
$(XCACHE_INCLUDES_I): $(XCACHE_INCLUDES_SRC) $(srcdir)/xcache.h
.PHONY: $(builddir)/includes.lo
$(builddir)/includes.lo:
$(XCACHE_INCLUDES_I): $(builddir)/includes.lo
$(CC) -I. -I$(srcdir) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -E $(XCACHE_INCLUDES_SRC) -o $(XCACHE_INCLUDES_I)
$(XCACHE_STRUCTINFO_OUT): $(XCACHE_INCLUDES_I) $(srcdir)/gen_structinfo.awk
@ -25,14 +29,6 @@ $(XCACHE_PROC_C): $(XCACHE_PROC_OUT) $(XCACHE_PROC_H)
cp $(XCACHE_PROC_OUT) $(XCACHE_PROC_C)
-$(XCACHE_INDENT) < $(XCACHE_PROC_OUT) > $(XCACHE_PROC_C).tmp && mv $(XCACHE_PROC_C).tmp $(XCACHE_PROC_C)
$(builddir)/xcache/xc_processor.lo: $(XCACHE_PROC_C) $(XCACHE_PROC_H)
$(builddir)/submodules/xc_disassembler.lo: $(XCACHE_PROC_H)
$(builddir)/xc_opcode_spec.lo: $(srcdir)/xcache.h $(srcdir)/xc_opcode_spec.c $(srcdir)/xc_opcode_spec_def.h $(srcdir)/xc_const_string.h
$(builddir)/xcache.lo: $(XCACHE_PROC_H) $(srcdir)/xcache/xc_shm.h $(srcdir)/util/xc_stack.h $(srcdir)/xcache_globals.h $(srcdir)/xcache.c $(srcdir)/util/xc_foreachcoresig.h $(srcdir)/xcache/xc_utils.h
xcachesvnclean: clean
-svn propget svn:ignore . > .svnignore.tmp 2>/dev/null && mv .svnignore.tmp .svnignore
cat .svnignore | grep -v devel | grep -v svnignore | grep -v ^Makefile | grep -v ^config.nice | xargs rm -rf

21
Makefile.frag.deps Normal file
View File

@ -0,0 +1,21 @@
$(builddir)/mod_decoder/xc_decoder.lo:
$(builddir)/mod_assembler/xc_assembler.lo:
$(builddir)/util/xc_stack.lo: $(srcdir)/util/xc_trace.h $(srcdir)/util/xc_stack.h
$(builddir)/util/xc_trace.lo: $(srcdir)/util/xc_trace.h
$(builddir)/xcache.lo: $(srcdir)/xcache.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_lock.h $(srcdir)/xcache/xc_compatibility.h $(srcdir)/xcache_globals.h $(srcdir)/util/xc_stack.h $(XCACHE_PROC_H) $(srcdir)/xcache/xc_const_string.h $(srcdir)/xcache/xc_opcode_spec.h $(srcdir)/xcache/xc_utils.h $(srcdir)/xcache.h $(srcdir)/xcache/xc_sandbox.h $(srcdir)/util/xc_align.h $(srcdir)/util/xc_vector.h $(srcdir)/util/xc_trace.h $(srcdir)/util/xc_foreachcoresig.h
$(builddir)/mod_coverager/xc_coverager.lo: $(srcdir)/xcache.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_lock.h $(srcdir)/xcache/xc_compatibility.h $(srcdir)/util/xc_stack.h $(srcdir)/util/xc_trace.h $(srcdir)/xcache_globals.h $(srcdir)/util/xc_stack.h $(srcdir)/mod_coverager/xc_coverager.h $(srcdir)/xcache/xc_utils.h $(srcdir)/xcache.h
$(builddir)/mod_disassembler/xc_disassembler.lo: $(srcdir)/mod_disassembler/xc_disassembler.h $(srcdir)/xcache.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_lock.h $(srcdir)/xcache/xc_compatibility.h $(srcdir)/xcache/xc_utils.h $(srcdir)/xcache.h $(srcdir)/xcache/xc_sandbox.h $(XCACHE_PROC_H)
$(builddir)/mod_optimizer/xc_optimizer.lo: $(srcdir)/xcache/xc_utils.h $(srcdir)/xcache.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_lock.h $(srcdir)/xcache/xc_compatibility.h $(srcdir)/mod_optimizer/xc_optimizer.h $(srcdir)/xcache.h $(srcdir)/util/xc_stack.h $(srcdir)/util/xc_trace.h $(srcdir)/xcache_globals.h $(srcdir)/util/xc_stack.h
$(builddir)/includes.lo: $(srcdir)/xcache.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_lock.h $(srcdir)/xcache/xc_compatibility.h
$(builddir)/mod_encoder/xc_encoder.lo:
$(builddir)/xcache/xc_shm_mmap.lo: $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h $(srcdir)/xcache/xc_utils.h $(srcdir)/xcache.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_lock.h $(srcdir)/xcache/xc_compatibility.h
$(builddir)/xcache/xc_utils.lo: $(srcdir)/xcache.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_lock.h $(srcdir)/xcache/xc_compatibility.h $(srcdir)/xcache_globals.h $(srcdir)/util/xc_stack.h $(srcdir)/xcache/xc_utils.h $(srcdir)/xcache.h $(srcdir)/xcache/xc_opcode_spec.h $(srcdir)/util/xc_trace.h
$(builddir)/xcache/xc_const_string.lo: $(srcdir)/xcache.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_lock.h $(srcdir)/xcache/xc_compatibility.h $(srcdir)/xcache/xc_const_string.h $(srcdir)/xcache/xc_const_string_opcodes_php5.4.h
$(builddir)/xcache/xc_sandbox.lo: $(srcdir)/xcache.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_lock.h $(srcdir)/xcache/xc_compatibility.h $(srcdir)/xcache/xc_sandbox.h $(srcdir)/xcache/xc_utils.h $(srcdir)/xcache.h $(srcdir)/xcache_globals.h $(srcdir)/util/xc_stack.h
$(builddir)/xcache/xc_shm.lo: $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h
$(builddir)/xcache/xc_mem.lo: $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h $(srcdir)/util/xc_align.h $(srcdir)/util/xc_trace.h
$(builddir)/xcache/xc_malloc.lo: $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h $(srcdir)/xcache/xc_utils.h $(srcdir)/xcache.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_lock.h $(srcdir)/xcache/xc_compatibility.h $(srcdir)/util/xc_align.h
$(builddir)/xcache/xc_lock.lo: $(srcdir)/xcache/xc_lock.h
$(builddir)/xcache/xc_compatibility.lo: $(srcdir)/xcache/xc_compatibility.h
$(builddir)/xcache/xc_opcode_spec.lo: $(srcdir)/xcache.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_lock.h $(srcdir)/xcache/xc_compatibility.h $(srcdir)/xcache/xc_opcode_spec.h $(srcdir)/xcache/xc_const_string.h $(srcdir)/xcache/xc_opcode_spec_def.h
$(builddir)/xcache/xc_processor.lo: $(XCACHE_PROC_C) $(srcdir)/xcache.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_mem.h $(srcdir)/xcache/xc_shm.h $(srcdir)/xcache/xc_lock.h $(srcdir)/xcache/xc_compatibility.h $(srcdir)/util/xc_align.h $(srcdir)/xcache/xc_const_string.h $(XCACHE_PROC_H) $(srcdir)/xcache_globals.h $(srcdir)/util/xc_stack.h

View File

@ -75,6 +75,7 @@ done
PHP_ADD_BUILD_DIR($ext_builddir/xcache)
PHP_ADD_BUILD_DIR($ext_builddir/submodules)
PHP_ADD_MAKEFILE_FRAGMENT()
PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/Makefile.frag.deps)
AC_PATH_PROGS([XCACHE_AWK], [gawk awk])
dnl clean locale for gawk 3.1.5 assertion bug

View File

@ -112,9 +112,11 @@ xc_utils.c \
mfo = null;
// }}}
// {{{ add make fragments
var file = srcdir + "\\Makefile.frag";
STDOUT.WriteLine("Adding Makefile.frag: " + file);
var frag = file_get_contents(file);
var makefileFrag = srcdir + "\\Makefile.frag";
var makefileFragDeps = srcdir + "\\Makefile.frag.deps";
STDOUT.WriteLine("Adding Makefile.frag: " + makefileFrag);
STDOUT.WriteLine("Adding Makefile.frag.deps: " + makefileFragDeps);
var frag = file_get_contents(makefileFrag) + "\r\n" + file_get_contents(makefileFragDeps);
frag = frag.replace(/\$\(srcdir\)\//g, srcdir + '\\');
frag = frag.replace(/\$\(srcdir\)/g, srcdir);
frag = frag.replace(/\$\(builddir\)\//g, builddir + '\\');

View File

@ -11,6 +11,48 @@ case "$type" in
prep*)
exec ./devel/prepare
;;
dep*)
pwd=$(readlink -f "$(pwd)")
builddir=$(readlink -f ../trunk-php5-debug)
if [[ -z $builddir ]]; then
echo required ../trunk-php5-debug not found
return 1
fi
find . -iname \*.c | while read -r sourceFile; do
sourceFile=${sourceFile#./}
echo -n "\$(builddir)/${sourceFile%.c}.lo:"
for dependency in $(gcc -M $sourceFile -I$HOME/test/php5-debug/include/php/{,main,Zend,TSRM} -I. -I${builddir} -MG | sed 's#.*:##g' | sed 's#\\##g'); do
dependency=$(readlink -f "$dependency")
case "$dependency" in
$pwd/*)
dependency=${dependency#$pwd/}
;;
$builddir/*)
dependency="\$(builddir)/"${dependency#$builddir/}
;;
esac
case "$dependency" in
/*) ;;
$sourceFile) ;;
\$\(builddir\)/xc_processor.h)
echo -n " \$(XCACHE_PROC_H)"
;;
\$\(builddir\)/xc_processor.c.h)
echo -n " \$(XCACHE_PROC_C)"
;;
*)
if [[ -r $dependency ]]; then
echo -n " \$(srcdir)/$dependency"
else
echo "$dependency not found" >&2
fi
esac
done
echo
done > Makefile.frag.deps
exit
;;
xtest)
exec /usr/bin/make -f devel/test.mak
;;