[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:37:10 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=3f90820

The following commit has been merged in the master branch:
commit 3f90820d08aa92acd3320a301859f5138af7074f
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sun Jun 19 05:03:53 2005 +0000

    Further tweaked the build process
---
 config/config.mk.in | 24 ++++++++++++++----------
 config/configure.ac |  3 +++
 src/Makefile        | 33 ++++++++++++++++++---------------
 3 files changed, 35 insertions(+), 25 deletions(-)

diff --git a/config/config.mk.in b/config/config.mk.in
index 6caf872..32f77e8 100644
--- a/config/config.mk.in
+++ b/config/config.mk.in
@@ -45,23 +45,21 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
 # **********************************************************************
 # C++ Compiler and precompiler
 CXX = @CXX@
+GXX = @GXX@
 
 # Common compiler flags (warnings, symbols [-ggdb], optimization [-O2], etc)
-ifeq ($(findstring g++,$(CXX)),g++)
+ifeq ($(GXX),yes)
 	CXXFLAGS = -Wall -O2
 else
 	CXXFLAGS = @CXXFLAGS@
 endif
 
 # Command to run only the preprocessor
-CXXCPP = $(CXX) -E -dD
+CPP = $(CXX) -E -dD
 
 # Preprocessor flags
 CPPFLAGS = @CPPFLAGS@
 
-# Command to run the compiler or preprocessor to produce dependencies
-CXXDEP = $(CXX) -MM
-
 # Linker flags
 LDFLAGS = @LDFLAGS@ -lm
 
@@ -71,7 +69,9 @@ EXEEXT := @EXEEXT@
 # **********************************************************************
 # C Compiler
 CC = @CC@
-ifeq ($(findstring gcc,$(CC)),gcc)
+GCC = @GCC@
+
+ifeq ($(GCC),yes)
 	CFLAGS := -Wall -O2
 else
 	CFLAGS := @CFLAGS@
@@ -81,14 +81,18 @@ endif
 # Advanced auto-dependency generation
 # http://make.paulandlesley.org/autodep.html
 
-# Compiler flags to generate dependency file at the same time as object
+# Compiler flags to generate dependency files at the same time as object
 # files (for gcc)
-ifeq ($(findstring g++,$(CXX)),g++)
+ifeq ($(GXX),yes)
 	CXXFLAGS += -MMD
 	CFLAGS += -MMD
+	MAKEDEPEND =
 else
-# Command to run the compiler or preprocessor to produce dependencies
-	MAKEDEPEND = $(CC) -MM $(CPPFLAGS) -o $*.d $<
+# Command to run the compiler or preprocessor to produce dependencies.
+# If you're not using gcc, you may need to change this to something 
+# suitable for your compiler or simply unset the variable. See the link
+# above for suggestions
+	MAKEDEPEND = $(CXX) -MM $(CPPFLAGS) -o $*.d $<
 endif
 
 # **********************************************************************
diff --git a/config/configure.ac b/config/configure.ac
index f77476b..ff082be 100644
--- a/config/configure.ac
+++ b/config/configure.ac
@@ -41,5 +41,8 @@ AC_CHECK_FUNCS([memset strchr strerror strtol])
 AC_CHECK_FUNCS([timegm], HAVE_TIMEGM=1)
 AC_SUBST(HAVE_TIMEGM,$HAVE_TIMEGM)
 
+AC_SUBST(GXX,$GXX)
+AC_SUBST(GCC,$GCC)
+
 AC_CONFIG_FILES([./config/config.mk])
 AC_OUTPUT
diff --git a/src/Makefile b/src/Makefile
index b93a420..a7cc034 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -130,37 +130,37 @@ MCOBJ = $(MCMAIN:.cpp=.o) $(MCSRC:.cpp=.o)
 MCBIN = $(MCMAIN:.cpp=)
 MCEXE = $(MCMAIN:.cpp=$(EXEEXT))
 
-# ******************************************************************************
-# Include dependency files
--include $(DEP)
-
 # Dependency files post-process commands 
-POSTDEPEND = cp $*.d $(DEPDIR)/$*.d; \
+POSTDEPEND = if test -e $*.d ; then cp $*.d $(DEPDIR)/$*.d; \
 	     sed -e 's/^\#.*//' -e 's/^[^:]*: *//' -e 's/ *\$$//' \
                  -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $(DEPDIR)/$*.d; \
-             $(RM) $*.d
+             $(RM) $*.d; fi
+
+# Compilation shortcuts 
+COMPILE.cc = $(CXX) $(CXXFLAGS) $(CXXDEFS) $(CXXINCS) -c
+COMPILE.c = $(CC) $(CFLAGS) $(DEFS) $(INCS) -c
+LINK.cc = $(CXX) $(CXXFLAGS) $(LDLIBS) $(LDFLAGS) -rpath $(libdir) 
 
 # ******************************************************************************
 # Rules
 $(OBJ): %.o: %.cpp | $(DEPDIR)
-	@$(LIBTOOL) --mode=compile $(CXX) $(CXXFLAGS) $(CXXDEFS) $(CXXINCS) -o $@ -c $<
+	@$(LIBTOOL) --mode=compile $(COMPILE.cc) -o $@ $<
 	@$(MAKEDEPEND)
 	@$(POSTDEPEND)
 
 $(sort $(BINOBJ) $(EXIV2OBJ) $(MCOBJ)): %.o: %.cpp | $(DEPDIR)
-	$(CXX) $(CXXFLAGS) $(CXXDEFS) $(CXXINCS) -o $@ -c $<
+	$(COMPILE.cc) -o $@ $<
 	@$(MAKEDEPEND)
 	@$(POSTDEPEND)
 
 %.o: %.c | $(DEPDIR)
-	$(CC) $(CFLAGS) $(DEFS) $(INCS) -o $@ -c $<
+	$(COMPILE.c) -o $@ $<
 	@$(MAKEDEPEND)
 	@$(POSTDEPEND)
 
 %.ii: %.cpp
 	set -e; \
-	$(CXXCPP) $(CPPFLAGS) $(CXXDEFS) $(CXXINCS) $< \
-	| sed '/^[ 	]*$$/d' > $@
+	$(CPP) $(CPPFLAGS) $(CXXDEFS) $(CXXINCS) $< | sed '/^[ 	]*$$/d' > $@
 
 # ******************************************************************************
 # Targets
@@ -169,6 +169,9 @@ $(sort $(BINOBJ) $(EXIV2OBJ) $(MCOBJ)): %.o: %.cpp | $(DEPDIR)
         install install-header install-lib                             \
         uninstall uninstall-header uninstall-lib
 
+# Include targets from dependency files
+-include $(DEP)
+
 actions.cpp basicio.cpp exif.cpp exiv2.cpp futils.cpp image.cpp jpgimage.cpp utils.cpp: exv_conf.h
 
 exv_conf.h: $(top_srcdir)/config/config.h
@@ -190,13 +193,13 @@ path-test: path-test.o utils.o
 	$(CXX) $(CXXFLAGS) path-test.o utils.o -o $@
 
 $(BINARY): %: %.o lib
-	@$(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(LDLIBS) $@.o $(LDFLAGS) -o $@ -rpath $(libdir)
+	@$(LIBTOOL) --mode=link $(LINK.cc) -o $@ $@.o 
 
 $(EXIV2BIN): lib $(EXIV2OBJ) $(EXIV2COBJ)
-	@$(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(EXIV2OBJ) $(EXIV2COBJ) $(LDLIBS) $(LDFLAGS) -o $@ -rpath $(libdir)
+	@$(LIBTOOL) --mode=link $(LINK.cc) -o $@ $(EXIV2OBJ) $(EXIV2COBJ)
 
 $(MCBIN): lib $(MCOBJ)
-	@$(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(MCOBJ) $(LDLIBS) $(LDFLAGS) -o $@ -rpath $(libdir)
+	@$(LIBTOOL) --mode=link $(LINK.cc) -o $@ $(MCOBJ) 
 
 install-header:
 	$(INSTALL_DIRS) $(incdir)
@@ -255,7 +258,7 @@ clean: mostlyclean
 distclean: clean
 	$(RM) exv_conf.h
 	$(RM) $(DEP)
-	rmdir $(DEPDIR)
+	-rmdir $(DEPDIR)
 	$(RM) tags TAGS
 	$(RM) *~ *.bak *#
 

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list