simplify generation of *_allheaders.hxx

There are some differences in the generated headers:

cppu_allheaders.hxx now explicitly includes
 #include <com/sun/star/uno/Any.h>
 #include <com/sun/star/uno/Any.hxx>
 #include <com/sun/star/uno/genfunc.h>
 #include <com/sun/star/uno/genfunc.hxx>
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/uno/Sequence.h>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/uno/Type.h>
 #include <com/sun/star/uno/Type.hxx>

sal_allheaders.hxx now does not (explicitly) include
 #include <cppunittester/protectorfactory.hxx>
 #include <internal/rtllifecycle.h>
 #include <osl/detail/android-bootstrap.h>
 #include <osl/detail/component-mapping.h>
 #include <osl/detail/file.h>
 #include <osl/detail/ios-bootstrap.h>
 #include <pch/precompiled_sal.hxx>

Change-Id: Ide3c708ac66f23b360b8e130790f8fa8f1911082
This commit is contained in:
David Tardon 2013-04-13 08:17:09 +02:00
parent 6aca2a3d0e
commit 71e52f37ac
8 changed files with 26 additions and 75 deletions

View File

@ -31,11 +31,6 @@ $(eval $(call gb_CppunitTest_add_exception_objects,cppu_checkapi,\
cppu/qa/checkapi/strings \
))
$(eval $(call gb_CppunitTest_set_include,cppu_checkapi,\
$$(INCLUDE) \
-I$(SRCDIR)/cppu/inc \
))
$(eval $(call gb_CppunitTest_use_internal_comprehensive_api,cppu_checkapi, \
cppu \
udkapi \

View File

@ -32,21 +32,13 @@ cppu_allheaders_DIR := $(call gb_CustomTarget_get_workdir,cppu/allheaders)
$(call gb_CustomTarget_get_target,cppu/allheaders) : \
$(cppu_allheaders_DIR)/cppu_allheaders.hxx
# dependency on Package_cppu_odk_headers.mk should ensure this is
# updated whenever a new public header is added
$(cppu_allheaders_DIR)/cppu_allheaders.hxx : \
$(SRCDIR)/cppu/CustomTarget_cppu_allheaders.mk \
$(SRCDIR)/cppu/Package_cppu_odk_headers.mk \
$(call gb_Package_get_target,cppu_odk_headers) \
| $(cppu_allheaders_DIR)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
printf '// Generated list of all cppu/ includes\n' > $@
$(foreach file, $(wildcard $(SRCDIR)/cppu/inc/*.h) $(wildcard $(SRCDIR)/cppu/inc/*.hxx) \
$(wildcard $(SRCDIR)/cppu/inc/*/*.h) $(wildcard $(SRCDIR)/cppu/inc/*/*.hxx) \
$(wildcard $(SRCDIR)/cppu/inc/*/*/*.h) $(wildcard $(SRCDIR)/cppu/inc/*/*/*.hxx) \
$(wildcard $(SRCDIR)/cppu/inc/*/*/*/*.h) $(wildcard $(SRCDIR)/cppu/inc/*/*/*/*.hxx), \
$(if $(findstring /win32/, $(file)), printf '#ifdef WNT\n' >> $@ &&) \
printf '#include <%s>\n' $(subst $(SRCDIR)/cppu/inc/,,$(file)) >> $@ && \
$(if $(findstring /win32/, $(file)), printf '#endif // WNT\n' >> $@ &&) \
) :
printf '// Generated list of cppu includes\n' > $@ \
$(foreach file,$(shell cat $<),\
&& printf '#include <%s>\n' $(subst $(INSTDIR)/$(gb_Package_SDKDIRNAME)/include/,,$(file)) >> $@ \
)
# vim: set noet sw=4 ts=4:

View File

@ -31,11 +31,6 @@ $(eval $(call gb_CppunitTest_add_exception_objects,cppuhelper_checkapi,\
cppuhelper/qa/checkapi/strings \
))
$(eval $(call gb_CppunitTest_set_include,cppuhelper_checkapi,\
$$(INCLUDE) \
-I$(SRCDIR)/cppuhelper/inc \
))
$(eval $(call gb_CppunitTest_use_internal_comprehensive_api,cppuhelper_checkapi, \
cppu \
udkapi \

View File

@ -32,21 +32,13 @@ cppuhelper_allheaders_DIR := $(call gb_CustomTarget_get_workdir,cppuhelper/allhe
$(call gb_CustomTarget_get_target,cppuhelper/allheaders) : \
$(cppuhelper_allheaders_DIR)/cppuhelper_allheaders.hxx
# dependency on Package_cppuheaders_odk_headers.mk should ensure this is
# updated whenever a new public header is added
$(cppuhelper_allheaders_DIR)/cppuhelper_allheaders.hxx : \
$(SRCDIR)/cppuhelper/CustomTarget_cppuhelper_allheaders.mk \
$(SRCDIR)/cppuhelper/Package_cppuhelper_odk_headers.mk \
$(call gb_Package_get_target,cppuhelper_odk_headers) \
| $(cppuhelper_allheaders_DIR)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
printf '// Generated list of all cppuhelper/ includes\n' > $@
$(foreach file, $(wildcard $(SRCDIR)/cppuhelper/inc/*.h) $(wildcard $(SRCDIR)/cppuhelper/inc/*.hxx) \
$(wildcard $(SRCDIR)/cppuhelper/inc/*/*.h) $(wildcard $(SRCDIR)/cppuhelper/inc/*/*.hxx) \
$(wildcard $(SRCDIR)/cppuhelper/inc/*/*/*.h) $(wildcard $(SRCDIR)/cppuhelper/inc/*/*/*.hxx) \
$(wildcard $(SRCDIR)/cppuhelper/inc/*/*/*/*.h) $(wildcard $(SRCDIR)/cppuhelper/inc/*/*/*/*.hxx), \
$(if $(findstring /win32/, $(file)), printf '#ifdef WNT\n' >> $@ &&) \
printf '#include <%s>\n' $(subst $(SRCDIR)/cppuhelper/inc/,,$(file)) >> $@ && \
$(if $(findstring /win32/, $(file)), printf '#endif // WNT\n' >> $@ &&) \
) :
printf '// Generated list of cppuhelper includes\n' > $@ \
$(foreach file,$(shell cat $<),\
&& printf '#include <%s>\n' $(subst $(INSTDIR)/$(gb_Package_SDKDIRNAME)/include/,,$(file)) >> $@ \
)
# vim: set noet sw=4 ts=4:

View File

@ -31,11 +31,6 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sal_checkapi,\
sal/qa/checkapi/strings \
))
$(eval $(call gb_CppunitTest_set_include,sal_checkapi,\
$$(INCLUDE) \
-I$(SRCDIR)/sal/inc \
))
$(eval $(call gb_CppunitTest_use_external,sal_checkapi,boost_headers))
# strings.cxx includes generated strings.hxx

View File

@ -32,23 +32,18 @@ sal_allheaders_DIR := $(call gb_CustomTarget_get_workdir,sal/allheaders)
$(call gb_CustomTarget_get_target,sal/allheaders) : \
$(sal_allheaders_DIR)/sal_allheaders.hxx
# dependency on Package_inc.mk should ensure this is updated whenever a new public header is added
$(sal_allheaders_DIR)/sal_allheaders.hxx : $(SRCDIR)/sal/CustomTarget_sal_allheaders.mk \
$(SRCDIR)/sal/Package_sal_odk_headers.mk \
$(SRCDIR)/sal/Package_inc.mk \
$(sal_allheaders_DIR)/sal_allheaders.hxx : \
$(call gb_Package_get_target,sal_odk_headers) \
| $(sal_allheaders_DIR)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
printf '// Generated list of all sal/ includes\n' > $@
printf '#ifdef WNT\n' >> $@
printf '#include <windows.h>\n' >> $@
printf '#endif\n' >> $@
$(foreach file, $(wildcard $(SRCDIR)/sal/inc/*.h) $(wildcard $(SRCDIR)/sal/inc/*.hxx) \
$(wildcard $(SRCDIR)/sal/inc/*/*.h) $(wildcard $(SRCDIR)/sal/inc/*/*.hxx) \
$(wildcard $(SRCDIR)/sal/inc/*/*/*.h) $(wildcard $(SRCDIR)/sal/inc/*/*/*.hxx) \
$(wildcard $(SRCDIR)/sal/inc/*/*/*/*.h) $(wildcard $(SRCDIR)/sal/inc/*/*/*/*.hxx), \
$(if $(findstring /win32/, $(file)), printf '#ifdef WNT\n' >> $@ &&) \
printf '#include <%s>\n' $(subst $(SRCDIR)/sal/inc/,,$(file)) >> $@ && \
$(if $(findstring /win32/, $(file)), printf '#endif // WNT\n' >> $@ &&) \
) :
printf '// Generated list of sal includes\n' > $@ && \
printf '#ifdef WNT\n' >> $@ && \
printf '#include <windows.h>\n' >> $@ && \
printf '#endif\n' >> $@ \
$(foreach file,$(shell cat $^),\
$(if $(findstring /win32/,$(file)),&& printf '#ifdef WNT\n' >> $@) \
&& printf '#include <%s>\n' $(subst $(INSTDIR)/$(gb_Package_SDKDIRNAME)/include/,,$(file)) >> $@ \
$(if $(findstring /win32/,$(file)),&& printf '#endif // WNT\n' >> $@) \
)
# vim: set noet sw=4 ts=4:

View File

@ -33,11 +33,6 @@ $(eval $(call gb_CppunitTest_add_exception_objects,salhelper_checkapi,\
salhelper/qa/checkapi/strings \
))
$(eval $(call gb_CppunitTest_set_include,salhelper_checkapi,\
$$(INCLUDE) \
-I$(SRCDIR)/salhelper/inc \
))
# strings.cxx includes generated strings.hxx
$(call gb_CxxObject_get_target,salhelper/qa/checkapi/strings) : \
INCLUDE += -I$(call gb_CustomTarget_get_workdir,salhelper/allheaders)

View File

@ -32,21 +32,13 @@ salhelper_allheaders_DIR := $(call gb_CustomTarget_get_workdir,salhelper/allhead
$(call gb_CustomTarget_get_target,salhelper/allheaders) : \
$(salhelper_allheaders_DIR)/salhelper_allheaders.hxx
# dependency on Package_salhelper_odk_headers.mk should ensure this is
# updated whenever a new public header is added
$(salhelper_allheaders_DIR)/salhelper_allheaders.hxx : \
$(SRCDIR)/salhelper/CustomTarget_salhelper_allheaders.mk \
$(SRCDIR)/salhelper/Package_salhelper_odk_headers.mk \
$(call gb_Package_get_target,salhelper_odk_headers) \
| $(salhelper_allheaders_DIR)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
printf '// Generated list of all salhelper/ includes\n' > $@
$(foreach file, $(wildcard $(SRCDIR)/salhelper/inc/*.h) $(wildcard $(SRCDIR)/salhelper/inc/*.hxx) \
$(wildcard $(SRCDIR)/salhelper/inc/*/*.h) $(wildcard $(SRCDIR)/salhelper/inc/*/*.hxx) \
$(wildcard $(SRCDIR)/salhelper/inc/*/*/*.h) $(wildcard $(SRCDIR)/salhelper/inc/*/*/*.hxx) \
$(wildcard $(SRCDIR)/salhelper/inc/*/*/*/*.h) $(wildcard $(SRCDIR)/salhelper/inc/*/*/*/*.hxx), \
$(if $(findstring /win32/, $(file)), printf '#ifdef _WIN32\n' >> $@ &&) \
printf '#include <%s>\n' $(subst $(SRCDIR)/salhelper/inc/,,$(file)) >> $@ && \
$(if $(findstring /win32/, $(file)), printf '#endif // _WIN32\n' >> $@ &&) \
) :
printf '// Generated list of salhelper includes\n' > $@ \
$(foreach file,$(shell cat $<),\
&& printf '#include <%s>\n' $(subst $(INSTDIR)/$(gb_Package_SDKDIRNAME)/include/,,$(file)) >> $@ \
)
# vim: set noet sw=4 ts=4: