Commit d0b4bae9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Changes to fix PHP_SELF when running PHP scripts

parent 89bf3c26
...@@ -38,14 +38,16 @@ clean: clean-recursive ...@@ -38,14 +38,16 @@ clean: clean-recursive
%-recursive: %-recursive:
@for d in $(SUBDIR) ; do \ @for d in $(SUBDIR) ; do \
$(MAKE) -f $(NEXTROOT)Makefile -C $$d ROOT=$(NEXTROOT) $* \ $(MAKE) -f $(NEXTROOT)Makefile -C $$d ROOT=$(NEXTROOT) $* \
|| exit $$? ; \ HERE=$(HERE)$$d/ || exit $$? ; \
done done
%.html: %.php $(ROOT)Makefile %.html: %.php $(ROOT)Makefile
@echo "Preprocessing $@ ..." @echo "Preprocessing $@ ..."
@rm -f $@.tmp @rm -f $@.tmp
@if ! DOCUMENT_ROOT=$(ROOT) $(PHPCGI) $< > $@.tmp; then \ @cd $(ROOT) || exit 1 ; \
cat $@.tmp | tail -1 ; \ if ! DOCUMENT_ROOT=$(ROOT) $(HERE)$(PHPCGI) $(HERE)$< > $(HERE)$@.tmp; then \
cat $(HERE)$@.tmp | tail -1 ; \
rm -f $(HERE)$@.tmp ; \
exit 1 ; \ exit 1 ; \
fi fi
@$(STRIP_HEADERS) < $@.tmp > $@ @$(STRIP_HEADERS) < $@.tmp > $@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment