File: Imakefile

package info (click to toggle)
xfm 1.4.3-8
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,424 kB
  • ctags: 1,642
  • sloc: ansic: 15,087; cpp: 510; makefile: 43; sh: 21
file content (103 lines) | stat: -rw-r--r-- 3,554 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*-----------------------------------------------------------------------------
  Top Level Imakefile for xfm

  Created 8/3/93 by Simon Marlow (simonm@dcs.gla.ac.uk)
  Modified Mar 22 1995 by Albert Graef (ag@muwiinfa.geschichte.uni-mainz.de)
  Modified by Branden Robinson; 2002-08-07
  Minor modifications by Bernhard R. Link; 2003-05-23
-----------------------------------------------------------------------------*/

#include "Imake.options"

/* select the xfmrc file to be installed according to whether MAGIC_HEADERS
   is defined or not */

#ifdef MAGIC_HEADERS
XFMRC = xfmrc
#else
XFMRC = xfmrc.nomagic
#endif

#ifndef PassCDebugFlags
#define PassCDebugFlags
#endif

#ifdef MAGIC_HEADERS
#define Subdirs regexp src
#else
#define Subdirs src
#endif

MakeSubdirs(Subdirs)
MakefileSubdirs(Subdirs)
CleanSubdirs(Subdirs)
DependSubdirs(Subdirs)
InstallSubdirs(Subdirs)
InstallManSubdirs(Subdirs)

#ifndef USE_SYSTEMWIDE
/* rules to create and install the xfm.install script */

CppScriptTarget(xfm.install.script,bin/xfm.install.cpp,\
-DLIBDIR=$(XFMLIBDIR),)
InstallScript(xfm.install,$(BINDIR))
#endif

/* rules to create and install the appdefaults file, the config files and the
   pixmaps */

/* CppFileTarget will not work under SunOS 4.1, you might wish to replace
   it by CppScriptTarget or install the appdefaults file by hand. */

#ifdef XAW3D
CppFileTarget(Xfm.ad,lib/Xfm.cpp,-DLIBDIR=$(XFMLIBDIR) -DXAW3D $(ENH_DEFINES),src/FmVersion.h)
#else
CppFileTarget(Xfm.ad,lib/Xfm.cpp,-DLIBDIR=$(XFMLIBDIR) $(ENH_DEFINES),src/FmVersion.h)
#endif
InstallAppDefaults(Xfm)

install::
	MakeDir($(DESTDIR)$(XFMLIBDIR)/bitmaps)
	$(INSTALL) -c $(INSTDATFLAGS) lib/bitmaps/?* $(DESTDIR)$(XFMLIBDIR)/bitmaps
	MakeDir($(DESTDIR)$(XFMLIBDIR)/pixmaps)
	$(INSTALL) -c $(INSTDATFLAGS) lib/pixmaps/?* $(DESTDIR)$(XFMLIBDIR)/pixmaps

#ifdef USE_SYSTEMWIDE
/* is there some way to specify /etc in IMakefiles? - BRL */
DEFAULTCONFDIR = /etc/X11/xfm
#else
DEFAULTCONFDIR = $(XFMLIBDIR)/dot.xfm
#endif

#ifndef USE_3DICONS
install::
	MakeDir($(DESTDIR)$(DEFAULTCONFDIR))
	$(INSTALL) -c $(INSTDATFLAGS) lib/$(XFMRC) $(DESTDIR)$(DEFAULTCONFDIR)/xfmrc
	$(INSTALL) -c $(INSTDATFLAGS) lib/xfmdev $(DESTDIR)$(DEFAULTCONFDIR)
	$(INSTALL) -c $(INSTDATFLAGS) lib/magic $(DESTDIR)$(DEFAULTCONFDIR)
	$(INSTALL) -c $(INSTDATFLAGS) lib/Apps $(DESTDIR)$(DEFAULTCONFDIR)
	$(INSTALL) -c $(INSTDATFLAGS) lib/Graphics $(DESTDIR)$(DEFAULTCONFDIR)
	$(INSTALL) -c $(INSTDATFLAGS) lib/Hosts $(DESTDIR)$(DEFAULTCONFDIR)
	$(INSTALL) -c $(INSTDATFLAGS) lib/Toolbox $(DESTDIR)$(DEFAULTCONFDIR)
#else
install::
	MakeDir($(DESTDIR)$(XFMLIBDIR)/icons)
	$(INSTALL) -c $(INSTDATFLAGS) contrib/3dicons/icons/?* $(DESTDIR)$(XFMLIBDIR)/icons
	MakeDir($(DESTDIR)$(DEFAULTCONFDIR))
	$(INSTALL) -c $(INSTDATFLAGS) contrib/3dicons/xfmrc $(DESTDIR)$(DEFAULTCONFDIR)/xfmrc
	$(INSTALL) -c $(INSTDATFLAGS) contrib/3dicons/xfmdev $(DESTDIR)$(DEFAULTCONFDIR)
	$(INSTALL) -c $(INSTDATFLAGS) contrib/3dicons/magic $(DESTDIR)$(DEFAULTCONFDIR)
	$(INSTALL) -c $(INSTDATFLAGS) contrib/3dicons/Apps $(DESTDIR)$(DEFAULTCONFDIR)
	$(INSTALL) -c $(INSTDATFLAGS) contrib/3dicons/Graphics $(DESTDIR)$(DEFAULTCONFDIR)
	$(INSTALL) -c $(INSTDATFLAGS) contrib/3dicons/Toolbox $(DESTDIR)$(DEFAULTCONFDIR)
#endif

/* Use the following before installing over an existing version of xfm. (You
   might wish to back up your old configuration first. ;-) */

uninstall::
	$(RM) $(BINDIR)/xfm $(BINDIR)/xfm.install
	$(RM) $(MANDIR)/xfm.$(MANSUFFIX)
	$(RM) $(MANDIR)/xfmtype.$(MANSUFFIX)
	$(RM) -r $(XFMLIBDIR)
	$(RM) $(XAPPLOADDIR)/Xfm