VERSION := $(shell sed -n 's/\$$version = "\(.*\)";$$/\1/p' common.inc) default: suid nosuid: setup chmod -R a+w cache suid: setup @echo "Performing suid install--I hope you're not doing this as" @echo "root! If this doesn't work, try" @echo " make nosuid" chmod u+s convwrap setup: convwrap [ -f config.inc ] || cp dfl_config.inc config.inc [ -f style.css ] || cp dfl_style.css style.css convwrap: convwrap.c convwrap.h $(CC) $(CPPFLAGS) $(CFLAGS) $< -o $@ convwrap.h: ifdef BASEPATH echo "#define BASEPATH \"$(BASEPATH)\"" > convwrap.h else echo "#define BASEPATH \"`pwd`\"" > convwrap.h endif # # Everything below here is stuff I use to make the distribution # clean: find . -name \*~ -exec rm -f {} \; rm -f convwrap cache-clean: find cache -name \*__scaled\* -exec rm -f {} \; dist: dist-clean stubs cd .. && tar jcf $(HOME)/tmp/phpixdir-$(VERSION).tbz --group=0 --owner=0 --exclude=CVS phpixdir zip: rm -f $(HOME)/tmp/phpix-$(VERSION).zip cd .. && zip -q -r $(HOME)/tmp/phpix-$(VERSION).zip phpix dist-clean: clean cache-clean rm -f convwrap.h stubs: ([ -f config.inc ] && mv config.inc dfl_config.inc) || true ([ -f style.css ] && mv style.css dfl_style.css) || true