Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Dnsmasq
Commits
24848940
Commit
24848940
authored
Feb 29, 2012
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makefile cleanup - use lower case variables for internal use.
parent
bc5992da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
52 deletions
+64
-52
Makefile
Makefile
+62
-50
bld/install-man
bld/install-man
+1
-1
bld/install-mo
bld/install-mo
+1
-1
No files found.
Makefile
View file @
24848940
...
...
@@ -13,57 +13,69 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PREFIX
=
/usr/local
BINDIR
=
${PREFIX}
/sbin
MANDIR
=
${PREFIX}
/share/man
LOCALEDIR
=
${PREFIX}
/share/locale
# NOTE: Building the i18n targets requires GNU-make
BUILDDIR
=
$(SRC)
CFLAGS
=
-Wall
-W
-O2
# Variables you may well want to override.
PREFIX
=
/usr/local
BINDIR
=
$(PREFIX)
/sbin
MANDIR
=
$(PREFIX)
/share/man
LOCALEDIR
=
$(PREFIX)
/share/locale
BUILDDIR
=
$(SRC)
DESTDIR
=
CFLAGS
=
-Wall
-W
-O2
LDFLAGS
=
COPTS
=
RPM_OPT_FLAGS
=
LIBS
=
#################################################################
# Variables you might want to override.
PKG_CONFIG
=
pkg-config
INSTALL
=
install
MSGMERGE
=
msgmerge
MSGFMT
=
msgfmt
XGETTEXT
=
xgettext
INSTALL
=
install
MSGMERGE
=
msgmerge
MSGFMT
=
msgfmt
XGETTEXT
=
xgettext
SRC
=
src
PO
=
po
PO
=
po
MAN
=
man
# pmake way to learn path of Makefile
TOP
!=
echo
`
pwd
`
/
# GNU make way to learn path of Makefile
TOP
?=
$(
shell
pwd
)
DBUS_CFLAGS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_DBUS
$(PKG_CONFIG)
--cflags
dbus-1
`
DBUS_LIBS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_DBUS
$(PKG_CONFIG)
--libs
dbus-1
`
IDN_CFLAGS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_IDN
$(PKG_CONFIG)
--cflags
libidn
`
IDN_LIBS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_IDN
$(PKG_CONFIG)
--libs
libidn
`
CT_CFLAGS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_CONNTRACK
$(PKG_CONFIG)
--cflags
libnetfilter_conntrack
`
CT_LIBS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_CONNTRACK
$(PKG_CONFIG)
--libs
libnetfilter_conntrack
`
LUA_CFLAGS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_LUASCRIPT
$(PKG_CONFIG)
--cflags
lua5.1
`
LUA_LIBS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_LUASCRIPT
$(PKG_CONFIG)
--libs
lua5.1
`
SUNOS_LIBS
=
`
if
uname
|
grep
SunOS 2>&1
>
/dev/null
;
then
echo
-lsocket
-lnsl
-lposix4
;
fi
`
VERSION
=
-DVERSION
=
'\"`
$(TOP)
/bld/get-version
$(TOP)
`\"'
OBJS
=
cache.o rfc1035.o util.o option.o forward.o network.o
\
#################################################################
# pmake way.
top
!=
pwd
# GNU make way.
top
?=
$(
shell
pwd
)
dbus_cflags
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_DBUS
$(PKG_CONFIG)
--cflags
dbus-1
`
dbus_libs
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_DBUS
$(PKG_CONFIG)
--libs
dbus-1
`
idn_cflags
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_IDN
$(PKG_CONFIG)
--cflags
libidn
`
idn_libs
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_IDN
$(PKG_CONFIG)
--libs
libidn
`
ct_cflags
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_CONNTRACK
$(PKG_CONFIG)
--cflags
libnetfilter_conntrack
`
ct_libs
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_CONNTRACK
$(PKG_CONFIG)
--libs
libnetfilter_conntrack
`
lua_cflags
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_LUASCRIPT
$(PKG_CONFIG)
--cflags
lua5.1
`
lua_libs
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_LUASCRIPT
$(PKG_CONFIG)
--libs
lua5.1
`
sunos_libs
=
`
if
uname
|
grep
SunOS
>
/dev/null 2>&1
;
then
echo
-lsocket
-lnsl
-lposix4
;
fi
`
version
=
-DVERSION
=
'\"`
$(top)
/bld/get-version
$(top)
`\"'
objs
=
cache.o rfc1035.o util.o option.o forward.o network.o
\
dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o
\
helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o
\
dhcp-common.o outpacket.o radv.o
HDRS
=
dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h
\
hdrs
=
dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h
\
dns-protocol.h radv-protocol.h
all
:
$(BUILDDIR)
@
cd
$(BUILDDIR)
&&
$(MAKE)
\
TOP
=
"
$(TOP
)
"
\
BUILD_CFLAGS
=
"
$(VERSION)
$(DBUS_CFLAGS)
$(IDN_CFLAGS)
$(CT_CFLAGS)
$(LUA_CFLAGS
)
"
\
BUILD_LIBS
=
"
$(DBUS_LIBS)
$(IDN_LIBS)
$(CT_LIBS)
$(LUA_LIBS)
$(SUNOS_LIBS
)
"
\
-f
$(
TOP
)
/Makefile dnsmasq
top
=
"
$(top
)
"
\
build_cflags
=
"
$(version)
$(dbus_cflags)
$(idn_cflags)
$(ct_cflags)
$(lua_cflags
)
"
\
build_libs
=
"
$(dbus_libs)
$(idn_libs)
$(ct_libs)
$(lua_libs)
$(sunos_libs
)
"
\
-f
$(
top
)
/Makefile dnsmasq
clean
:
rm
-f
*
~
$(BUILDDIR)
/
*
.mo contrib/
*
/
*
~
*
/
*
~
$(BUILDDIR)
/
*
.pot
...
...
@@ -78,21 +90,21 @@ install-common :
all-i18n
:
$(BUILDDIR)
@
cd
$(BUILDDIR)
&&
$(MAKE)
\
TOP
=
"
$(TOP
)
"
\
I18N
=
-DLOCALEDIR
=
\'\"
$(LOCALEDIR)
\"\'
\
BUILD_CFLAGS
=
"
$(VERSION)
$(DBUS_CFLAGS)
$(CT_CFLAGS)
$(LUA_CFLAGS
)
`
$(PKG_CONFIG)
--cflags
libidn
`
"
\
BUILD_LIBS
=
"
$(DBUS_LIBS)
$(CT_LIBS)
$(LUA_LIBS)
$(SUNOS_LIBS
)
`
$(PKG_CONFIG)
--libs
libidn
`
"
\
-f
$(
TOP
)
/Makefile dnsmasq
top
=
"
$(top
)
"
\
i18n
=
-DLOCALEDIR
=
\'\"
$(LOCALEDIR)
\"\'
\
build_cflags
=
"
$(version)
$(dbus_cflags)
$(ct_cflags)
$(lua_cflags
)
`
$(PKG_CONFIG)
--cflags
libidn
`
"
\
build_libs
=
"
$(dbus_libs)
$(ct_libs)
$(lua_libs)
$(sunos_libs
)
`
$(PKG_CONFIG)
--libs
libidn
`
"
\
-f
$(
top
)
/Makefile dnsmasq
for
f
in
`
cd
$(PO)
;
echo
*
.po
`
;
do
\
cd
$(
TOP)
&&
cd
$(BUILDDIR)
&&
$(MAKE)
TOP
=
"
$(TOP)
"
-f
$(TOP
)
/Makefile
$
${f%.po}
.mo
;
\
cd
$(
top)
&&
cd
$(BUILDDIR)
&&
$(MAKE)
top
=
"
$(top)
"
-f
$(top
)
/Makefile
$
${f%.po}
.mo
;
\
done
install-i18n
:
all-i18n install-common
cd
$(BUILDDIR)
;
$(
TOP
)
/bld/install-mo
$(DESTDIR)$(LOCALEDIR)
$(INSTALL)
cd
$(BUILDDIR)
;
$(
top
)
/bld/install-mo
$(DESTDIR)$(LOCALEDIR)
$(INSTALL)
cd
$(MAN)
;
../bld/install-man
$(DESTDIR)$(MANDIR)
$(INSTALL)
merge
:
@
cd
$(BUILDDIR)
&&
$(MAKE)
-f
$(
TOP
)
/Makefile dnsmasq.pot
@
cd
$(BUILDDIR)
&&
$(MAKE)
-f
$(
top
)
/Makefile dnsmasq.pot
for
f
in
`
cd
$(PO)
;
echo
*
.po
`
;
do
\
echo
-n
msgmerge
$(PO)
/
$$
f
&&
$(MSGMERGE)
--no-wrap
-U
$(PO)
/
$$
f
$(BUILDDIR)
/dnsmasq.pot
;
\
done
...
...
@@ -103,20 +115,20 @@ $(BUILDDIR):
# rules below are targets in recusive makes with cwd=$(SRC)
$(
OBJS
:
.o=.c) $(HDRS
):
ln
-s
$(
TOP
)
/
$(SRC)
/
$@
.
$(
objs
:
.o=.c) $(hdrs
):
ln
-s
$(
top
)
/
$(SRC)
/
$@
.
.c.o
:
$(CC)
$(CFLAGS)
$(COPTS)
$(
I18N)
$(BUILD_CFLAGS
)
$(RPM_OPT_FLAGS)
-c
$<
$(CC)
$(CFLAGS)
$(COPTS)
$(
i18n)
$(build_cflags
)
$(RPM_OPT_FLAGS)
-c
$<
dnsmasq
:
$(
HDRS) $(OBJS
)
$(CC)
$(LDFLAGS)
-o
$@
$(
OBJS)
$(BUILD_LIBS
)
$(LIBS)
dnsmasq
:
$(
hdrs) $(objs
)
$(CC)
$(LDFLAGS)
-o
$@
$(
objs)
$(build_libs
)
$(LIBS)
dnsmasq.pot
:
$(
OBJS:.o=.c) $(HDRS
)
$(XGETTEXT)
-d
dnsmasq
--foreign-user
--omit-header
--keyword
=
_
-o
$@
-i
$(
OBJS
:.o=.c)
dnsmasq.pot
:
$(
objs:.o=.c) $(hdrs
)
$(XGETTEXT)
-d
dnsmasq
--foreign-user
--omit-header
--keyword
=
_
-o
$@
-i
$(
objs
:.o=.c)
%.mo
:
$(
TOP)/po
/%.po dnsmasq.pot
$(MSGMERGE)
-o
-
$(
TOP
)
/po/
$*
.po dnsmasq.pot |
$(MSGFMT)
-o
$*
.mo -
%.mo
:
$(
top)/$(PO)
/%.po dnsmasq.pot
$(MSGMERGE)
-o
-
$(
top
)
/po/
$*
.po dnsmasq.pot |
$(MSGFMT)
-o
$*
.mo -
.PHONY
:
all clean install install-common all-i18n install-i18n merge
bld/install-man
View file @
24848940
...
...
@@ -4,6 +4,6 @@ for f in *; do
if
[
-d
$f
]
;
then
$2
-m
755
-d
$1
/
$f
/man8
$2
-m
644
$f
/dnsmasq.8
$1
/
$f
/man8
echo
installing
$
1
/
$
f
/man8/dnsmasq.8
echo
installing
$f
/man8/dnsmasq.8
fi
done
bld/install-mo
View file @
24848940
...
...
@@ -3,7 +3,7 @@
for
f
in
*
.mo
;
do
$2
-m
755
-d
$1
/
${
f
%.mo
}
/LC_MESSAGES
$2
-m
644
$f
$1
/
${
f
%.mo
}
/LC_MESSAGES/dnsmasq.mo
echo
installing
$
1
/
$
{
f
%.mo
}
/LC_MESSAGES/dnsmasq.mo
echo
installing
${
f
%.mo
}
/LC_MESSAGES/dnsmasq.mo
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment