diff options
author | Gaetan Nadon <memsize@videotron.ca> | 2011-01-23 13:13:48 -0500 |
---|---|---|
committer | Gaetan Nadon <memsize@videotron.ca> | 2011-01-28 11:45:49 -0500 |
commit | 065ee3cba18d4a4949a57a5e656ea6adf7f1d241 (patch) | |
tree | aa4a770bc5797bda0a7ce0e1987662162068a1b3 | |
parent | a3d2a03340221e34fbf7191b8b35d6e48fc0f91f (diff) |
config: install contexts files using Automake
This replaces the *FIXME* shell code which "generates in place"
the contexts files rather than doing a proper installation using the
$INSTALL automake specified program.
Using Automake, we can now "uninstall" the commands.
The links in @Aliases will be dealt with in following patches,
in case in turns out they are not needed.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r-- | Makefile.am | 45 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | contexts/.gitignore | 1 | ||||
-rw-r--r-- | contexts/Makefile.am | 21 | ||||
-rw-r--r-- | contexts/x11r6.in (renamed from contexts/x11r6) | 4 |
5 files changed, 27 insertions, 47 deletions
diff --git a/Makefile.am b/Makefile.am index 9943520..ce8db02 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -SUBDIRS = man commands +SUBDIRS = man commands contexts # rstartd server @@ -61,52 +61,9 @@ EXTRA_DIST = rstart.in rstartd.in config.in MAINTAINERCLEANFILES = ChangeLog INSTALL CLEANFILES = rstart rstartd config -# -# commands and contexts -# - -# FIXME: Someone who cares about rstart may want to look into sanitizing -# the stuff below. - -install-data-hook: - (cd ${srcdir}; \ - for name in `find ./contexts -print | grep -v CVS` ; do \ - if test -f $$name; then \ - sed \ - -e 's,_PATH,$(DEFAULT_USER_PATH),g' \ - -e 's,_MANPATH,$(DEFAULT_X_MANPATH),g' \ - < $$name > $(DESTDIR)$(rstartdir)/$$name ; \ - else \ - if [ -d $$name ] ; then \ - mkdir -p $(DESTDIR)$(rstartdir)/$$name ; \ - fi ; \ - fi ; \ - done; \ - ); \ - \ - cd $(DESTDIR)$(rstartdir)/contexts; \ - sed -e '/^$$/d' -e '/^#/d' @Aliases | \ - while read real aliases; do \ - for i in $$aliases; do \ - $(RM) $$i; \ - $(LN) $$real $$i; \ - $(RM) $(DESTDIR)$(rstartdir)/commands/$$i; \ - $(LN) $$real $(DESTDIR)$(rstartdir)/commands/$$i; \ - done; \ - done; \ - $(RM) @Aliases - -distuninstallcheck: - @: - EXTRA_DIST += \ server.os2 \ \ - contexts/default \ - contexts/@Aliases \ - contexts/x11r6 \ - contexts/@List \ - \ samples/commands/openwindows2/Terminal \ samples/commands/openwindows2/LoadMonitor \ samples/commands/openwindows2/@List \ diff --git a/configure.ac b/configure.ac index 8119a7e..bac4fbc 100644 --- a/configure.ac +++ b/configure.ac @@ -62,5 +62,6 @@ AC_SUBST(DEFAULT_X_MANPATH) AC_CONFIG_FILES([ Makefile man/Makefile - commands/Makefile]) + commands/Makefile + contexts/Makefile]) AC_OUTPUT diff --git a/contexts/.gitignore b/contexts/.gitignore new file mode 100644 index 0000000..06e1d88 --- /dev/null +++ b/contexts/.gitignore @@ -0,0 +1 @@ +x11r6 diff --git a/contexts/Makefile.am b/contexts/Makefile.am new file mode 100644 index 0000000..f96dc15 --- /dev/null +++ b/contexts/Makefile.am @@ -0,0 +1,21 @@ + +contextsdir = $(rstartdir)/contexts +contexts_DATA = \ + x11r6 + +dist_contexts_DATA = \ + default \ + @List + +dist_noinst_DATA = \ + @Aliases \ + x11r6.in + +PATH_SUBSTS = \ + -e 's|@DEFAULT_X_MANPATH[@]|$(DEFAULT_X_MANPATH)|g' \ + -e 's|@DEFAULT_USER_PATH[@]|$(DEFAULT_USER_PATH)|g' + +x11r6: x11r6.in + $(AM_V_GEN)$(SED) $(PATH_SUBSTS) < $< > $@ + +CLEANFILES = $(contexts_DATA) diff --git a/contexts/x11r6 b/contexts/x11r6.in index 0bf9ffe..4d27192 100644 --- a/contexts/x11r6 +++ b/contexts/x11r6.in @@ -22,8 +22,8 @@ # OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -MISC X MANPATH=_MANPATH -MISC POSIX PATH=_PATH +MISC X MANPATH=@DEFAULT_X_MANPATH@ +MISC POSIX PATH=@DEFAULT_USER_PATH@ INTERNAL-AUTH-PROGRAM X11 xauth xauth INTERNAL-AUTH-INPUT X11 add\040$1\040$2\040$3 INTERNAL-AUTH-PROGRAM ICE iceauth iceauth |