forked from sctp/lksctp-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.dirs
60 lines (51 loc) · 1.39 KB
/
Makefile.dirs
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