blob: c2eab6c06ee41d08bbcd0022b41938d4ed53b8bc (
plain)
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
|
diff -ruN am-utils-6.0.10/amd/Makefile.am am-utils-6.0.10-fixed/amd/Makefile.am
--- am-utils-6.0.10/amd/Makefile.am 2005-03-15 03:07:48.000000000 +0100
+++ am-utils-6.0.10-fixed/amd/Makefile.am 2005-05-28 23:48:24.850194336 +0200
@@ -16,7 +16,12 @@
# which will not generate the .h needs for the lex file from the yacc file.
# I took out the conf .y/.l files b/c of bad interaction between bsd44 make
# and automake-1.2 rules.
+
+# sources needed: note .y and .l files have to be first
amd_SOURCES = \
+ conf_parse.y \
+ conf_tok.l \
+ \
am_ops.c \
amd.c \
amfs_auto.c \
@@ -82,27 +87,29 @@
# filesystem types this system supports.
# AMD_INFO_OBJS: a list of info_*.o objects added, depending on which map
# types this system supports.
-EXTRA_amd_OBJECTS = @AMD_FS_OBJS@ @AMD_INFO_OBJS@ conf_tok.o conf_parse.o
+EXTRA_amd_OBJECTS = @AMD_FS_OBJS@ @AMD_INFO_OBJS@
LDADD = $(EXTRA_amd_OBJECTS) ../libamu/libamu.la
# must manually add f/lex library to LIBS, and not to LDADD.
LIBS = @LIBS@ @LEXLIB@
# additional files to distribute and clean
-EXTRA_DIST = conf_tok.l conf_parse.y ops_TEMPLATE.c $(man_MANS)
+EXTRA_DIST = ops_TEMPLATE.c $(man_MANS)
CLEANFILES = conf_tok.c conf_parse.c conf_parse.h
DISTCLEANFILES = build_version.h
+# do not distribute files that should be generated by lex/yacc locally
+dist-hook:
+ (cd $(distdir) && rm -f conf_parse.c conf_parse.h conf_tok.c)
+
INCLUDES = -I$(top_srcdir)/include
# allow users to add their own flags via "configure --enable-am-flags=ARG"
AMU_CFLAGS = @AMU_CFLAGS@
AM_CFLAGS = @CFLAGS@ $(AMU_CFLAGS)
-YACC = @YACC@
-YFLAGS = -d
+AM_YFLAGS = -d
# dependencies
$(PROGRAMS): $(LDADD)
-conf_tok.o: conf_parse.h
get_args.o: build_version.h
$(amd_OBJECTS) $(EXTRA_amd_OBJECTS): \
../config.h \
@@ -115,18 +122,6 @@
@AMU_NFS_PROT_HEADER@ \
$(noinst_HEADERS)
-# Must use my rules, b/c ones supplied by automake-1.2 don't work
-# with bsd44 make (they have built-in rules to build yacc/lex files).
-# Code generated by yacc/lex:
-conf_tok.c: $(srcdir)/conf_tok.l
- $(LEX) $?
- mv lex.yy.c conf_tok.c
-
-conf_parse.c conf_parse.h: $(srcdir)/conf_parse.y
- $(YACC) -d $?
- mv y.tab.c conf_parse.c
- mv y.tab.h conf_parse.h
-
# auto-generate build number
build_version.h: $(amd_SOURCES) $(EXTRA_amd_SOURCES) \
../config.h \
|