Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Build chain modifications: Install target directories is now totally …

…controllable; The docs build is optionnal

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@379 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
commit deddbfc8486cb651f2daa7351dad9644b602c514 1 parent 9b2d765
Mikael Karlsson authored
14 ChangeLog
View
@@ -1,3 +1,17 @@
+2003-04-10 08:10 mikl
+
+ * include.mk.in, Makefile, README, scripts/Install,
+ scripts/Makefile, src/Makefile, www/shopingcart/Makefile,
+ doc/Makefile, ChangeLog: Small modifications of the build
+ system. The build of the documentation is now optional to simplify
+ build on server where Latex is not present. You now have to
+ explicitly type 'make docs' before install.
+ I also removed the hard coded path in the build Makefile. The path
+ of the install is now fully configurable with configure options
+ (--localstatedir for /var and --sysconfdir for /etc). This is
+ usefull to install everything in a specific directory and use the
+ Stow tool to create symlinks to /usr/local/
+
2003-03-06 12:22 klacke
* Makefile, src/yaws_compile.erl, src/yaws_server.erl: skip empty
4 Makefile
View
@@ -9,7 +9,9 @@ all debug clean install:
if [ -f $$d/Makefile ]; then ( cd $$d && $(MAKE) $@ ) || exit 1 ; fi ; \
done
-
+# mremond: The build of the doc is better optionnal (latex is not always installed on servers)
+docs:
+ ( cd doc && $(MAKE) docs )
conf_clean:
-rm include.mk config.cache config.status config.log 2> /dev/null
15 README
View
@@ -9,9 +9,24 @@ To build and install
2. ./configure --prefix=/usr/local
+Note: If can also change the target directory for etc and var directories by using:
+ --localstatedir=DIR for files that should go in /var
+ --sysconfdir=DIR for files that should go in /etc
+This way you can precisely control where you install the software (This is
+usefull for computers where you do not have right access to the standard system
+dirs). It is now possible to install everything in a single directory
+and use Stow to create symlinks to /usr/local
+For example:
+./configure --prefix=/home/install/yaws-1.01 --localstatedir=/home/install/yaws-1.01/var --sysconfdir=/home/install/yaws-1.01/etc
+
+
3. make
This will build the system
+ make docs
+ (Optionnal) You can issue this command if you want to build Yaws
+ documentation.
+
make local_install
and perform something we call a
local install. It will create an executable script in the bin directory
13 doc/Makefile
View
@@ -1,8 +1,8 @@
+include ../include.mk
-
-
-all debug: yaws.ps yaws.pdf
+all debug:
+ echo "To build the docs, please use make docs before doing make install"
yaws.ps: yaws.dvi
-dvips -o yaws.ps yaws.dvi
@@ -10,7 +10,7 @@ yaws.ps: yaws.dvi
yaws.pdf: yaws.dvi
-dvipdf yaws.dvi
- cp yaws.pdf ../www
+ -cp yaws.pdf ../www
yaws.dvi: yaws.tex
-latex yaws.tex
@@ -19,5 +19,6 @@ clean:
-rm *~ *.ps *.dvi *.log *.aux *.pdf *.toc *.beam 2> /dev/null
install:
- -install -d /usr/local/share/doc/yaws
- -cp yaws.pdf yaws.ps /usr/local/share/doc/yaws
+ -install -d $(INSTALLPREFIX)/share/doc/yaws
+ -cp yaws.pdf $(INSTALLPREFIX)/share/doc/yaws
+ -cp yaws.ps $(INSTALLPREFIX)/share/doc/yaws
2  include.mk.in
View
@@ -1,6 +1,8 @@
###-*-makefile-*- ; force emacs to enter makefile-mode
INSTALLPREFIX = @prefix@
+ETCDIR = @sysconfdir@
+VARDIR = @localstatedir@
ERL=@ERL@
ERLC=@ERLC@
11 scripts/Install
View
@@ -13,15 +13,16 @@ sh ./mangle ${prefix}/lib/yaws ${erl} yaws.ss ${prefix}/bin/yaws
install -d ${prefix}/lib/yaws/examples/ebin
install -d ${prefix}/lib/yaws/examples/include
chmod +x ${prefix}/bin/yaws
-if [ -f /etc/yaws.conf ]; then
- t=/etc/yaws.conf.template
+if [ -f ${etcdir}/yaws.conf ]; then
+ t=${etcdir}/yaws.conf.template
else
- t=/etc/yaws.conf
+ t=${etcdir}/yaws.conf
fi
sh ./mangle ${prefix}/lib/yaws ${erl} yaws.conf.template ${t}
if [ `uname` = Linux ]; then
- cp yaws.init.d /etc/init.d/yaws
- chmod +x /etc/init.d/yaws
+ install -d ${etcdir}/init.d
+ cp yaws.init.d ${etcdir}/init.d/yaws
+ chmod +x ${etcdir}/init.d/yaws
fi
2  scripts/Makefile
View
@@ -20,7 +20,7 @@ clean:
rm -f ../bin/yaws
install: all
- sh ./Install $(INSTALLPREFIX) $(ERL)
+ sh ./Install $(INSTALLPREFIX) $(ERL) $(ETCDIR)
8 src/Makefile
View
@@ -53,14 +53,14 @@ install: all docsinstall
install -d $(INSTALLPREFIX)/lib/yaws/examples/ebin
install -d $(INSTALLPREFIX)/lib/yaws/examples/include
install -d $(INSTALLPREFIX)/lib/yaws/ebin
- install -d /var/log/yaws
- install -d /var/yaws/ebin
+ install -d $(VARDIR)/log/yaws
+ install -d $(VARDIR)/yaws/ebin
(cd ..; tar cf - ebin ) | (cd $(INSTALLPREFIX)/lib/yaws; tar xf - )
(cd ..; tar cf - include ) | (cd $(INSTALLPREFIX)/lib/yaws; tar xf - )
docsinstall:
- install -d /var/yaws/www
- (cd ..; tar cf - www ) | (cd /var/yaws; tar xf - )
+ install -d $(VARDIR)/yaws/www
+ (cd ..; tar cf - www ) | (cd $(VARDIR)/yaws; tar xf - )
3  www/shopingcart/Makefile
View
@@ -1,10 +1,11 @@
+include ../../include.mk
all: shopcart.beam
cp shopcart.beam ../../examples/ebin
debug:
install: all
- cp shopcart.beam /var/yaws/ebin
+ cp shopcart.beam $(VARDIR)/yaws/ebin
clean:
$(RM) shopcart.beam
Please sign in to comment.
Something went wrong with that request. Please try again.