[Makefile] Fix for GNU make < 4 (closes #9387)
authorYen Chi Hsuan <yan12125@gmail.com>
Sun, 9 Oct 2016 10:22:55 +0000 (18:22 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sun, 9 Oct 2016 10:24:45 +0000 (18:24 +0800)
Shell assignment operator in BSD make != is ported to GNU make in
version 4.0, so 3.x doesn't work. I choose to drop BSD make support as
installing GNU make on *BSD systems is easier than installing newer GNU
make.

ChangeLog
Makefile
README.md

index 7e9b2b873481bb4584bf63fa117c4e6f19e13ccb..3d3473a4b857b50ef31daa0f49d67e8eaa612e7c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+version <unreleased>
+
+Core
+* [Makefile] Support for GNU make < 4 is fixed; BSD make dropped (#9387)
+
+
 version 2016.10.07
 
 Extractors
index a2763a664188102662cc4f2c5b69518cc6664693..8d66e48c9328f9262c8d7bc493d0d460293d0ad9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ SHAREDIR ?= $(PREFIX)/share
 PYTHON ?= /usr/bin/env python
 
 # set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local
-SYSCONFDIR != if [ $(PREFIX) = /usr -o $(PREFIX) = /usr/local ]; then echo /etc; else echo $(PREFIX)/etc; fi
+SYSCONFDIR = $(shell if [ $(PREFIX) = /usr -o $(PREFIX) = /usr/local ]; then echo /etc; else echo $(PREFIX)/etc; fi)
 
 install: youtube-dl youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish
        install -d $(DESTDIR)$(BINDIR)
@@ -90,7 +90,7 @@ fish-completion: youtube-dl.fish
 
 lazy-extractors: youtube_dl/extractor/lazy_extractors.py
 
-_EXTRACTOR_FILES != find youtube_dl/extractor -iname '*.py' -and -not -iname 'lazy_extractors.py'
+_EXTRACTOR_FILES = $(shell find youtube_dl/extractor -iname '*.py' -and -not -iname 'lazy_extractors.py')
 youtube_dl/extractor/lazy_extractors.py: devscripts/make_lazy_extractors.py devscripts/lazy_load_template.py $(_EXTRACTOR_FILES)
        $(PYTHON) devscripts/make_lazy_extractors.py $@
 
index 4debe15feccd2614bd7841f04583ff1b2660cd62..1cb44b2cfb9e6578a2dc10893d0493e0140a7b1b 100644 (file)
--- a/README.md
+++ b/README.md
@@ -923,7 +923,7 @@ To run the test, simply invoke your favorite test runner, or execute a test file
 If you want to create a build of youtube-dl yourself, you'll need
 
 * python
-* make (both GNU make and BSD make are supported)
+* make (only GNU make is supported)
 * pandoc
 * zip
 * nosetests