LinkTarget.mk (e53b81a8) LinkTarget.mk (9f64cdc5)
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 335 unchanged lines hidden (view full) ---

344# linktargets, just as gbuild can not know about linktargets generated in the
345# old build.pl/dmake system. Once all is migrated, gbuild should error out
346# when is is told to depend on a linktarget it does not know about and not
347# only warn.
348define gb_LinkTarget__get_external_headers_check
349ifneq ($$(SELF),$$*)
350$$(eval $$(call gb_Output_info,LinkTarget $$* not defined: Assuming headers to be there!,ALL))
351endif
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 335 unchanged lines hidden (view full) ---

344# linktargets, just as gbuild can not know about linktargets generated in the
345# old build.pl/dmake system. Once all is migrated, gbuild should error out
346# when is is told to depend on a linktarget it does not know about and not
347# only warn.
348define gb_LinkTarget__get_external_headers_check
349ifneq ($$(SELF),$$*)
350$$(eval $$(call gb_Output_info,LinkTarget $$* not defined: Assuming headers to be there!,ALL))
351endif
352$$(if $$(findstring /,$$*), , $$(error gb_LinkTarget__get_external_headers_check trying to create $$@ as a plain file))
352$$@ : COMMAND := $$(call gb_Helper_abbreviate_dirs, mkdir -p $$(dir $$@) && touch $$@ && mkdir -p $(call gb_LinkTarget_get_target,)pdb/$$(dir $$*))
353
354endef
355
356$(call gb_LinkTarget_get_external_headers_target,%) :
357 $(eval $(gb_LinkTarget__get_external_headers_check))
358 $(COMMAND)
359

--- 644 unchanged lines hidden (view full) ---

1004endef
1005
1006define gb_LinkTarget_set_auxtargets
1007$(call gb_LinkTarget_get_clean_target,$(1)) : AUXTARGETS := $(2)
1008endef
1009
1010define gb_LinkTarget__add_internal_headers
1011$(call gb_LinkTarget_get_headers_target,$(1)) : $(2)
353$$@ : COMMAND := $$(call gb_Helper_abbreviate_dirs, mkdir -p $$(dir $$@) && touch $$@ && mkdir -p $(call gb_LinkTarget_get_target,)pdb/$$(dir $$*))
354
355endef
356
357$(call gb_LinkTarget_get_external_headers_target,%) :
358 $(eval $(gb_LinkTarget__get_external_headers_check))
359 $(COMMAND)
360

--- 644 unchanged lines hidden (view full) ---

1005endef
1006
1007define gb_LinkTarget_set_auxtargets
1008$(call gb_LinkTarget_get_clean_target,$(1)) : AUXTARGETS := $(2)
1009endef
1010
1011define gb_LinkTarget__add_internal_headers
1012$(call gb_LinkTarget_get_headers_target,$(1)) : $(2)
1013$(if $(word 2, $(strip $(subst /, $() $(),$(1)))), , $(error gb_LinkTarget__add_internal_headers passing top level directory $(1) to gb_LinkTarget_get_external_headers_target ))
1012$(2) :| $(call gb_LinkTarget_get_external_headers_target,$(1))
1013
1014endef
1015
1016define gb_LinkTarget_add_package_headers
1017$(foreach package,$(2),$(call gb_LinkTarget__add_internal_headers,$(1),$(call gb_Package_get_target,$(package))))
1018$(call gb_LinkTarget_get_clean_target,$(1)) : $(foreach package,$(2),$(call gb_Package_get_clean_target,$(package)))
1019

--- 52 unchanged lines hidden ---
1014$(2) :| $(call gb_LinkTarget_get_external_headers_target,$(1))
1015
1016endef
1017
1018define gb_LinkTarget_add_package_headers
1019$(foreach package,$(2),$(call gb_LinkTarget__add_internal_headers,$(1),$(call gb_Package_get_target,$(package))))
1020$(call gb_LinkTarget_get_clean_target,$(1)) : $(foreach package,$(2),$(call gb_Package_get_clean_target,$(package)))
1021

--- 52 unchanged lines hidden ---