From bfe58977ba6c6386d020a1355561e1102d907884 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Fri, 4 Sep 2009 06:02:23 +0000 Subject: improve handling of importinc/netpbm/xxx.h git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@980 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- common.mk | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'common.mk') diff --git a/common.mk b/common.mk index 9e13a7c8..ea7e5807 100644 --- a/common.mk +++ b/common.mk @@ -76,7 +76,15 @@ include $(SRCDIR)/version.mk # fully made. .DELETE_ON_ERROR: -NETPBM_INCLUDES := -Iimportinc -I$(SRCDIR)/$(SUBDIR) +# -I importinc/netpbm is a backward compatibility thing. Really, the source +# file should refer to e.g. "netpbm/pam.h" but for historical reasons, most +# refer to "pam.h" and we'll probably never have the energy to convert them +# all. The reason the file exists as importinc/netpbm/pam.h rather than just +# importinc/pam.h (as it did originally) is that it lives on a user's system +# as , and therefore all _exported_ header files do say +# ". + +NETPBM_INCLUDES := -Iimportinc -Iimportinc/netpbm -I$(SRCDIR)/$(SUBDIR) # -I. is needed when builddir != srcdir INCLUDES = -I. $(COMP_INCLUDES) $(NETPBM_INCLUDES) $(EXTERN_INCLUDES) @@ -133,33 +141,27 @@ IMPORTINC_HEADERS := \ $(IMPORTINC_LIB_HEADERS) \ $(IMPORTINC_LIB_UTIL_HEADERS) -IMPORTINC_ROOT_FILES := $(IMPORTINC_ROOT_HEADERS:%=importinc/%) -IMPORTINC_LIB_FILES := $(IMPORTINC_LIB_HEADERS:%=importinc/%) -IMPORTINC_LIB_UTIL_FILES := $(IMPORTINC_LIB_UTIL_HEADERS:%=importinc/%) +IMPORTINC_ROOT_FILES := $(IMPORTINC_ROOT_HEADERS:%=importinc/netpbm/%) +IMPORTINC_LIB_FILES := $(IMPORTINC_LIB_HEADERS:%=importinc/netpbm/%) +IMPORTINC_LIB_UTIL_FILES := $(IMPORTINC_LIB_UTIL_HEADERS:%=importinc/netpbm/%) importinc: \ - importinc/netpbm \ $(IMPORTINC_ROOT_FILES) \ $(IMPORTINC_LIB_FILES) \ $(IMPORTINC_LIB_UTIL_FILES) \ -importinc/netpbm: - mkdir -p importinc - rm -f $@ - $(SYMLINK) . $@ - -$(IMPORTINC_ROOT_FILES):importinc/%:$(BUILDDIR)/% - mkdir -p importinc +$(IMPORTINC_ROOT_FILES):importinc/netpbm/%:$(BUILDDIR)/% + mkdir -p importinc/netpbm rm -f $@ $(SYMLINK) $< $@ -$(IMPORTINC_LIB_FILES):importinc/%:$(SRCDIR)/lib/% - mkdir -p importinc +$(IMPORTINC_LIB_FILES):importinc/netpbm/%:$(SRCDIR)/lib/% + mkdir -p importinc/netpbm rm -f $@ $(SYMLINK) $< $@ -$(IMPORTINC_LIB_UTIL_FILES):importinc/%:$(SRCDIR)/lib/util/% - mkdir -p importinc +$(IMPORTINC_LIB_UTIL_FILES):importinc/netpbm/%:$(SRCDIR)/lib/util/% + mkdir -p importinc/netpbm rm -f $@ $(SYMLINK) $< $@ -- cgit 1.4.1