File: Makefile.dirs

package info (click to toggle)
lksctp-tools 1.0.19%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,272 kB
  • sloc: ansic: 13,566; makefile: 270; sh: 26
file content (60 lines) | stat: -rw-r--r-- 1,422 bytes parent folder | download | duplicates (9)
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
# -*-makefile-*-
#
# Define here directories you want

rootbindir = /bin
rootsbindir = /sbin
rootlibdir = /lib

localedir = $(datadir)/locale
pkgsysconfdir = $(sysconfdir)/@PACKAGE@
pkgdocdir = $(datadir)/@PACKAGE@

vpkgsysconfdir = $(pkgsysconfdir)/v@VERSION@
vpkgdatadir = $(pkgdatadir)/v@VERSION@
vpkglibdir = $(pkglibdir)/v@VERSION@
vpkgdocdir = $(docdir)/v@VERSION@

# List here all the directories you want listed in the file to be used
# in your programs:

directories := \
	localedir \
	pkgsysconfdir \
	rootbindir \
	rootlibdir \
	rootsbindir \
	vpkgdatadir \
	vpkgdocdir \
	vpkglibdir \
	vpkgsysconfdir \
	\
	bindir \
	datadir \
	libdir \
	pkgdatadir \
	pkgdocdir \
	pkglibdir \
	sbindir

# To modify this target for another language, just copy, paste and
# modify the target to generate directories.h. We depend on
# config.status and Makefile.dirs, as anything changed is going to be
# reflected there.

# This is for generating the list in C/C++
directories.h: $(top_builddir)/config.status $(top_srcdir)/Makefile.dirs
	@rm -f $@
	@echo -n "Creating $@ ..."
	@echo "#ifndef __$(subst .,_,$@)__" > $@
	@echo "# define __$(subst .,_,$@)__" >> $@
	@echo "" >> $@
	@echo -e $(foreach v,$(directories),$(shell echo 'D_$(v) \"$($v)\"\\n')) \
	  | sed 's/^ *D_/# define D_/' >> $@
	@echo "#endif" >> $@
	@echo " done"

DISTCLEANFILES += directories.h
MAINTAINERCLEANFILES += directories.h

## FIXME: Your stuff here