summaryrefslogtreecommitdiff
path: root/lib/ss
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>1998-04-01 02:18:45 +0000
committerTheodore Ts'o <tytso@mit.edu>1998-04-01 02:18:45 +0000
commite5fa0e3031822d3da46ac78230c0595c6c462f87 (patch)
tree3e42d83eb837e210c07da02dbbf42b7984137f49 /lib/ss
parent3b27db9fb6da9302e567cb2b03ac12091eca7130 (diff)
downloade2fsprogs-e5fa0e3031822d3da46ac78230c0595c6c462f87.tar.gz
ChangeLog, Makefile.in:
Remove libext2fs.info*, not just libext2fs.info*.gz. Add an uninstall-doc-libs target. ChangeLog, Makefile.in, compile_et.1, compile_et.sh.in: Makefile.in: Fix bug where my_dir was set incorrectly. Install the et_c.awk and et_h.awk files in $(datadir)/et (i.e., /usr/share/et) directory. Change to use new installation directory variables convention. Fix uninstall rules to take $(DESTDIR) into account. compile_et.1: Change man page to reflect the fact that compile_et is now a awk/sed script, not a yacc script. compile_et.sh.in: Look in $(datadir)/et for et_c.awk and et_h.awk; if not found, look in the build directory. Add error checking for non-existent input file. ChangeLog, Makefile.in, mk_cmds.sh.in: Makefile.in: Install the ct_c.awk and ct_c.sed files in $(datadir)/ss (i.e., /usr/share/ss) directory. Change to use new installation directory variables convention. Fix uninstall rules to take $(DESTDIR) into account. mk_cmds.sh.in: Look in $(datadir)/ss for ct_c.awk and ct_c.sed; if not found, look in the build directory. Add error checking for non-existent input file. ChangeLog, Makefile.in: Makefile.in: Change to use new installation directory variables convention. Fix uninstall rules to take $(DESTDIR) into account.
Diffstat (limited to 'lib/ss')
-rw-r--r--lib/ss/ChangeLog12
-rw-r--r--lib/ss/Makefile.in34
-rw-r--r--lib/ss/mk_cmds.sh.in22
3 files changed, 53 insertions, 15 deletions
diff --git a/lib/ss/ChangeLog b/lib/ss/ChangeLog
index 14482461..0983cbd5 100644
--- a/lib/ss/ChangeLog
+++ b/lib/ss/ChangeLog
@@ -1,3 +1,15 @@
+1998-03-30 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Makefile.in: Install the ct_c.awk and ct_c.sed files in
+ $(datadir)/ss (i.e., /usr/share/ss) directory. Change
+ to use new installation directory variables
+ convention. Fix uninstall rules to take $(DESTDIR)
+ into account.
+
+ * mk_cmds.sh.in: Look in $(datadir)/ss for ct_c.awk and
+ ct_c.sed; if not found, look in the build directory. Add
+ error checking for non-existent input file.
+
Thu Aug 14 08:17:22 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
* Makefile.in (install): Fix rm command to use $(DESTDIR)
diff --git a/lib/ss/Makefile.in b/lib/ss/Makefile.in
index 1042b2eb..96f2ff76 100644
--- a/lib/ss/Makefile.in
+++ b/lib/ss/Makefile.in
@@ -22,19 +22,19 @@ DLL_IMAGE = libss
DLL_STUB = libss
DLL_LIBS = -L../.. -lcom_err
DLL_MYDIR = ss
-DLL_INSTALL_DIR = $(libdir)
+DLL_INSTALL_DIR = $(root_libdir)
ELF_VERSION = 2.0
ELF_SO_VERSION = 2
ELF_IMAGE = libss
ELF_MYDIR = ss
-ELF_INSTALL_DIR = $(libdir)
+ELF_INSTALL_DIR = $(root_libdir)
ELF_OTHER_LIBS = -lc -L../.. -lcom_err
BSDLIB_VERSION = 1.0
BSDLIB_IMAGE = libss
BSDLIB_MYDIR = ss
-BSDLIB_INSTALL_DIR = $(libdir)
+BSDLIB_INSTALL_DIR = $(root_libdir)
TAGS=etags
COMPILE_ET=../et/compile_et
@@ -92,6 +92,7 @@ MKCMDSCSRCS= mk_cmds.c utils.c options.c ct.tab.c cmd_tbl.lex.c
HFILES= ss.h ss_internal.h copyright.h
+SHARE_FILES= ct_c.awk ct_c.sed
INSTALL_HFILES= ss.h copyright.h
@@ -108,7 +109,7 @@ FILES= $(SRCS) $(MKCMDSFILES) $(HFILES) \
all:: libss.a # libss_p.a lint
std_rqs.c: std_rqs.ct $(MK_CMDS)
- $(MK_CMDS) $(srcdir)/std_rqs.ct
+ DIR=$(srcdir) $(MK_CMDS) $(srcdir)/std_rqs.ct
ss_err.c ss_err.h: ss_err.et
$(COMPILE_ET) $(srcdir)/ss_err.et
@@ -128,23 +129,28 @@ mk_cmds: $(DEP_SUBSTITUTE) $(srcdir)/mk_cmds.sh.in
$(CHMOD) +x mk_cmds
installdirs::
- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(ulibdir) \
- $(DESTDIR)$(includedir)/ss
-
-install:: libss.a $(INSTALL_HFILES) copyright.h installdirs ss_err.h
- $(INSTALL_DATA) libss.a $(DESTDIR)$(ulibdir)/libss.a
- $(CHMOD) 644 $(DESTDIR)$(ulibdir)/libss.a
- -$(RANLIB) $(DESTDIR)$(ulibdir)/libss.a
- $(CHMOD) $(LIBMODE) $(DESTDIR)$(ulibdir)/libss.a
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss \
+ $(DESTDIR)$(bindir)
+
+install:: libss.a $(INSTALL_HFILES) copyright.h installdirs ss_err.h mk_cmds
+ $(INSTALL_DATA) libss.a $(DESTDIR)$(libdir)/libss.a
+ $(CHMOD) 644 $(DESTDIR)$(libdir)/libss.a
+ -$(RANLIB) $(DESTDIR)$(libdir)/libss.a
+ $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libss.a
$(RM) -f $(DESTDIR)$(includedir)/ss/*
for i in $(INSTALL_HFILES) copyright.h; do \
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/ss/$$i; \
done
$(INSTALL_DATA) ss_err.h $(DESTDIR)$(includedir)/ss/ss_err.h
+ for i in $(SHARE_FILES); do \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/ss/$$i; \
+ done
+ $(INSTALL) mk_cmds $(DESTDIR)$(bindir)/mk_cmds
uninstall::
- $(RM) -f $(ulibdir)/libss.a
- $(RM) -rf $(includedir)/ss
+ $(RM) -f $(DESTDIR)$(libdir)/libss.a $(DESTDIR)$(bindir)/mk_cmds
+ $(RM) -rf $(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss
clean::
$(RM) -f ../libss.a libss.a mk_cmds ss_err.h ss_err.c std_rqs.c \
diff --git a/lib/ss/mk_cmds.sh.in b/lib/ss/mk_cmds.sh.in
index 48660815..1623309c 100644
--- a/lib/ss/mk_cmds.sh.in
+++ b/lib/ss/mk_cmds.sh.in
@@ -2,15 +2,35 @@
#
#
-DIR=@SS_DIR@
+DIR="${DIR-@datadir@/ss}"
+SS_DIR=@SS_DIR@
AWK=@AWK@
SED=@SED@
+if test "x$1" = x ; then
+ echo "Usage: mk_cmds file"
+ exit 1
+fi
+
+if test ! -f $DIR/ct_c.sed -o ! -f $DIR/ct_c.awk ; then
+ DIR=$SS_DIR
+# echo "Falling back to $DIR..."
+ if test ! -f $DIR/ct_c.sed -o ! -f $DIR/ct_c.awk ; then
+ echo "compile_et: Couldn't find compile_et's template files."
+ exit 1
+ fi
+fi
+
FILE=$1
ROOT=`echo $1 | sed -e s/.ct$//`
BASE=`basename $ROOT`
TMP=ct$$.c
+if ! test -f $FILE ; then
+ echo "$FILE: File not found"
+ exit 1;
+fi
+
${SED} -f ${DIR}/ct_c.sed ${FILE} \
| ${AWK} -f ${DIR}/ct_c.awk rootname=${ROOT} outfile=${TMP} -