File: Makefile.am

package info (click to toggle)
ddcutil 2.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,580 kB
  • sloc: ansic: 75,782; makefile: 960; xml: 41; sh: 9
file content (134 lines) | stat: -rw-r--r-- 4,434 bytes parent folder | download | duplicates (3)
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File data/Makefile.am

# Copyright (C) 2016-2024 Sanford Rockowitz <rockowitz@minsoft.com>
# SPDX-License-Identifier: GPL-2.0-or-later

# The proper location for pkgconfig files is ambiguous, and the 
# subject of much discussion.  .
# However, it appears that: 
#   - /usr/lib64/pkgconfig should hold x64 specific pkgconfig files
#   - /usr/lib/pkgconfig should hold i386 specific pkgconfig files
#   - /usr/share/pkgconfig should hold architecture agnostic pkgconfig files
#
# The tail wags the dog. libddcutil-dev can contain
#   usr/*/pkgconfig
# or 
#   usr/lib/x86_64-linux-gnu/pkgconfig
# but there's no way to "or" these two statements. 
#
# When building on OBS, the same libddcutil-dev.install is used for all (Debian based) builds, 
# and if using $(libdir) the location of ddcutil.pc will depend on platform, e.g. 
# some times it will be /usr/lib/x86_64-linux-gnu/pkgconfig, sometimes something else. 
# 
# Note the the entry for ddcutil.pc in the Debian .install file needs
# to be kept in sync with where autotools puts the files.


resfiles = \
	etc/modprobe.d/nvidia-i2c.conf \
	etc/udev/rules.d/60-ddcutil-i2c.rules \
	etc/udev/rules.d/60-ddcutil-usb.rules \
	etc/X11/xorg.conf.d/90-nvidia-i2c.conf

rulesfiles = \
	usr/lib/udev/rules.d/60-ddcutil-i2c.rules 

distributed_modulesfiles = \
    usr/lib/modules-load.d/ddcutil.conf

if !INSTALL_LIB_ONLY_COND
installed_modulesfiles = \
    usr/lib/modules-load.d/ddcutil.conf
endif 

pkgconfigfiles = \
    ddcutil.pc

# Causes files (with directory structure) to be included in tarball:
EXTRA_DIST = $(resfiles) $(rulesfiles) $(distributed_modulesfiles) ddcutil.pc.in

# Target directory
pkgconfigdir = ${libdir}/pkgconfig
   
# Target directory (/usr/local/share/ddcutil/data or /usr/share/ddcutil/data):
ddcutildir = $(datadir)/ddcutil/data
resdir     = $(datadir)/ddcutil/data 

# Causes files (w/o directory structure) to be installed in target directory:

if !INSTALL_LIB_ONLY_COND
ddcutil_DATA = $(resfiles)
pkgconfig_DATA = ddcutil.pc
endif

# Use prefix instead of libdir here because it appears that 
# udev/rules.d is always a subdirectory of /usr/lib
rulesdir = ${prefix}/lib/udev/rules.d
if !INSTALL_LIB_ONLY_COND
rules_DATA = $(rulesfiles)
endif

# Similar comment for modules-load.d
installed_modulesdir = $(prefix)/lib/modules-load.d
if !INSTALL_LIB_ONLY_COND
installed_modules_DATA  = $(installed_modulesfiles)
endif

# include FindDDCUtil.cmake in tarball:
EXTRA_DIST += cmake/ddcutil/FindDDCUtil.cmake
# where FindDDCUtil.cmake will installed:
cmakedir = $(libdir)/cmake/ddcutil

if ENABLE_SHARED_LIB_COND
if !INSTALL_LIB_ONLY_COND
# where make install finds FindDDCUtil.cmake:
cmake_DATA = cmake/ddcutil/FindDDCUtil.cmake
endif
endif

# n. -local executes before target, -hook executes after

all-local:
	@echo "(data/Makefile) ==>  Executing rule: all-local"

install-data-local:
	@echo "(data/Makefile) ==>  Executing rule: install-data-local"
	@echo "prefix:         ${prefix}"
	@echo "includedir      ${includedir}"
	@echo "docdir          ${docdir}"
	@echo "libdir          ${libdir}"
	@echo "rulesdir        ${rulesdir}"
	@echo "packagedatadir: $(packagedatadir)"
	@echo "datadir:        $(datadir)"
	@echo "ddcutildir:     $(ddcutildir)"
	@echo "srcdir:         $(srcdir)"
	@echo "bindir:         ${bindir}"
	@echo "cmakedir:       ${cmakedir}"
	@echo "DESTDIR:        ${DESTDIR}"
	@echo "rulesfiles:     ${rulesfiles}"
	@echo "resfiles:       ${resfiles}"
	@echo "udevdir:        ${udevdir}"

# @xxx@ names are not defined, names with $() are 

# use "find ..." instead of "rm -f" as latter tries to delete directory as well
# rm -f ${DESTDIR}${resdir}/45-ddcutil*
# rm -f ${DESTDIR}${rulesdir}/60-ddcutil.rules
# rm -f ${DESTDIR}${rulesdir}/60-ddcutil-usb.rules
          
install-data-hook:
	@echo "(data/install-data-hook)===> Executing rule: install-data-hook"
# if !INSTALL_LIB_ONLY_COND
# 	sed  -i "s|/usr|${prefix}|" ${DESTDIR}${rulesdir}/60-ddcutil-usb.rules 
# endif
	@echo "Clear out files possibly left over from earlier installation"
	find ${DESTDIR}${resdir} -name "45-ddcutil*" -delete
	find ${DESTDIR}${resdir} -name "60-ddcutil.rules" -delete
	

uninstall-hook:
	@echo "(data/uninstall-hook)===> Executing rule: uninstall-hook"
	@echo "Clear out files possibly left over from earlier installation"
	find ${DESTDIR}${resdir} -name "45-ddcutil.rules" -delete
	find ${DESTDIR}${rulesdir} -name "60-ddcutil-usb.rules" -delete