[PHP] The deprecated command line option "-make" has been removed.
Searches on Google codesearch suggest that nobody is using it now anyway. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10649 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1e6d6b2708
commit
70ff1c3005
4 changed files with 10 additions and 76 deletions
|
|
@ -1,6 +1,11 @@
|
|||
Version 1.3.37 (in progress)
|
||||
=============================
|
||||
|
||||
2008-07-03: olly
|
||||
[PHP] The deprecated command line option "-make" has been removed.
|
||||
Searches on Google codesearch suggest that nobody is using it now
|
||||
anyway.
|
||||
|
||||
2008-07-04: olly
|
||||
[PHP] The SWIG cdata.i library module is now supported.
|
||||
|
||||
|
|
|
|||
|
|
@ -131,16 +131,6 @@ least work for Linux though):
|
|||
gcc -shared example_wrap.o -o example.so
|
||||
</pre></div>
|
||||
|
||||
<p>
|
||||
There is a deprecated <tt>-make</tt> command line argument to swig which will
|
||||
generate an additional file <tt>makefile</tt> which can usually build the
|
||||
extension (at least on some UNIX platforms), but the Makefile generated isn't
|
||||
very flexible, and the commands required are trivial so it is simpler to just
|
||||
add them to your Makefile or other build system directly. We recommend that
|
||||
you don't use <tt>-make</tt> and it's likely to be removed at some point.
|
||||
</p>
|
||||
|
||||
|
||||
<H3><a name="Php_nn1_3"></a>28.1.3 Using PHP Extensions</H3>
|
||||
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
#! /bin/sh -e
|
||||
|
||||
${SWIG:=swig} -php4 -make -c++ -withcxx example.cxx example.i
|
||||
make
|
||||
php -d extension_dir=. runme-proxy.php4
|
||||
|
|
@ -52,7 +52,6 @@ PHP Options (available with -php5)\n\
|
|||
-cppext - cpp file extension (default to .cpp)\n\
|
||||
-noproxy - Don't generate proxy classes.\n\
|
||||
-prefix <prefix> - Prepend <prefix> to all class names in PHP5 wrappers\n\
|
||||
-make - Create simple makefile\n\
|
||||
\n";
|
||||
|
||||
/* The original class wrappers for PHP4 store the pointer to the C++ class in
|
||||
|
|
@ -69,13 +68,9 @@ static Node *classnode = 0;
|
|||
static String *module = 0;
|
||||
static String *cap_module = 0;
|
||||
static String *prefix = 0;
|
||||
static String *withc = 0;
|
||||
static String *withcxx = 0;
|
||||
|
||||
static String *shadow_classname = 0;
|
||||
|
||||
static int gen_make = 0;
|
||||
|
||||
static File *f_runtime = 0;
|
||||
static File *f_h = 0;
|
||||
static File *f_phpcode = 0;
|
||||
|
|
@ -216,24 +211,6 @@ public:
|
|||
} else {
|
||||
Swig_arg_error();
|
||||
}
|
||||
} else if (strcmp(argv[i], "-withc") == 0) {
|
||||
if (argv[i + 1]) {
|
||||
withc = NewString(argv[i + 1]);
|
||||
Swig_mark_arg(i);
|
||||
Swig_mark_arg(i + 1);
|
||||
i++;
|
||||
} else {
|
||||
Swig_arg_error();
|
||||
}
|
||||
} else if (strcmp(argv[i], "-withcxx") == 0) {
|
||||
if (argv[i + 1]) {
|
||||
withcxx = NewString(argv[i + 1]);
|
||||
Swig_mark_arg(i);
|
||||
Swig_mark_arg(i + 1);
|
||||
i++;
|
||||
} else {
|
||||
Swig_arg_error();
|
||||
}
|
||||
} else if (strcmp(argv[i], "-cppext") == 0) {
|
||||
if (argv[i + 1]) {
|
||||
SWIG_config_cppext(argv[i + 1]);
|
||||
|
|
@ -246,11 +223,13 @@ public:
|
|||
} else if ((strcmp(argv[i], "-noshadow") == 0) || (strcmp(argv[i], "-noproxy") == 0)) {
|
||||
shadow = 0;
|
||||
Swig_mark_arg(i);
|
||||
} else if (strcmp(argv[i], "-make") == 0) {
|
||||
gen_make = 1;
|
||||
Swig_mark_arg(i);
|
||||
} else if (strcmp(argv[i], "-help") == 0) {
|
||||
fputs(usage, stdout);
|
||||
} else if (strcmp(argv[i], "-make") == 0 ||
|
||||
strcmp(argv[i], "-withc") == 0 ||
|
||||
strcmp(argv[i], "-withcxx") == 0) {
|
||||
Printf(stderr, "*** %s is no longer supported.\n", argv[i]);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
} else if (strcmp(argv[i], "-phpfull") == 0 ||
|
||||
strcmp(argv[i], "-withlibs") == 0 ||
|
||||
strcmp(argv[i], "-withincs") == 0) {
|
||||
|
|
@ -269,37 +248,6 @@ public:
|
|||
allow_overloading();
|
||||
}
|
||||
|
||||
void create_simple_make(void) {
|
||||
File *f_make;
|
||||
|
||||
f_make = NewFile((void *) "makefile", "w");
|
||||
Printf(f_make, "CC=gcc\n");
|
||||
Printf(f_make, "CXX=g++\n");
|
||||
Printf(f_make, "CXX_SOURCES=%s\n", withcxx);
|
||||
Printf(f_make, "C_SOURCES=%s\n", withc);
|
||||
Printf(f_make, "OBJS=%s_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o)\n", module);
|
||||
Printf(f_make, "MODULE=%s.so\n", module);
|
||||
Printf(f_make, "CFLAGS=-fpic\n");
|
||||
Printf(f_make, "LDFLAGS=-shared\n");
|
||||
Printf(f_make, "PHP_INC=`php-config --includes`\n");
|
||||
Printf(f_make, "EXTRA_INC=\n");
|
||||
Printf(f_make, "EXTRA_LIB=\n\n");
|
||||
Printf(f_make, "$(MODULE): $(OBJS)\n");
|
||||
if (CPlusPlus || (withcxx != NULL)) {
|
||||
Printf(f_make, "\t$(CXX) $(LDFLAGS) $(OBJS) -o $@ $(EXTRA_LIB)\n\n");
|
||||
} else {
|
||||
Printf(f_make, "\t$(CC) $(LDFLAGS) $(OBJS) -o $@ $(EXTRA_LIB)\n\n");
|
||||
}
|
||||
Printf(f_make, "%%.o: %%.cpp\n");
|
||||
Printf(f_make, "\t$(CXX) $(EXTRA_INC) $(PHP_INC) $(CFLAGS) -c $<\n");
|
||||
Printf(f_make, "%%.o: %%.cxx\n");
|
||||
Printf(f_make, "\t$(CXX) $(EXTRA_INC) $(PHP_INC) $(CFLAGS) -c $<\n");
|
||||
Printf(f_make, "%%.o: %%.c\n");
|
||||
Printf(f_make, "\t$(CC) $(EXTRA_INC) $(PHP_INC) $(CFLAGS) -c $<\n");
|
||||
|
||||
Close(f_make);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* top()
|
||||
* ------------------------------------------------------------ */
|
||||
|
|
@ -595,10 +543,6 @@ public:
|
|||
Printf(f_phpcode, "%s\n?>\n", s_phpclasses);
|
||||
Close(f_phpcode);
|
||||
|
||||
if (gen_make) {
|
||||
create_simple_make();
|
||||
}
|
||||
|
||||
return SWIG_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue