mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-28 12:33:49 +08:00
Move VERSION from Makefile to config.h so that other Makefiles can be used instead of our own.
This commit is contained in:
parent
0788461c46
commit
7b15d336d9
3
Makefile
3
Makefile
@ -3,8 +3,6 @@
|
||||
# Copyright 2008 Roy Marples <roy@marples.name>
|
||||
|
||||
PROG= dhcpcd
|
||||
VERSION= 4.0.0-beta3
|
||||
|
||||
SRCS= common.c dhcp.c dhcpcd.c logger.c net.c signals.c
|
||||
SRCS+= configure.c client.c
|
||||
SRCS+= ${SRC_IF} ${SRC_SOCKET}
|
||||
@ -22,7 +20,6 @@ SYSCONFDIR?= ${PREFIX}/etc/${PROG}
|
||||
MK= mk
|
||||
include ${MK}/prog.mk
|
||||
|
||||
CFLAGS+= -DVERSION=\"${VERSION}\"
|
||||
CFLAGS+= -DSYSCONFDIR=\"${SYSCONFDIR}\"
|
||||
CFLAGS+= -DDBDIR=\"${DBDIR}\"
|
||||
LDADD+= ${LIBRT}
|
||||
|
7
config.h
7
config.h
@ -27,6 +27,9 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#define PACKAGE "dhcpcd"
|
||||
#define VERSION "4.0.0-beta4"
|
||||
|
||||
/* You can enable/disable various chunks of optional code here.
|
||||
* You would only do this to try and shrink the end binary if dhcpcd
|
||||
* was running on a low memory device */
|
||||
@ -56,9 +59,7 @@
|
||||
/* Some systems do not have a working fork. */
|
||||
/* #define THERE_IS_NO_FORK */
|
||||
|
||||
/* Packname name and pathname definitions. */
|
||||
#define PACKAGE "dhcpcd"
|
||||
|
||||
/* Paths to things */
|
||||
#ifndef SYSCONFDIR
|
||||
# define SYSCONFDIR "/etc/" PACKAGE
|
||||
#endif
|
||||
|
@ -7,5 +7,9 @@ DISTFILE?= ${DISTPREFIX}.tar.bz2
|
||||
|
||||
CLEANFILES+= ${DISTFILE}
|
||||
|
||||
_VERSION_SH= sed -n 's/\#define VERSION[[:space:]]*"\(.*\)".*/\1/p' config.h
|
||||
_VERSION!= ${_VERSION_SH}
|
||||
VERSION= ${_VERSION}$(shell ${_VERSION_SH})
|
||||
|
||||
dist:
|
||||
git archive --prefix=${DISTPREFIX}/ ${GITREF} | bzip2 > ${DISTFILE}
|
||||
|
Loading…
Reference in New Issue
Block a user