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
|
/* $NetBSD: xpkgwedge.def,v 1.6 2001/06/29 18:27:30 jlam Exp $ */
#ifdef AfterVendorCF
/*
* The following defines inject a "PREFIX=" make-time option that lets the
* user twiddle the ProjectRoot setting with a single switch. This makes
* the command "make PREFIX=/path/to/install all install" work as expected.
*
* Note that ?= is a special Pmake construct and probably will not work on
* other makes.
*/
#ifndef ProjectRoot
/*
* Assume the worst: this should not happen in practice, as this setup
* does not work with the classical /usr/{include,lib}/X11 layout.
*/
#define ProjectRoot /usr/X11
#endif
PREFIX ?= ProjectRoot
X11_ROOT = ProjectRoot
#undef ProjectRoot
#define ProjectRoot $(PREFIX)
#undef ConfigDir
#define ConfigDir $(X11_ROOT)/lib/X11/config
/*
* This emits dual -I and -L options to cc automatically, one for the actual
* X11 root, and one for the user-set prefix.
*/
#define X11ProjectRoot $(X11_ROOT)
/*
* InstallAppDefaultsLong - general rule to install application default file
* if the InstallAppDefFiles configuration parameter is set.
*
* This is the same as the one in X11.tmpl, but without the LinkConfDirectory.
* LinkConfDirectory removes the app-defaults directory in $(PREFIX)/lib/X11
* and creates a link to the real X11 app-defaults directory and moves the old
* app-defaults files into it. This is not what we want for pkgsrc.
*/
#ifndef InstallAppDefaultsLong
#if InstallAppDefFiles
#define InstallAppDefaultsLong(file,class) @@\
InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
#else
#define InstallAppDefaultsLong(file,class) @@\
InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
#endif /* InstallAppDefFiles */
#endif /* InstallAppDefaultsLong */
#ifdef UseInstalled
/*
* We need to redefine ImakeCmd so that imake will look in
* $(PREFIX)/lib/X11/config *before* looking in the standard X
* config directory to override any configuration files installed
* there.
*/
#undef ImakeCmd
#define ImakeCmd imake -I$(PREFIX)/lib/X11/config
#endif
#ifdef BuildLink
/*
* Force the buildlink include and lib directories to the head of the
* compiler search paths. The include directory is added through the
* C{,plusplus}DebugFlags, which are the first options given to the
* compiler. It is _required_ that BUILDLINK_DIR be defined in the
* environment.
*/
#ifdef UseInstalled
# ifndef BuildLinkCppFlags
# define BuildLinkCppFlags -I$(BUILDLINK_DIR)/include $(PKGSRC_CPPFLAGS)
# endif
# ifndef BuildLinkLdFlags
# define BuildLinkLdFlags -L$(BUILDLINK_DIR)/lib
# endif
# undef DependFlags
# define DependFlags BuildLinkCppFlags
# undef OptimizedCDebugFlags
# define OptimizedCDebugFlags -O2 BuildLinkCppFlags $(PKGSRC_CFLAGS)
# undef OptimizedCplusplusDebugFlags
# define OptimizedCplusplusDebugFlags -O2 BuildLinkCppFlags $(PKGSRC_CXXFLAGS)
# undef LdPreLib
# define LdPreLib BuildLinkLdFlags
# undef LdPostLib
# define LdPostLib BuildLinkLdFlags
#endif
#endif /* BuildLink */
#endif /* AfterVendorCF */
|