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