## Process this file with automake to produce Makefile.in # Package: am-utils # Level: Makefile for fsinfo/ directory # Author: Erez Zadok sbin_PROGRAMS = fsinfo # man pages man_MANS = fsinfo.8 # headers this depends on, not to be installed noinst_HEADERS = fsi_data.h fsinfo.h # *.y must be listed before *.l, because of a bug in automake-1.2 # 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. fsinfo_SOURCES = \ fsi_analyze.c \ fsi_dict.c \ fsi_util.c \ fsinfo.c \ wr_atab.c \ wr_bparam.c \ wr_dumpset.c \ wr_exportfs.c \ wr_fstab.c # Cannot specify fsi_gram.y and fsi_lex.l in automake 1.0 because the # generated .c files get added to DIST_FILES, instead of the yacc/lex # sources. So I'm manually adding the .o files from them to the list # of objects, and telling automake to add the yacc/lex sources to the # distribution list. # And automake 1.2 has a different problem (interaction with bsd44 make). EXTRA_fsinfo_OBJECTS = fsi_gram.o fsi_lex.o EXTRA_DIST = fsi_gram.y fsi_lex.l $(man_MANS) # these files get automatically generated by yacc/lex CLEANFILES = fsi_gram.c fsi_gram.h fsi_lex.c LDADD = $(EXTRA_fsinfo_OBJECTS) ../libamu/libamu.la # must manually add f/lex library to LIBS, and not to LDADD. LIBS = @LIBS@ @LEXLIB@ INCLUDES = -I$(top_srcdir)/include # allow users to add their own flags via "configure --enable-am-flags=ARG" AMU_CFLAGS = @AMU_CFLAGS@ CFLAGS = @CFLAGS@ $(AMU_CFLAGS) YACC = @YACC@ YFLAGS = -d # dependencies $(PROGRAMS): $(LDADD) fsinfo.o: fsi_gram.h $(OBJECTS): \ ../config.h \ ../aux_conf.h \ $(top_srcdir)/include/am_compat.h \ $(top_srcdir)/include/am_defs.h \ $(top_srcdir)/include/am_utils.h \ $(top_srcdir)/include/am_xdr_func.h \ $(top_srcdir)/include/amq_defs.h \ @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: fsi_lex.c: $(srcdir)/fsi_lex.l $(LEX) $? mv lex.yy.c fsi_lex.c fsi_gram.c fsi_gram.h: $(srcdir)/fsi_gram.y @echo Expect two shift/reduce errors... $(YACC) -d $? mv y.tab.c fsi_gram.c mv y.tab.h fsi_gram.h