srcdir = /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 builddir = /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 top_srcdir = /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 top_builddir = /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 EGREP = /usr/bin/grep -E SED = /usr/local/bin/sed CONFIGURE_COMMAND = './configure' '--enable-xcache=shared' '--with-php-config=/usr/local/bin/php-config' '--prefix=/usr/local' CONFIGURE_OPTIONS = '--enable-xcache=shared' '--with-php-config=/usr/local/bin/php-config' '--prefix=/usr/local' SHLIB_SUFFIX_NAME = so SHLIB_DL_SUFFIX_NAME = so RE2C = exit 0; AWK = gawk shared_objects_xcache = processor.lo xcache.lo mmap.lo mem.lo xc_malloc.lo xc_shm.lo const_string.lo opcode_spec.lo stack.lo utils.lo lock.lo PHP_PECL_EXTENSION = xcache XCACHE_ENABLE_TEST = XCACHE_AWK = LANG=C /usr/local/bin/gawk M4 = /usr/bin/m4 -B 102400 GREP = /usr/bin/grep SED = /usr/local/bin/sed XCACHE_INDENT = /usr/bin/indent -sob -nce XCACHE_PROC_SOURCES = /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor/dispatch.m4 /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor/hashtable.m4 /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor/head.m4 /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor/main.m4 /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor/processor.m4 /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor/string.m4 /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor/struct.m4 PHP_MODULES = $(phplibdir)/xcache.la all_targets = $(PHP_MODULES) install_targets = install-modules install-headers prefix = /usr/local exec_prefix = $(prefix) libdir = ${exec_prefix}/lib prefix = /usr/local phplibdir = /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/modules phpincludedir = /usr/local/include/php CC = cc CFLAGS = -fno-common CFLAGS_CLEAN = $(CFLAGS) CPP = cc -E CPPFLAGS = -DHAVE_CONFIG_H CXX = c++ CXXFLAGS = -fno-common CXXFLAGS_CLEAN = $(CXXFLAGS) EXTENSION_DIR = /usr/local/lib/php/20060613 PHP_EXECUTABLE = /usr/local/bin/php EXTRA_LDFLAGS = EXTRA_LIBS = INCLUDES = -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib LFLAGS = LDFLAGS = SHARED_LIBTOOL = LIBTOOL = $(SHELL) $(top_builddir)/libtool SHELL = /bin/sh INSTALL_HEADERS = mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p INSTALL = $(top_srcdir)/build/shtool install -c INSTALL_DATA = $(INSTALL) -m 644 DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir) COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH) all: $(all_targets) @echo @echo "Build complete." @echo "Don't forget to run 'make test'." @echo build-modules: $(PHP_MODULES) libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1 libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so install: $(all_targets) $(install_targets) install-sapi: $(OVERALL_TARGET) @echo "Installing PHP SAPI module: $(PHP_SAPI)" -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) -@if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \ for i in 0.0.0 0.0 0; do \ if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \ $(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \ break; \ fi; \ done; \ fi @$(INSTALL_IT) install-modules: build-modules @test -d modules && \ $(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) @echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/" @rm -f modules/*.la >/dev/null 2>&1 @$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) install-headers: -@if test "$(INSTALL_HEADERS)"; then \ for i in `echo $(INSTALL_HEADERS)`; do \ i=`$(top_srcdir)/build/shtool path -d $$i`; \ paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \ done; \ $(mkinstalldirs) $$paths && \ echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \ for i in `echo $(INSTALL_HEADERS)`; do \ if test "$(PHP_PECL_EXTENSION)"; then \ src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \ else \ src=$$i; \ fi; \ if test -f "$(top_srcdir)/$$src"; then \ $(INSTALL_DATA) $(top_srcdir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \ elif test -f "$(top_builddir)/$$src"; then \ $(INSTALL_DATA) $(top_builddir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \ else \ (cd $(top_srcdir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \ cd $(top_builddir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \ fi \ done; \ fi PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' PHP_TEST_SHARED_EXTENSIONS = ` \ if test "x$(PHP_MODULES)" != "x"; then \ for i in $(PHP_MODULES)""; do \ . $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \ done; \ fi` test: all -@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \ TEST_PHP_SRCDIR=$(top_srcdir) \ CC="$(CC)" \ $(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -U -d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \ elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \ INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \ if test "$$INI_FILE"; then \ $(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \ else \ echo > $(top_builddir)/tmp-php.ini; \ fi; \ TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ TEST_PHP_SRCDIR=$(top_srcdir) \ CC="$(CC)" \ $(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -U -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \ else \ echo "ERROR: Cannot run tests without CLI sapi."; \ fi utest: all -@if test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \ INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \ if test "$$INI_FILE"; then \ $(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \ else \ echo > $(top_builddir)/tmp-php.ini; \ fi; \ TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ TEST_PHP_SRCDIR=$(top_srcdir) \ CC="$(CC)" \ $(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -u -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \ else \ echo "ERROR: Cannot run tests without CLI sapi."; \ fi ntest: all -@if test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \ INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \ if test "$$INI_FILE"; then \ $(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \ else \ echo > $(top_builddir)/tmp-php.ini; \ fi; \ TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ TEST_PHP_SRCDIR=$(top_srcdir) \ CC="$(CC)" \ $(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -N -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \ else \ echo "ERROR: Cannot run tests without CLI sapi."; \ fi clean: find . -name \*.gcno -o -name \*.gcda | xargs rm -f find . -name \*.lo -o -name \*.o | xargs rm -f find . -name \*.la -o -name \*.a | xargs rm -f find . -name \*.so | xargs rm -f find . -name .libs -a -type d|xargs rm -rf rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/* distclean: clean rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp $(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f find . -name Makefile | xargs rm -f .PHONY: all clean install distclean test .NOEXPORT: XCACHE_PROC_SRC=/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor/main.m4 XCACHE_PROC_OUT=./processor.out XCACHE_PROC_C=./processor_real.c XCACHE_PROC_H=./processor.h XCACHE_INCLUDES_SRC=/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/includes.c XCACHE_INCLUDES_I=./includes.i XCACHE_STRUCTINFO_OUT=./structinfo.m4 $(XCACHE_INCLUDES_I): $(XCACHE_INCLUDES_SRC) /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xcache.h $(CC) -I. -I/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -E $(XCACHE_INCLUDES_SRC) -o $(XCACHE_INCLUDES_I) $(XCACHE_STRUCTINFO_OUT): $(XCACHE_INCLUDES_I) /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/mkstructinfo.awk @echo $(XCACHE_STRUCTINFO_OUT) is optional if XCache test is not enabled, feel free if it awk failed to produce it -$(XCACHE_AWK) -f /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/mkstructinfo.awk < $(XCACHE_INCLUDES_I) > $(XCACHE_STRUCTINFO_OUT).tmp && mv -f $(XCACHE_STRUCTINFO_OUT).tmp $(XCACHE_STRUCTINFO_OUT) $(XCACHE_PROC_OUT): $(XCACHE_PROC_SRC) $(XCACHE_STRUCTINFO_OUT) $(XCACHE_PROC_SOURCES) $(M4) -D srcdir="/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1" -D builddir="." $(XCACHE_ENABLE_TEST) $(XCACHE_PROC_SRC) > $(XCACHE_PROC_OUT).tmp mv -f $(XCACHE_PROC_OUT).tmp $(XCACHE_PROC_OUT) $(XCACHE_PROC_H): $(XCACHE_PROC_OUT) $(GREP) 'export: ' $(XCACHE_PROC_OUT) | $(SED) 's/.*export:\(.*\):export.*/\1/g' | $(XCACHE_INDENT) > $(XCACHE_PROC_H).tmp mv -f $(XCACHE_PROC_H).tmp $(XCACHE_PROC_H) $(XCACHE_PROC_C): $(XCACHE_PROC_OUT) $(XCACHE_PROC_H) $(XCACHE_INDENT) < $(XCACHE_PROC_OUT) > $(XCACHE_PROC_C).tmp mv -f $(XCACHE_PROC_C).tmp $(XCACHE_PROC_C) ./processor.lo: $(XCACHE_PROC_C) $(XCACHE_PROC_H) /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor.c processor.lo: $(XCACHE_PROC_C) $(XCACHE_PROC_H) /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor.c ./disassembler.lo: $(XCACHE_PROC_H) /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor.c disassembler.lo: $(XCACHE_PROC_H) /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor.c ./xcache.lo: $(XCACHE_PROC_H) /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xc_shm.h /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/stack.h /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xcache_globals.h /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xcache.c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/foreachcoresig.h xcache.lo: $(XCACHE_PROC_H) /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xc_shm.h /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/stack.h /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xcache_globals.h /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xcache.c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/foreachcoresig.h xcachesvnclean: clean cat /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/.cvsignore | grep -v ^Makefile | grep -v ^config.nice | xargs rm -rf xcachetest: TEST_PHP_SRCDIR=$(top_srcdir) \ CC="$(CC)" \ /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/run-xcachetest -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS) -c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xcache-test.ini processor.lo: /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor.c $(LIBTOOL) --mode=compile $(CC) -I. -I/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/processor.c -o processor.lo xcache.lo: /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xcache.c $(LIBTOOL) --mode=compile $(CC) -I. -I/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xcache.c -o xcache.lo mmap.lo: /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/mmap.c $(LIBTOOL) --mode=compile $(CC) -I. -I/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/mmap.c -o mmap.lo mem.lo: /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/mem.c $(LIBTOOL) --mode=compile $(CC) -I. -I/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/mem.c -o mem.lo xc_malloc.lo: /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xc_malloc.c $(LIBTOOL) --mode=compile $(CC) -I. -I/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xc_malloc.c -o xc_malloc.lo xc_shm.lo: /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xc_shm.c $(LIBTOOL) --mode=compile $(CC) -I. -I/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/xc_shm.c -o xc_shm.lo const_string.lo: /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/const_string.c $(LIBTOOL) --mode=compile $(CC) -I. -I/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/const_string.c -o const_string.lo opcode_spec.lo: /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/opcode_spec.c $(LIBTOOL) --mode=compile $(CC) -I. -I/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/opcode_spec.c -o opcode_spec.lo stack.lo: /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/stack.c $(LIBTOOL) --mode=compile $(CC) -I. -I/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/stack.c -o stack.lo utils.lo: /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/utils.c $(LIBTOOL) --mode=compile $(CC) -I. -I/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/utils.c -o utils.lo lock.lo: /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/lock.c $(LIBTOOL) --mode=compile $(CC) -I. -I/mnt/gmirror/ports/www/xcache/work/xcache-1.2.1 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /mnt/gmirror/ports/www/xcache/work/xcache-1.2.1/lock.c -o lock.lo $(phplibdir)/xcache.la: ./xcache.la $(LIBTOOL) --mode=install cp ./xcache.la $(phplibdir) ./xcache.la: $(shared_objects_xcache) $(XCACHE_SHARED_DEPENDENCIES) $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_xcache) $(XCACHE_SHARED_LIBADD)