[SCM] juce/master: make introjucer produce nicer makefiles
umlaeute at users.alioth.debian.org
umlaeute at users.alioth.debian.org
Wed Feb 10 20:53:45 UTC 2016
The following commit has been merged in the master branch:
commit 226f6f8faefc49140279769b608bf5c546154a79
Author: IOhannes m zmölnig <zmoelnig at umlautQ.umlaeute.mur.at>
Date: Wed Feb 10 16:46:47 2016 +0100
make introjucer produce nicer makefiles
diff --git a/debian/patches/introjucer-makegenerator.patch b/debian/patches/introjucer-makegenerator.patch
new file mode 100644
index 0000000..560f1a4
--- /dev/null
+++ b/debian/patches/introjucer-makegenerator.patch
@@ -0,0 +1,121 @@
+Description: introjucer fixes
+ introjucer creates Linux Makefiles, but they do silent builds and do not allow
+ to override CPP/C/CXXFLAGS.
+ this patch changes introjucer to honor the "V" build variable, so "V=1" will
+ build verbosely.
+ it also renames *FLAGS to JUCE_*FLAGS and appends the ordinary *FLAGS to them.
+Author: IOhannes m zmölnig
+Origin: Debian
+Last-Update: 2015-02-10
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- "juce.orig/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Make.h"
++++ "juce/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Make.h"
+@@ -169,15 +169,16 @@
+
+ void writeCppFlags (OutputStream& out, const BuildConfiguration& config) const
+ {
+- out << " CPPFLAGS := $(DEPFLAGS)";
++ out << " JUCE_CPPFLAGS := $(DEPFLAGS)";
+ writeDefineFlags (out, config);
+ writeHeaderPathFlags (out, config);
+- out << newLine;
++ out << " $(CPPFLAGS)"
++ << newLine;
+ }
+
+ void writeLinkerFlags (OutputStream& out, const BuildConfiguration& config) const
+ {
+- out << " LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR)";
++ out << " JUCE_LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR)";
+
+ {
+ StringArray flags (makefileExtraLinkerFlags);
+@@ -207,7 +208,8 @@
+ if (libraries.size() != 0)
+ out << " -l" << replacePreprocessorTokens (config, libraries.joinIntoString (" -l")).trim();
+
+- out << " " << replacePreprocessorTokens (config, getExtraLinkerFlagsString()).trim()
++ out << " " << replacePreprocessorTokens (config, getExtraLinkerFlagsString()).trim();
++ out << " $(LDFLAGS)"
+ << newLine;
+ }
+
+@@ -236,7 +238,7 @@
+
+ writeCppFlags (out, config);
+
+- out << " CFLAGS += $(CPPFLAGS) $(TARGET_ARCH)";
++ out << " JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH)";
+
+ if (config.isDebug())
+ out << " -g -ggdb";
+@@ -246,6 +248,7 @@
+
+ out << " -O" << config.getGCCOptimisationFlag()
+ << (" " + replacePreprocessorTokens (config, getExtraCompilerFlagsString())).trimEnd()
++ << " $(CFLAGS)"
+ << newLine;
+
+ String cppStandardToUse (getCppStandardString());
+@@ -253,8 +256,9 @@
+ if (cppStandardToUse.isEmpty())
+ cppStandardToUse = "-std=c++11";
+
+- out << " CXXFLAGS += $(CFLAGS) "
++ out << " JUCE_CXXFLAGS += $(JUCE_CFLAGS) "
+ << cppStandardToUse
++ << " $(CXXFLAGS)"
+ << newLine;
+
+ writeLinkerFlags (out, config);
+@@ -273,7 +277,7 @@
+ if (projectType.isStaticLibrary())
+ out << " BLDCMD = ar -rcs $(OUTDIR)/$(TARGET) $(OBJECTS)" << newLine;
+ else
+- out << " BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)" << newLine;
++ out << " BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(JUCE_LDFLAGS) $(RESOURCES) $(TARGET_ARCH)" << newLine;
+
+ out << " CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)" << newLine
+ << "endif" << newLine
+@@ -297,6 +301,14 @@
+ << "# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project!" << newLine
+ << newLine;
+
++ out << "# build with \"V=1\" for verbose builds" << newLine
++ << "ifeq ($(V), 1)" << newLine
++ << "V_AT =" << newLine
++ << "else" << newLine
++ << "V_AT = @" << newLine
++ << "endif" << newLine
++ << newLine;
++
+ out << "# (this disables dependency generation if multiple architectures are set)" << newLine
+ << "DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)" << newLine
+ << newLine;
+@@ -319,12 +331,12 @@
+ << "\t- at mkdir -p $(BINDIR)" << newLine
+ << "\t- at mkdir -p $(LIBDIR)" << newLine
+ << "\t- at mkdir -p $(OUTDIR)" << newLine
+- << "\t@$(BLDCMD)" << newLine
++ << "\t$(V_AT)$(BLDCMD)" << newLine
+ << newLine;
+
+ out << "clean:" << newLine
+ << "\t at echo Cleaning " << projectName << newLine
+- << "\t@$(CLEANCMD)" << newLine
++ << "\t$(V_AT)$(CLEANCMD)" << newLine
+ << newLine;
+
+ out << "strip:" << newLine
+@@ -342,8 +354,8 @@
+ << ": " << escapeSpaces (files.getReference(i).toUnixStyle()) << newLine
+ << "\t- at mkdir -p $(OBJDIR)" << newLine
+ << "\t at echo \"Compiling " << files.getReference(i).getFileName() << "\"" << newLine
+- << (files.getReference(i).hasFileExtension ("c;s;S") ? "\t@$(CC) $(CFLAGS) -o \"$@\" -c \"$<\""
+- : "\t@$(CXX) $(CXXFLAGS) -o \"$@\" -c \"$<\"")
++ << (files.getReference(i).hasFileExtension ("c;s;S") ? "\t$(V_AT)$(CC) $(JUCE_CFLAGS) -o \"$@\" -c \"$<\""
++ : "\t$(V_AT)$(CXX) $(JUCE_CXXFLAGS) -o \"$@\" -c \"$<\"")
+ << newLine << newLine;
+ }
+ }
--
juce packaging
More information about the pkg-multimedia-commits
mailing list