qemacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-devel] [PATCH] configure: accept --datadir and --mandir


From: François Revol
Subject: [Qemacs-devel] [PATCH] configure: accept --datadir and --mandir
Date: Fri, 20 Dec 2013 11:57:46 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130630 Icedove/17.0.7

Hi,

In Haiku we don't have share/ at the usual prefix, and man pages are in
documentation/man/...

So we need to pass those to configure.

This patch adds --datadir and --mandir support, the autofools way.

François.

Index: Makefile
===================================================================
RCS file: /sources/qemacs/qemacs/Makefile,v
retrieving revision 1.55
diff -u -r1.55 Makefile
--- Makefile    17 Dec 2013 23:13:47 -0000      1.55
+++ Makefile    20 Dec 2013 10:54:21 -0000
@@ -266,7 +266,7 @@
       Hebrew.kmap HebrewIsraeli.kmap HebrewP.kmap Israeli.kmap
Yiddish.kmap \
       Kana.kmap
 #     Hangul.kmap Hangul2.kmap Hangul3.kmap Unicode2.kmap
-#KMAPS_DIR=$(prefix)/share/yudit/data
+#KMAPS_DIR=$(datadir)/yudit/data
 KMAPS_DIR=kmap
 KMAPS:=$(addprefix $(KMAPS_DIR)/, $(KMAPS))

@@ -366,15 +366,15 @@

 install: $(TARGETS) qe.1
        $(INSTALL) -m 755 -d $(DESTDIR)$(prefix)/bin
-       $(INSTALL) -m 755 -d $(DESTDIR)$(prefix)/man/man1
-       $(INSTALL) -m 755 -d $(DESTDIR)$(prefix)/share/qe
+       $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
+       $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/qe
        $(INSTALL) -m 755 -s qe$(EXE) $(DESTDIR)$(prefix)/bin/qemacs$(EXE)
        ln -sf qemacs $(DESTDIR)$(prefix)/bin/qe$(EXE)
 ifdef CONFIG_FFMPEG
        ln -sf qemacs$(EXE) $(DESTDIR)$(prefix)/bin/ffplay$(EXE)
 endif
-       $(INSTALL) -m 644 kmaps ligatures $(DESTDIR)$(prefix)/share/qe
-       $(INSTALL) -m 644 qe.1 $(DESTDIR)$(prefix)/man/man1
+       $(INSTALL) -m 644 kmaps ligatures $(DESTDIR)$(datadir)/qe
+       $(INSTALL) -m 644 qe.1 $(DESTDIR)$(mandir)/man1
 ifdef CONFIG_HTML
        $(INSTALL) -m 755 -s html2png$(EXE) $(DESTDIR)$(prefix)/bin
 endif
@@ -383,9 +383,9 @@
        rm -f $(DESTDIR)$(prefix)/bin/qemacs$(EXE)   \
              $(DESTDIR)$(prefix)/bin/qe$(EXE)       \
              $(DESTDIR)$(prefix)/bin/ffplay$(EXE)   \
-             $(DESTDIR)$(prefix)/man/man1/qe.1      \
-             $(DESTDIR)$(prefix)/share/qe/kmaps     \
-             $(DESTDIR)$(prefix)/share/qe/ligatures \
+             $(DESTDIR)$(mandir)/man1/qe.1      \
+             $(DESTDIR)$(datadir)/qe/kmaps     \
+             $(DESTDIR)$(datadir)/qe/ligatures \
              $(DESTDIR)$(prefix)/bin/html2png$(EXE)

 rebuild:
Index: configure
===================================================================
RCS file: /sources/qemacs/qemacs/configure,v
retrieving revision 1.21
diff -u -r1.21 configure
--- configure   19 Dec 2013 00:13:49 -0000      1.21
+++ configure   20 Dec 2013 10:54:21 -0000
@@ -23,6 +23,8 @@

 # default parameters
 prefix="/usr/local"
+datadir='${prefix}/share'
+mandir='${prefix}/man'
 cross_prefix=""
 cc="gcc"
 host_cc="gcc"
@@ -223,6 +225,12 @@
       --prefix=*)
         prefix=`echo $opt | cut -d '=' -f 2`
         ;;
+      --datadir=*)
+        datadir=`echo $opt | cut -d '=' -f 2`
+        ;;
+      --mandir=*)
+        mandir=`echo $opt | cut -d '=' -f 2`
+        ;;
       --source-path=*)
         source_path=`echo $opt | cut -d '=' -f 2`
         ;;
@@ -453,6 +461,8 @@
 fi

 echo "Install prefix      $prefix"
+echo "Shared data dir     $datadir"
+echo "Manpages dir        $mandir"
 echo "Source path         $source_path"
 echo "C compiler          $cc"
 echo "Tiny build          $tiny"
@@ -476,6 +486,8 @@
 echo "/* Automatically generated by configure - do not modify */" > $TMPH

 echo "prefix=$prefix" >> $TMPMAK
+echo "datadir=$datadir" >> $TMPMAK
+echo "mandir=$mandir" >> $TMPMAK
 echo "#define CONFIG_QE_PREFIX \"$prefix\"" >> $TMPH
 echo "MAKE=$make" >> $TMPMAK
 echo "CC=$cc" >> $TMPMAK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]