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 @@
...
@@ -13,57 +13,69 @@
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PREFIX
=
/usr/local
# NOTE: Building the i18n targets requires GNU-make
BINDIR
=
${PREFIX}
/sbin
MANDIR
=
${PREFIX}
/share/man
LOCALEDIR
=
${PREFIX}
/share/locale
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
PKG_CONFIG
=
pkg-config
INSTALL
=
install
INSTALL
=
install
MSGMERGE
=
msgmerge
MSGMERGE
=
msgmerge
MSGFMT
=
msgfmt
MSGFMT
=
msgfmt
XGETTEXT
=
xgettext
XGETTEXT
=
xgettext
SRC
=
src
SRC
=
src
PO
=
po
PO
=
po
MAN
=
man
MAN
=
man
# pmake way to learn path of Makefile
#################################################################
TOP
!=
echo
`
pwd
`
/
# GNU make way to learn path of Makefile
# pmake way.
TOP
?=
$(
shell
pwd
)
top
!=
pwd
# GNU make way.
DBUS_CFLAGS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_DBUS
$(PKG_CONFIG)
--cflags
dbus-1
`
top
?=
$(
shell
pwd
)
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
`
dbus_cflags
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_DBUS
$(PKG_CONFIG)
--cflags
dbus-1
`
IDN_LIBS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_IDN
$(PKG_CONFIG)
--libs
libidn
`
dbus_libs
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_DBUS
$(PKG_CONFIG)
--libs
dbus-1
`
CT_CFLAGS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_CONNTRACK
$(PKG_CONFIG)
--cflags
libnetfilter_conntrack
`
idn_cflags
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_IDN
$(PKG_CONFIG)
--cflags
libidn
`
CT_LIBS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_CONNTRACK
$(PKG_CONFIG)
--libs
libnetfilter_conntrack
`
idn_libs
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_IDN
$(PKG_CONFIG)
--libs
libidn
`
LUA_CFLAGS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_LUASCRIPT
$(PKG_CONFIG)
--cflags
lua5.1
`
ct_cflags
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_CONNTRACK
$(PKG_CONFIG)
--cflags
libnetfilter_conntrack
`
LUA_LIBS
=
`
echo
$(COPTS)
|
$(TOP)
/bld/pkg-wrapper HAVE_LUASCRIPT
$(PKG_CONFIG)
--libs
lua5.1
`
ct_libs
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_CONNTRACK
$(PKG_CONFIG)
--libs
libnetfilter_conntrack
`
SUNOS_LIBS
=
`
if
uname
|
grep
SunOS 2>&1
>
/dev/null
;
then
echo
-lsocket
-lnsl
-lposix4
;
fi
`
lua_cflags
=
`
echo
$(COPTS)
|
$(top)
/bld/pkg-wrapper HAVE_LUASCRIPT
$(PKG_CONFIG)
--cflags
lua5.1
`
VERSION
=
-DVERSION
=
'\"`
$(TOP)
/bld/get-version
$(TOP)
`\"'
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
`
OBJS
=
cache.o rfc1035.o util.o option.o forward.o network.o
\
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
\
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
\
helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o
\
dhcp-common.o outpacket.o radv.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
dns-protocol.h radv-protocol.h
all
:
$(BUILDDIR)
all
:
$(BUILDDIR)
@
cd
$(BUILDDIR)
&&
$(MAKE)
\
@
cd
$(BUILDDIR)
&&
$(MAKE)
\
TOP
=
"
$(TOP
)
"
\
top
=
"
$(top
)
"
\
BUILD_CFLAGS
=
"
$(VERSION)
$(DBUS_CFLAGS)
$(IDN_CFLAGS)
$(CT_CFLAGS)
$(LUA_CFLAGS
)
"
\
build_cflags
=
"
$(version)
$(dbus_cflags)
$(idn_cflags)
$(ct_cflags)
$(lua_cflags
)
"
\
BUILD_LIBS
=
"
$(DBUS_LIBS)
$(IDN_LIBS)
$(CT_LIBS)
$(LUA_LIBS)
$(SUNOS_LIBS
)
"
\
build_libs
=
"
$(dbus_libs)
$(idn_libs)
$(ct_libs)
$(lua_libs)
$(sunos_libs
)
"
\
-f
$(
TOP
)
/Makefile dnsmasq
-f
$(
top
)
/Makefile dnsmasq
clean
:
clean
:
rm
-f
*
~
$(BUILDDIR)
/
*
.mo contrib/
*
/
*
~
*
/
*
~
$(BUILDDIR)
/
*
.pot
rm
-f
*
~
$(BUILDDIR)
/
*
.mo contrib/
*
/
*
~
*
/
*
~
$(BUILDDIR)
/
*
.pot
...
@@ -78,21 +90,21 @@ install-common :
...
@@ -78,21 +90,21 @@ install-common :
all-i18n
:
$(BUILDDIR)
all-i18n
:
$(BUILDDIR)
@
cd
$(BUILDDIR)
&&
$(MAKE)
\
@
cd
$(BUILDDIR)
&&
$(MAKE)
\
TOP
=
"
$(TOP
)
"
\
top
=
"
$(top
)
"
\
I18N
=
-DLOCALEDIR
=
\'\"
$(LOCALEDIR)
\"\'
\
i18n
=
-DLOCALEDIR
=
\'\"
$(LOCALEDIR)
\"\'
\
BUILD_CFLAGS
=
"
$(VERSION)
$(DBUS_CFLAGS)
$(CT_CFLAGS)
$(LUA_CFLAGS
)
`
$(PKG_CONFIG)
--cflags
libidn
`
"
\
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
`
"
\
build_libs
=
"
$(dbus_libs)
$(ct_libs)
$(lua_libs)
$(sunos_libs
)
`
$(PKG_CONFIG)
--libs
libidn
`
"
\
-f
$(
TOP
)
/Makefile dnsmasq
-f
$(
top
)
/Makefile dnsmasq
for
f
in
`
cd
$(PO)
;
echo
*
.po
`
;
do
\
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
done
install-i18n
:
all-i18n install-common
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)
cd
$(MAN)
;
../bld/install-man
$(DESTDIR)$(MANDIR)
$(INSTALL)
merge
:
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
\
for
f
in
`
cd
$(PO)
;
echo
*
.po
`
;
do
\
echo
-n
msgmerge
$(PO)
/
$$
f
&&
$(MSGMERGE)
--no-wrap
-U
$(PO)
/
$$
f
$(BUILDDIR)
/dnsmasq.pot
;
\
echo
-n
msgmerge
$(PO)
/
$$
f
&&
$(MSGMERGE)
--no-wrap
-U
$(PO)
/
$$
f
$(BUILDDIR)
/dnsmasq.pot
;
\
done
done
...
@@ -103,20 +115,20 @@ $(BUILDDIR):
...
@@ -103,20 +115,20 @@ $(BUILDDIR):
# rules below are targets in recusive makes with cwd=$(SRC)
# rules below are targets in recusive makes with cwd=$(SRC)
$(
OBJS
:
.o=.c) $(HDRS
):
$(
objs
:
.o=.c) $(hdrs
):
ln
-s
$(
TOP
)
/
$(SRC)
/
$@
.
ln
-s
$(
top
)
/
$(SRC)
/
$@
.
.c.o
:
.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
)
dnsmasq
:
$(
hdrs) $(objs
)
$(CC)
$(LDFLAGS)
-o
$@
$(
OBJS)
$(BUILD_LIBS
)
$(LIBS)
$(CC)
$(LDFLAGS)
-o
$@
$(
objs)
$(build_libs
)
$(LIBS)
dnsmasq.pot
:
$(
OBJS:.o=.c) $(HDRS
)
dnsmasq.pot
:
$(
objs:.o=.c) $(hdrs
)
$(XGETTEXT)
-d
dnsmasq
--foreign-user
--omit-header
--keyword
=
_
-o
$@
-i
$(
OBJS
:.o=.c)
$(XGETTEXT)
-d
dnsmasq
--foreign-user
--omit-header
--keyword
=
_
-o
$@
-i
$(
objs
:.o=.c)
%.mo
:
$(
TOP)/po
/%.po dnsmasq.pot
%.mo
:
$(
top)/$(PO)
/%.po dnsmasq.pot
$(MSGMERGE)
-o
-
$(
TOP
)
/po/
$*
.po dnsmasq.pot |
$(MSGFMT)
-o
$*
.mo -
$(MSGMERGE)
-o
-
$(
top
)
/po/
$*
.po dnsmasq.pot |
$(MSGFMT)
-o
$*
.mo -
.PHONY
:
all clean install install-common all-i18n install-i18n merge
.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
...
@@ -4,6 +4,6 @@ for f in *; do
if
[
-d
$f
]
;
then
if
[
-d
$f
]
;
then
$2
-m
755
-d
$1
/
$f
/man8
$2
-m
755
-d
$1
/
$f
/man8
$2
-m
644
$f
/dnsmasq.8
$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
fi
done
done
bld/install-mo
View file @
24848940
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
for
f
in
*
.mo
;
do
for
f
in
*
.mo
;
do
$2
-m
755
-d
$1
/
${
f
%.mo
}
/LC_MESSAGES
$2
-m
755
-d
$1
/
${
f
%.mo
}
/LC_MESSAGES
$2
-m
644
$f
$1
/
${
f
%.mo
}
/LC_MESSAGES/dnsmasq.mo
$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
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