Updated toplevel Makefile to avoid created unnecessary temporary

directories when they are not wanted/required.
This commit is contained in:
Jesse Smith 2018-06-03 20:14:01 -03:00
parent 108b31e284
commit 2d6d2bc0d3
3 changed files with 5 additions and 3 deletions

View File

@ -4,7 +4,7 @@ all install clean distclean:
PACKAGE=sysvinit PACKAGE=sysvinit
VERSION=$(shell sed -rn '1s/.*[[:blank:]]\((.*)\)[[:blank:]].*/\1/p' doc/Changelog) VERSION=$(shell sed -rn '1s/.*[[:blank:]]\((.*)\)[[:blank:]].*/\1/p' doc/Changelog)
GITLOGIN=$(shell git remote -v | head -n 1 | cut -f 1 -d '@' | sed 's/origin\t//g') GITLOGIN=$(shell git remote -v | head -n 1 | cut -f 1 -d '@' | sed 's/origin\t//g')
override TMP:=$(shell mktemp -d $(VERSION).XXXXXXXX) override TMP:=$(shell mktemp -du $(VERSION).XXXXXXXX)
override TARBALL:=$(TMP)/$(PACKAGE)-$(VERSION).tar.xz override TARBALL:=$(TMP)/$(PACKAGE)-$(VERSION).tar.xz
override SFTPBATCH:=$(TMP)/$(VERSION)-sftpbatch override SFTPBATCH:=$(TMP)/$(VERSION)-sftpbatch
SOURCES=contrib COPYING COPYRIGHT doc Makefile man README src SOURCES=contrib COPYING COPYRIGHT doc Makefile man README src
@ -35,7 +35,7 @@ $(TARBALL): $(TMP)/$(PACKAGE)-$(VERSION)
@tar --exclude=.git --owner=nobody --group=nogroup -cf $@ -C $(TMP) $(PACKAGE)-$(VERSION) @tar --exclude=.git --owner=nobody --group=nogroup -cf $@ -C $(TMP) $(PACKAGE)-$(VERSION)
$(TMP)/$(PACKAGE)-$(VERSION): $(TMP)/$(PACKAGE)-$(VERSION):
@mkdir $(TMP)/$(PACKAGE)-$(VERSION) @mkdir -p $(TMP)/$(PACKAGE)-$(VERSION)
@cp -R $(SOURCES) $(TMP)/$(PACKAGE)-$(VERSION)/ @cp -R $(SOURCES) $(TMP)/$(PACKAGE)-$(VERSION)/
@chmod -R a+r,u+w,og-w $@ @chmod -R a+r,u+w,og-w $@
@find $@ -type d | xargs -r chmod a+rx,u+w,og-w @find $@ -type d | xargs -r chmod a+rx,u+w,og-w

View File

@ -48,6 +48,8 @@ sysvinit (2.90) UNRELEASED; urgency=low
* Updated version information in init.c * Updated version information in init.c
* Updated compiler flag from -fstack-protector to -fstack-protector-strong * Updated compiler flag from -fstack-protector to -fstack-protector-strong
for better protection. for better protection.
* Cleaned up toplevel Makefile so it stops creating unnecessary temporary
directories.
sysvinit (2.89) world; urgency=low sysvinit (2.89) world; urgency=low

View File

@ -9,7 +9,7 @@
# #
CPPFLAGS = CPPFLAGS =
CFLAGS ?= -ansi -O2 -fomit-frame-pointer -fstack-protector-strong CFLAGS ?= -ansi -O2 -fomit-frame-pointer -fstack-protector-strong
override CFLAGS += -W -Wall -Wunreachable-code -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE -D_GNU_SOURCE override CFLAGS += -W -Wall -Wunreachable-code -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE -D_GNU_SOURCE
override CFLAGS += $(shell getconf LFS_CFLAGS) override CFLAGS += $(shell getconf LFS_CFLAGS)
STATIC = STATIC =