Ticket #35727: patch-pkgdatadir.diff

File patch-pkgdatadir.diff, 5.6 KB (added by ajdudman, 12 years ago)

patches use of pkgdatadir

  • ./Makefile.am

    old new  
    3434        path.c imacs.c sysintf.c parse.c getinp.c quit.c state.c\
    3535        dmdump.c macparse.c rulparse.c percent.c function.c
    3636
     37BUILT_SOURCES = dmakeroot.h
     38
    3739# set the include path found by configure
    3840INCLUDES = -I$(top_srcdir) -I$(top_builddir) \
    3941           -I$(top_srcdir)/@OS_TYPE@/@OS_VERSION@ -I$(top_srcdir)/@OS_TYPE@
     
    5961INCLUDES += -I$(top_srcdir)/@OS_TYPE@/@OS_VERSION@ -I$(top_srcdir)/@OS_TYPE@
    6062endif
    6163
    62 SUBDIRS = startup tests
     64SUBDIRS = startup man tests
    6365
    6466EXTRA_DIST = NEWS ChangeLog
     67
     68dmakeroot.h: dmakeroot.h.in
     69        $(SED) -e 's%@DMAKEROOT_H_LINE1\@%"DMAKEROOT := ${dmakerootprefix}/startup",%' $< > $@
     70
  • ./configure.in

    old new  
    2121
    2222dnl Extra parameters
    2323AC_ARG_ENABLE(dbug,
    24 [  --enable-dbug:          Enable build with dbug macros.
    25 ],,)
     24[AS_HELP_STRING([--enable-dbug],[Enable build with dbug macros.])],,
     25)
    2626
    2727AC_ARG_ENABLE(spawn,
    28 [  --enable-spawn:         Enables the use of spawn instead of fork/exec
    29                           if it is supported.
    30 ],,)
     28[AS_HELP_STRING([--enable-spawn],[Enables the use of spawn instead of fork/exec, if it is supported.])],,
     29)
     30
     31AC_ARG_WITH(dmakeroot,
     32[AS_HELP_STRING([--with-dmakeroot],[Use DIR as dataroot prefix @<:@default=\${pkgdatadir}@:>@])],,
     33)
     34
    3135dnl Checks for programs.
    3236AC_PROG_CPP
    3337AC_PROG_INSTALL
    3438AC_PROG_LN_S
    3539AC_PROG_MAKE_SET
    3640AC_PROG_RANLIB
     41AC_PROG_SED
    3742
    3843dnl Checks for utilities.
    3944AC_PROG_AWK
     
    160165   AC_MSG_RESULT([no])
    161166fi
    162167
    163 dnl Predefine the DMAKEROOT macro for unix targets.
    164 eval dmakerootprefix="$datarootdir"
    165 # $datadir is ${prefix}/share if not overridden
    166 test "x$dmakerootprefix" != "x${dmakerootprefix##NONE}" && dmakerootprefix=${ac_default_prefix}/share
    167 
     168dnl Define the DMAKEROOT macro differently for unix targets.
    168169if test x$OS_TYPE = xunix; then
    169 DMAKEROOT_H_LINE1='"DMAKEROOT := '${dmakerootprefix}'/startup",'
     170    dmakerootprefix='${pkgdatadir}'
     171else
     172    dmakerootprefix='${datadir}'
    170173fi
    171 AC_SUBST(DMAKEROOT_H_LINE1)
     174case X$with_dmakeroot in
     175X|Xyes|Xno) ;;
     176*) dmakerootprefix=$with_dmakeroot
     177esac
     178AC_SUBST(dmakerootprefix)
    172179
    173180dnl List (all possible) *.in files
    174 AC_CONFIG_FILES(dmakeroot.h Makefile startup/config.mk \
    175                 startup/Makefile startup/unix/Makefile \
    176                 startup/unix/linux/Makefile startup/unix/solaris/Makefile \
    177                 startup/unix/macosx/Makefile startup/unix/sysvr4/Makefile \
    178                 startup/unix/cygwin/Makefile \
    179                 startup/unix/os2/Makefile \
    180                 startup/winnt/Makefile startup/winnt/mingw/Makefile \
    181                 startup/winnt/msvc6/Makefile \
    182                 tests/Makefile)
     181AC_CONFIG_FILES([
     182        startup/config.mk
     183        Makefile
     184        man/Makefile
     185        startup/Makefile
     186        startup/unix/Makefile
     187        startup/unix/cygwin/Makefile
     188        startup/unix/linux/Makefile
     189        startup/unix/macosx/Makefile
     190        startup/unix/os2/Makefile
     191        startup/unix/solaris/Makefile
     192        startup/unix/sysvr4/Makefile
     193        startup/winnt/Makefile
     194        startup/winnt/mingw/Makefile
     195        startup/winnt/msvc6/Makefile
     196        tests/Makefile
     197])
    183198
    184199dnl Checks for libraries.
    185200
  • ./man/Makefile.am

    old new  
     1man1_MANS = dmake.1
     2
     3dmake.1: dmake.tf
     4        $(LN_S) $< $@
     5
     6EXTRA_DIST = dmake.nc dmake.tf readme
     7
  • ./startup/Makefile.am

    old new  
    11
    2 startupdir = $(datadir)/startup
     2startupdir = $(pkgdatadir)/startup
    33
    44startup_DATA = startup.mk config.mk
    55
  • ./startup/unix/Makefile.am

    old new  
    11
    2 startupdir = $(datadir)/startup/unix
     2startupdir = $(pkgdatadir)/startup/unix
    33
    44startup_DATA = macros.mk recipes.mk
    55
  • ./startup/unix/cygwin/Makefile.am

    old new  
    1 startupdir = $(datadir)/startup/unix/cygwin
     1startupdir = $(pkgdatadir)/startup/unix/cygwin
    22
    33startup_DATA = macros.mk
    44
  • ./startup/unix/linux/Makefile.am

    old new  
    11
    2 startupdir = $(datadir)/startup/unix/linux
     2startupdir = $(pkgdatadir)/startup/unix/linux
    33
    44startup_DATA = macros.mk
    55
  • ./startup/unix/macosx/Makefile.am

    old new  
    11
    2 startupdir = $(datadir)/startup/unix/macosx
     2startupdir = $(pkgdatadir)/startup/unix/macosx
    33
    44startup_DATA = macros.mk
    55
  • ./startup/unix/os2/Makefile.am

    old new  
    11
    2 startupdir = $(datadir)/startup/unix/os2
     2startupdir = $(pkgdatadir)/startup/unix/os2
    33
    44startup_DATA = macros.mk
    55
  • ./startup/unix/solaris/Makefile.am

    old new  
    11
    2 startupdir = $(datadir)/startup/unix/solaris
     2startupdir = $(pkgdatadir)/startup/unix/solaris
    33
    44startup_DATA = macros.mk
    55
  • ./startup/unix/sysvr4/Makefile.am

    old new  
    11
    2 startupdir = $(datadir)/startup/unix/sysvr4
     2startupdir = $(pkgdatadir)/startup/unix/sysvr4
    33
    44startup_DATA = macros.mk
    55