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 ++++++++++++---------- .../other/jpeg2000/libjasper/base/jas_stream.c | 2 +- .../jpeg2000/libjasper/include/jasper/jas_image.h | 2 +- .../jpeg2000/libjasper/include/jasper/jas_types.h | 2 +- converter/other/jpeg2000/libjasper/jp2/jp2_cod.c | 2 +- converter/other/jpeg2000/libjasper/jpc/jpc_mqcod.h | 2 +- lib/Makefile | 2 -- lib/util/Makefile | 2 -- urt/rle_addhist.c | 2 +- urt/rle_getrow.c | 4 +-- urt/rle_open_f.c | 4 +-- urt/rle_putcom.c | 4 +-- urt/scanargs.c | 4 +-- 13 files changed, 32 insertions(+), 34 deletions(-) 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) $< $@ diff --git a/converter/other/jpeg2000/libjasper/base/jas_stream.c b/converter/other/jpeg2000/libjasper/base/jas_stream.c index 4c84e6c2..19dc7c11 100644 --- a/converter/other/jpeg2000/libjasper/base/jas_stream.c +++ b/converter/other/jpeg2000/libjasper/base/jas_stream.c @@ -130,7 +130,7 @@ #include #endif -#include "pm.h" +#include "netpbm/pm.h" #include "jasper/jas_types.h" #include "jasper/jas_stream.h" diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_image.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_image.h index d6456f7c..558f4368 100644 --- a/converter/other/jpeg2000/libjasper/include/jasper/jas_image.h +++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_image.h @@ -123,7 +123,7 @@ * Includes. \******************************************************************************/ -#include "pm_c_util.h" +#include "netpbm/pm_c_util.h" #include #include diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_types.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_types.h index 4d3a4988..fbcb2ffb 100644 --- a/converter/other/jpeg2000/libjasper/include/jasper/jas_types.h +++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_types.h @@ -4,7 +4,7 @@ In Netpbm, we do that with pm_config.h, and the original Jasper method doesn't work. */ -#include "pm_config.h" +#include "netpbm/pm_config.h" /* The below macro is intended to be used for type casts. By using this diff --git a/converter/other/jpeg2000/libjasper/jp2/jp2_cod.c b/converter/other/jpeg2000/libjasper/jp2/jp2_cod.c index 4769c408..cb70fd24 100644 --- a/converter/other/jpeg2000/libjasper/jp2/jp2_cod.c +++ b/converter/other/jpeg2000/libjasper/jp2/jp2_cod.c @@ -123,7 +123,7 @@ #include #include -#include "pm_c_util.h" +#include "netpbm/pm_c_util.h" #include "jasper/jas_stream.h" #include "jasper/jas_malloc.h" diff --git a/converter/other/jpeg2000/libjasper/jpc/jpc_mqcod.h b/converter/other/jpeg2000/libjasper/jpc/jpc_mqcod.h index 914f8e8a..5f99e021 100644 --- a/converter/other/jpeg2000/libjasper/jpc/jpc_mqcod.h +++ b/converter/other/jpeg2000/libjasper/jpc/jpc_mqcod.h @@ -123,7 +123,7 @@ * Includes. \*****************************************************************************/ -#include "pm_c_util.h" +#include "netpbm/pm_c_util.h" #include "jasper/jas_types.h" /*****************************************************************************\ diff --git a/lib/Makefile b/lib/Makefile index c49367b5..6f2e7383 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -67,8 +67,6 @@ BINARIES = OMIT_LIBRARY_RULE = 1 include $(SRCDIR)/common.mk -INCLUDES = -I$(SRCDIR)/$(SUBDIR) -I. -Iimportinc - # The following must go after common.mk because $(LIBNETPBM) may # contain a reference to $(NETPBM_MAJOR_RELEASE). .PHONY: libnetpbm diff --git a/lib/util/Makefile b/lib/util/Makefile index 8b3fa1c1..f5f0e04c 100644 --- a/lib/util/Makefile +++ b/lib/util/Makefile @@ -17,8 +17,6 @@ all: $(UTILOBJECTS) include $(SRCDIR)/common.mk -INCLUDES = -I$(SRCDIR)/$(SUBDIR) -I. -Iimportinc - $(UTILOBJECTS):%.o:%.c importinc $(CC) -c $(INCLUDES) -DNDEBUG $(CPPFLAGS) $(CFLAGS) $(CFLAGS_SHLIB) \ $(CFLAGS_PERSONAL) $(CADD) -o $@ $< diff --git a/urt/rle_addhist.c b/urt/rle_addhist.c index 04e26206..0df9642d 100644 --- a/urt/rle_addhist.c +++ b/urt/rle_addhist.c @@ -37,7 +37,7 @@ #include #endif -#include "mallocvar.h" +#include "netpbm/mallocvar.h" /***************************************************************** * TAG( rle_addhist ) diff --git a/urt/rle_getrow.c b/urt/rle_getrow.c index fadf5441..bd7d1c8e 100644 --- a/urt/rle_getrow.c +++ b/urt/rle_getrow.c @@ -33,8 +33,8 @@ #include #include -#include "pm.h" -#include "mallocvar.h" +#include "netpbm/pm.h" +#include "netpbm/mallocvar.h" #include "rle.h" #include "rle_code.h" diff --git a/urt/rle_open_f.c b/urt/rle_open_f.c index 07dbea01..7234afe9 100644 --- a/urt/rle_open_f.c +++ b/urt/rle_open_f.c @@ -15,8 +15,8 @@ #include #include -#include "pm_c_util.h" -#include "nstring.h" +#include "netpbm/pm_c_util.h" +#include "netpbm/nstring.h" #include "rle.h" diff --git a/urt/rle_putcom.c b/urt/rle_putcom.c index b1215661..ab2eb208 100644 --- a/urt/rle_putcom.c +++ b/urt/rle_putcom.c @@ -27,8 +27,8 @@ #include -#include "mallocvar.h" -#include "pm.h" +#include "netpbm/mallocvar.h" +#include "netpbm/pm.h" #include "rle.h" /***************************************************************** diff --git a/urt/scanargs.c b/urt/scanargs.c index b91f3e37..e1f15047 100644 --- a/urt/scanargs.c +++ b/urt/scanargs.c @@ -49,8 +49,8 @@ #include #endif -#include "pm_c_util.h" -#include "nstring.h" +#include "netpbm/pm_c_util.h" +#include "netpbm/nstring.h" /* * An explicit assumption is made in this code that all pointers look -- cgit 1.4.1