From: Andreas A. <a.a...@th...> - 2001-08-26 12:09:46
|
Hi Alex, That's how I would do it: 1: We use a unix standard location for the shell interpreter i.e. #!/usr/bin/php (creating a symlink isn't that hard, but only needed for debugging purposes, see below) 2: For the make process we introduce an new variable in Makefile.in that is determined by a configure script i.e: PHPCMD= "{by configure determined location}" (after configure e.g. PHPCMD="/usr/local/bin/php -q") in Makefiles that use command line php we just use this syntax: @$(PHPCMD) $(XML2PHP) ... options etcpp pros: - the php command is in a single place - configure don't has to modify all php shell scripts - Actually we could leave out the #! line and with some mods the scripts could be "incldable" and used through the web (maybe we need this later => builing triggerd via an admin interface or whatever might be useful in the future). Andi >> 3) We should find a way to have a the interpreter >> line in the php files more flexible through the >> different platforms. Perl has a trick to do so >> eval 'exec perl -S $0 "$@"' > > agreed, I was going to suggest a simple ./configure.sh which > would do a grep for a php command line key. > > any other ideas? |