make.shared.targets 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # This library is free software; you can redistribute it and/or
  2. # modify it under the terms of the GNU Lesser General Public
  3. # License as published by the Free Software Foundation; either
  4. # version 2.1 of the License, or (at your option) any later version.
  5. # You may obtain a copy of the Licence at
  6. # http://www.gnu.org/licences/lgpl.html
  7. #
  8. # As a special exception this file can also be included in modules
  9. # with other source code as long as that source code has been
  10. # released under an Open Source Initiative certified licence.
  11. # More information about OSI certification can be found at:
  12. # http://www.opensource.org
  13. #
  14. # This module is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. # GNU Lesser General Public Licence for more details.
  18. #
  19. # This module was created by members of the firebird development
  20. # team. All individual contributions remain the Copyright (C) of
  21. # those individuals and all rights are reserved. Contributors to
  22. # this file are either listed below or can be obtained from a CVS
  23. # history command.
  24. #
  25. # Created by: Mark O'Donohue <[email protected]>
  26. #
  27. # Contributor(s):
  28. #
  29. #
  30. #
  31. #-----------------------------------------------------------
  32. # Amongst a number of makefiles some of the targets have
  33. # specific rules. Rather than duplicate the rules in a
  34. # number of makefiles, these have been included here.
  35. #
  36. # Hopefully this file is an intermediate step, on the way to
  37. # potentially a single makefile, or at least one per directory.
  38. # MOD 07-Oct-2002
  39. # This rule creates parse.cpp from parse.y
  40. # With make 4.3 this can be simplified with a simple group target (&:) dependency.
  41. $(OBJ)/dsql/parse.cpp $(SRC_ROOT)/include/gen/parse.h: $(OBJ)/.parse-gen-sentinel ;
  42. $(OBJ)/.parse-gen-sentinel: $(SRC_ROOT)/dsql/parse.y $(SRC_ROOT)/dsql/btyacc_fb.ske
  43. sed -n '/%type .*/p' < $< > $(GEN_ROOT)/types.y
  44. sed 's/%type .*//' < $< > $(GEN_ROOT)/y.y
  45. ($(BTYACC) -l -d -S $(SRC_ROOT)/dsql/btyacc_fb.ske $(GEN_ROOT)/y.y; echo $$? > $(GEN_ROOT)/y.status) 2>&1 | tee $(GEN_ROOT)/y.txt
  46. (exit `cat $(GEN_ROOT)/y.status`)
  47. sed -n -e "s/.*btyacc: \(.*conflicts.*\)/\1/p" $(GEN_ROOT)/y.txt > $(SRC_ROOT)/dsql/parse-conflicts.txt
  48. sed -i -e 's/#define \([A-Z].*\)/#define TOK_\1/' $(GEN_ROOT)/y_tab.h
  49. sed -i -e 's/#define TOK_YY\(.*\)/#define YY\1/' $(GEN_ROOT)/y_tab.h
  50. $(MV) $(GEN_ROOT)/y_tab.h $(SRC_ROOT)/include/gen/parse.h
  51. $(MV) $(GEN_ROOT)/y_tab.c $(OBJ)/dsql/parse.cpp
  52. touch $@
  53. # gpre_meta needs a special boot build since there is no database.
  54. $(SRC_ROOT)/gpre/gpre_meta.cpp: $(SRC_ROOT)/gpre/gpre_meta.epp
  55. $(GPRE_BOOT) -lang_internal $(GPRE_FLAGS) $< $@
  56. # Explicit dependence on generated header (parser)
  57. $(OBJ)/dsql/Parser.o $(OBJ)/dsql/Keywords.o $(OBJ)/dsql/dsql.o: $(SRC_ROOT)/include/gen/parse.h
  58. # Special cases for building cpp from epp
  59. $(OBJ)/dsql/metd.cpp: $(SRC_ROOT)/dsql/metd.epp
  60. $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@
  61. $(OBJ)/dsql/DdlNodes.cpp: $(SRC_ROOT)/dsql/DdlNodes.epp
  62. $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@
  63. $(OBJ)/dsql/PackageNodes.cpp: $(SRC_ROOT)/dsql/PackageNodes.epp
  64. $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@
  65. # Adding resources as prerequisite for some files
  66. $(FilesToAddVersionInfo): $(GEN_ROOT)/jrd/version.res
  67. $(FilesToAddDialog): $(GEN_ROOT)/remote/os/win32/window.res
  68. $(FilesToAddDialog2): $(GEN_ROOT)/iscguard/iscguard.res
  69. # Explicit dependence of resource script
  70. $(GEN_ROOT)/remote/os/win32/window.res: $(SRC_ROOT)/remote/os/win32/window.rc $(SRC_ROOT)/remote/os/win32/window.rh \
  71. $(SRC_ROOT)/jrd/version.rc $(SRC_ROOT)/jrd/build_no.h $(SRC_ROOT)/remote/os/win32/property.rc \
  72. $(SRC_ROOT)/remote/os/win32/property.rh
  73. $(GEN_ROOT)/iscguard/iscguard.res: $(SRC_ROOT)/iscguard/iscguard.rc $(SRC_ROOT)/iscguard/iscguard.rh \
  74. $(SRC_ROOT)/jrd/version.rc
  75. .PHONY: FORCE
  76. # This target is used in the generated dependency xxx.d files which are
  77. # automatically created from the .cpp files. To simplify the build
  78. # process, if the .d files does not yet exist, a line is written
  79. # of the form fred.o : FORCE to ensure that fred.cpp will be
  80. # recompiled MOD 7-Oct-2002
  81. FORCE: