gauche-cdb-0.3.1-gauche-package.diff 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. --- Gauche-cdb-0.3.1.orig/Makefile.in
  2. +++ Gauche-cdb-0.3.1/Makefile.in
  3. @@ -10,76 +10,57 @@
  4. VPATH = $(srcdir)
  5. # These may be overridden by make invocators
  6. -DESTDIR =
  7. -OPTFLAGS = @OPTFLAGS@
  8. -CC = @CC@
  9. -LIBS = @LIBS@
  10. -CFLAGS = @CFLAGS@
  11. -CPPFLAGS = @CPPFLAGS@ # AC_LIB_LINKFLAGS adds to this..
  12. -LDFLAGS = @LDFLAGS@
  13. -INSTALL = @INSTALL@
  14. -INSTALL_TYPE = @INSTALL_TYPE@
  15. -
  16. -# Set by configure
  17. -GOSH = @GOSH@
  18. -GAUCHE_CONFIG = @GAUCHE_CONFIG@
  19. +DESTDIR =
  20. +CPPFLAGS = @CPPFLAGS@ # AC_LIB_LINKFLAGS adds to this..
  21. +GOSH = "@GOSH@"
  22. +GAUCHE_CONFIG = "@GAUCHE_CONFIG@"
  23. +GAUCHE_PACKAGE = "@GAUCHE_PACKAGE@"
  24. +INSTALL = "@GAUCHE_INSTALL@"
  25. +
  26. +# Other parameters
  27. +SOEXT = @SOEXT@
  28. OBJEXT = @OBJEXT@
  29. -DSOEXT = @SOEXT@
  30. +EXEEXT = @EXEEXT@
  31. -MODULE = cdb
  32. +# Module-specific stuff
  33. +PACKAGE = cdb
  34. -ARCHFILES = $(MODULE).$(DSOEXT)
  35. -SCMFILES = $(MODULE).scm
  36. +ARCHFILES = $(PACKAGE).$(SOEXT)
  37. +SCMFILES = $(PACKAGE).scm
  38. HEADERS =
  39. TARGET = $(ARCHFILES)
  40. -OBJS = $(MODULE)_head.$(OBJEXT) \
  41. - cdb.$(OBJEXT) \
  42. - $(MODULE)_tail.$(OBJEXT)
  43. -GENERATED = cdb.c $(MODULE)_head.c $(MODULE)_tail.c
  44. +GENERATED =
  45. CONFIG_GENERATED = Makefile config.cache config.log config.status \
  46. - configure.lineno autom4te*.cache
  47. -
  48. -HEADER_INSTALL_DIR = $(DESTDIR)/`$(GAUCHE_CONFIG) --$(INSTALL_TYPE)incdir`
  49. -SCM_INSTALL_DIR = $(DESTDIR)/`$(GAUCHE_CONFIG) --$(INSTALL_TYPE)libdir`/dbm
  50. -ARCH_INSTALL_DIR = $(DESTDIR)/`$(GAUCHE_CONFIG) --$(INSTALL_TYPE)archdir`
  51. -
  52. -all : $(TARGET)
  53. -
  54. -.SUFFIXES: .o .stub
  55. + configure.lineno autom4te*.cache @PACKAGE_NAME@.gpd
  56. -.c.o:
  57. - $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
  58. +HEADER_INSTALL_DIR = "$(DESTDIR)`$(GAUCHE_CONFIG) --siteincdir`"
  59. +SCM_INSTALL_DIR = "$(DESTDIR)`$(GAUCHE_CONFIG) --sitelibdir`"
  60. +ARCH_INSTALL_DIR = "$(DESTDIR)`$(GAUCHE_CONFIG) --sitearchdir`"
  61. -.stub.c:
  62. - $(GOSH) genstub $<
  63. +cdb_SRCS = cdb.stub
  64. +cdb_LIBS = @LIBCDB@
  65. -$(MODULE).$(DSOEXT): $(OBJS)
  66. - $(CC) -Wl,-rpath -Wl,`gauche-config --sysarchdir` $(LDFLAGS) $(MODULE).$(DSOEXT) $(OBJS) $(LIBS) @LIBCDB@
  67. +all : $(TARGET)
  68. -$(MODULE)_head.c $(MODULE)_tail.c :
  69. - $(GAUCHE_CONFIG) --fixup-extension $(MODULE)
  70. +$(PACKAGE).$(SOEXT): $(cdb_SRCS)
  71. + $(GAUCHE_PACKAGE) compile --verbose \
  72. + --libs="$(cdb_LIBS)" --cppflags="$(CPPFLAGS)" \
  73. + $(PACKAGE) $(cdb_SRCS)
  74. check : all
  75. @rm -f test.log
  76. $(GOSH) -I. test.scm > test.log
  77. install : all
  78. - if test ! -z "$(HEADERS)"; then \
  79. - $(INSTALL) -d $(HEADER_INSTALL_DIR); \
  80. - $(INSTALL) -m 444 $(HEADERS) $(HEADER_INSTALL_DIR); \
  81. - fi
  82. - if test ! -z "$(SCMFILES)"; then \
  83. - $(INSTALL) -d $(SCM_INSTALL_DIR); \
  84. - $(INSTALL) -m 444 $(SCMFILES) $(SCM_INSTALL_DIR); \
  85. - fi
  86. - if test ! -z "$(ARCHFILES)"; then \
  87. - $(INSTALL) -d $(ARCH_INSTALL_DIR); \
  88. - $(INSTALL) -m 555 $(ARCHFILES) $(ARCH_INSTALL_DIR); \
  89. - fi
  90. + $(INSTALL) -m 444 -T $(HEADER_INSTALL_DIR) $(HEADERS)
  91. + $(INSTALL) -m 444 -T $(SCM_INSTALL_DIR)/dbm $(SCMFILES)
  92. + $(INSTALL) -m 555 -T $(ARCH_INSTALL_DIR) $(ARCHFILES)
  93. + $(INSTALL) -m 444 -T $(SCM_INSTALL_DIR)/.packages @PACKAGE_NAME@.gpd
  94. clean :
  95. - rm -rf core $(TARGET) $(OBJS) $(GENERATED) *~ test.log so_locations
  96. + $(GAUCHE_PACKAGE) compile --clean $(PACKAGE) $(cdb_SRCS)
  97. + rm -rf core $(TARGET) $(GENERATED) *~ test.log so_locations
  98. distclean : clean
  99. rm -rf $(CONFIG_GENERATED)
  100. --- Gauche-cdb-0.3.1.orig/configure.ac
  101. +++ Gauche-cdb-0.3.1/configure.ac
  102. @@ -4,18 +4,11 @@
  103. AC_INIT(Gauche-cdb, 0.3.1)
  104. AC_CONFIG_SRCDIR(cdb.stub)
  105. -AC_CANONICAL_SYSTEM
  106. -
  107. AC_GAUCHE_INIT_EXT
  108. -AC_GAUCHE_INSTALL_TYPE(site)
  109. AC_GAUCHE_CC
  110. -AC_GAUCHE_FLAGS
  111. -
  112. -AC_PROG_INSTALL
  113. AC_LIB_LINKFLAGS(cdb)
  114. -AC_GAUCHE_FIX_LIBS
  115. -
  116. +AC_GAUCHE_MAKE_GPD
  117. echo $PACKAGE_VERSION > VERSION
  118. AC_OUTPUT(Makefile)