shithub: choc

Download patch

ref: ca78a3ab8f72957395611729b3a5df0500622633
parent: 59d5f4e54e320dafddb2ad38493a23f7f7fc054c
parent: 86cb29b693064f7e848032217c3b0114d4349cfe
author: Simon Howard <[email protected]>
date: Thu Dec 31 04:05:10 EST 2015

Merge pull request #649 from rrebello/makefile-fix

Avoid use of '$<' and '$^' in Makefile rules

--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -54,7 +54,7 @@
 DOCGEN = $(MANDIR)/docgen
 
 $(SETUP_MAN_PAGES): chocolate-setup.6
-	cp $< $@
+	cp chocolate-setup.6 $@
 
 @[email protected]: ../src $(MANPAGE_GEN_FILES)
 	$(DOCGEN) -g doom -m doom.template $(top_srcdir)/src $(top_srcdir)/src/doom > $@
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -186,7 +186,7 @@
 @PROGRAM_PREFIX@strife_LDADD = strife/libstrife.a $(EXTRA_LIBS)
 
 $(SETUP_BINARIES): @PROGRAM_PREFIX@setup$(EXEEXT)
-	cp $< $@
+	cp @PROGRAM_PREFIX@setup$(EXEEXT) $@
 
 # Source files needed for chocolate-setup:
 
@@ -272,13 +272,14 @@
 if HAVE_PYTHON
 
 icon.c : $(top_builddir)/data/doom8.ico
-	$(top_builddir)/data/convert-icon $< $@
+	$(top_builddir)/data/convert-icon $(top_builddir)/data/doom8.ico $@
 
 endif
 
 midiread : midifile.c
-	$(CC) -DTEST $(CFLAGS) @LDFLAGS@ $< -o $@
+	$(CC) -DTEST $(CFLAGS) @LDFLAGS@ midifile.c -o $@
 
-mus2mid : mus2mid.c memio.c z_native.c i_system.c m_argv.c m_misc.c
-	$(CC) -DSTANDALONE -I$(top_builddir) $(CFLAGS) @LDFLAGS@ $^ -o $@
+MUS2MID_SOURCES = mus2mid.c memio.c z_native.c i_system.c m_argv.c m_misc.c
+mus2mid : $(MUS2MID_SOURCES)
+	$(CC) -DSTANDALONE -I$(top_builddir) $(CFLAGS) @LDFLAGS@ $(MUS2MID_SOURCES) -o $@
 
--- a/src/setup/Makefile.am
+++ b/src/setup/Makefile.am
@@ -39,7 +39,7 @@
 if HAVE_PYTHON
 
 setup_icon.c : $(top_builddir)/data/setup8.ico
-	$(top_builddir)/data/convert-icon $^ $@
+	$(top_builddir)/data/convert-icon $(top_builddir)/data/setup8.ico $@
 
 endif