diff options
author | Gaetan Nadon <memsize@videotron.ca> | 2011-01-22 19:45:58 -0500 |
---|---|---|
committer | Gaetan Nadon <memsize@videotron.ca> | 2011-01-28 11:45:49 -0500 |
commit | 5461407fd29ea0804567af85b7f48f22c960dd2d (patch) | |
tree | 2283f4418f00bb3357355f78e3f6fc16b8a60930 | |
parent | 4ddce1b4a83514a6a6555aa65a8b66f80e5fc9dc (diff) |
config: use sed rather than cpp to substitute directory values
Use @rstartdir@ from autconf to obtain the $libdir/X11/rstart value.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r-- | Makefile.am | 9 | ||||
-rw-r--r-- | rstartd.in | 29 | ||||
-rw-r--r-- | server.cpp | 29 |
3 files changed, 33 insertions, 34 deletions
diff --git a/Makefile.am b/Makefile.am index c867280..857430f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -67,12 +67,11 @@ rstart: client.cpp $(AM_V_GEN) $(RAWCPP) $(RAWCPPFLAGS) -DRSHCMD=$(RSH) \ < ${srcdir}/client.cpp | $(CPP_SED_MAGIC) > $@ -rstartd: server.cpp - $(AM_V_GEN) $(RAWCPP) $(RAWCPPFLAGS) \ - -DLIBDIR=$(rstartdir) < ${srcdir}/server.cpp | \ - $(CPP_SED_MAGIC) > $@ +RSTARTD_SUBSTS = -e 's|@rstartdir[@]|$(rstartdir)|g' +rstartd: rstartd.in + $(AM_V_GEN)$(SED) $(RSTARTD_SUBSTS) < $< > $@ -EXTRA_DIST = client.cpp server.cpp config.cpp +EXTRA_DIST = client.cpp rstartd.in config.cpp MAINTAINERCLEANFILES = ChangeLog INSTALL CLEANFILES = rstart rstartd config diff --git a/rstartd.in b/rstartd.in new file mode 100644 index 0000000..255e96c --- /dev/null +++ b/rstartd.in @@ -0,0 +1,29 @@ +#! /bin/sh +# $Xorg: server.cpp,v 1.3 2000/08/17 19:54:01 cpqbld Exp $ +# + +# Copyright (c) 1993 Quarterdeck Office Systems +# +# Permission to use, copy, modify, distribute, and sell this software +# and software and its documentation for any purpose is hereby granted +# without fee, provided that the above copyright notice appear in all +# copies and that both that copyright notice and this permission +# notice appear in supporting documentation, and that the name +# Quarterdeck Office Systems, Inc. not be used in advertising or +# publicity pertaining to distribution of this software without +# specific, written prior permission. +# +# THIS SOFTWARE IS PROVIDED "AS-IS". QUARTERDECK OFFICE SYSTEMS, +# INC., DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +# NONINFRINGEMENT. IN NO EVENT SHALL QUARTERDECK OFFICE SYSTEMS, +# INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING SPECIAL, +# INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA, OR +# PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS +# OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT +# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +# $XFree86: xc/programs/rstart/server.cpp,v 3.2 2001/01/17 23:45:03 dawes Exp $ + +exec @rstartdir@/rstartd.real -c @rstartdir@/config diff --git a/server.cpp b/server.cpp deleted file mode 100644 index dcb7bd2..0000000 --- a/server.cpp +++ /dev/null @@ -1,29 +0,0 @@ -XCOMM! /bin/sh -XCOMM $Xorg: server.cpp,v 1.3 2000/08/17 19:54:01 cpqbld Exp $ -XCOMM - -XCOMM Copyright (c) 1993 Quarterdeck Office Systems -XCOMM -XCOMM Permission to use, copy, modify, distribute, and sell this software -XCOMM and software and its documentation for any purpose is hereby granted -XCOMM without fee, provided that the above copyright notice appear in all -XCOMM copies and that both that copyright notice and this permission -XCOMM notice appear in supporting documentation, and that the name -XCOMM Quarterdeck Office Systems, Inc. not be used in advertising or -XCOMM publicity pertaining to distribution of this software without -XCOMM specific, written prior permission. -XCOMM -XCOMM THIS SOFTWARE IS PROVIDED "AS-IS". QUARTERDECK OFFICE SYSTEMS, -XCOMM INC., DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -XCOMM INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF -XCOMM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -XCOMM NONINFRINGEMENT. IN NO EVENT SHALL QUARTERDECK OFFICE SYSTEMS, -XCOMM INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING SPECIAL, -XCOMM INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA, OR -XCOMM PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS -XCOMM OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT -XCOMM OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -XCOMM -XCOMM $XFree86: xc/programs/rstart/server.cpp,v 3.2 2001/01/17 23:45:03 dawes Exp $ - -exec LIBDIR/rstartd.real -c LIBDIR/config |