Browse files

safer make install

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@802 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
1 parent ce6538e commit 577b51fb158d24cda7b6002a9ca0bc1600da41b8 @klacke committed Dec 13, 2004
Showing with 17 additions and 1 deletion.
  1. +17 −1 Makefile
View
18 Makefile
@@ -3,13 +3,29 @@ SUBDIRS = c_src src man www/shopingcart www/code doc scripts
include ./include.mk
-all debug clean install:
+all debug clean:
@set -e ; \
for d in $(SUBDIRS) ; do \
if [ -f $$d/Makefile ]; then ( cd $$d && $(MAKE) $@ ) || exit 1 ; fi ; \
done
+install: all
+ @yrun=`yaws -S 2> /dev/null`; \
+ case $$yrun in \
+ *Uptime*) \
+ echo "ERROR Can't install while a yaws system is already running, would wreak havoc with /tmp/yaws"; \
+ exit;; \
+ *) \
+ true;; \
+ esac; \
+ set -e ; \
+ for d in $(SUBDIRS) ; do \
+ if [ -f $$d/Makefile ]; then ( cd $$d && $(MAKE) $@ ) || exit 1 ; fi ; \
+ done
+
+
+
docs:
( cd doc && $(MAKE) docs )

0 comments on commit 577b51f

Please sign in to comment.