We need to name the object files produced from the
authorJim Blandy <jimb@red-bean.com>
Mon, 9 Dec 1996 23:25:22 +0000 (23:25 +0000)
committerJim Blandy <jimb@red-bean.com>
Mon, 9 Dec 1996 23:25:22 +0000 (23:25 +0000)
machine-dependent C and assembler files qtmds.o and qtmdc.o, but
using -c and -o together on the cc command line isn't portable.
* configure.in: Generate the names of the .o files here, and
substitute them into Makefile.
* Makefile.am (qtmds.o, qtmdc.o): Let CC name them what it wants,
and then rename them when it's done.
(configure, Makefile.in): Regenerated.

qt/Makefile.am
qt/Makefile.in
qt/configure
qt/configure.in

index a2d9b13..7b42694 100644 (file)
@@ -12,12 +12,12 @@ libqt_a_SOURCES = qt.c copyright.h
 libqt_a_LIBADD = qtmds.o qtmdc.o
 
 qtmds.o: @qtmds_s@ 
-## FIXME use of -c with -o not portable.
-       $(COMPILE) -o qtmds.o -c @qtmds_s@
+       $(COMPILE) -c @qtmds_s@
+       mv @qtmds_o@ qtmds.o
 
 qtmdc.o: @qtmdc_c@ @qtmd_h@
-## FIXME use of -c with -o not portable.
-       $(COMPILE) -o qtmdc.o -c @qtmdc_c@
+       $(COMPILE) -c @qtmdc_c@
+       mv @qtmdc_o@ qtmdc.o
 
 EXTRA_DIST = CHANGES README.MISC README.PORT b.h meas.c stp.c stp.h \
 PLUGIN/OPT Makefile.base config
index 4218536..5353000 100644 (file)
@@ -42,9 +42,11 @@ host_triplet = @host@
 RANLIB = @RANLIB@
 qtmd_h = @qtmd_h@
 CC = @CC@
+qtmds_o = @qtmds_o@
+qtmdc_o = @qtmdc_o@
 target_libs = @target_libs@
-qtmdc_c = @qtmdc_c@
 qtmds_s = @qtmds_s@
+qtmdc_c = @qtmdc_c@
 qtmdb_s = @qtmdb_s@
 
 AUTOMAKE_OPTIONS = foreign
@@ -370,10 +372,12 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 
 
 qtmds.o: @qtmds_s@ 
-       $(COMPILE) -o qtmds.o @qtmds_s@
+       $(COMPILE) -c @qtmds_s@
+       mv @qtmds_o@ qtmds.o
 
 qtmdc.o: @qtmdc_c@ @qtmd_h@
-       $(COMPILE) -o qtmdc.o @qtmdc_c@
+       $(COMPILE) -c @qtmdc_c@
+       mv @qtmdc_o@ qtmdc.o
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index d74651f..6a89eb8 100755 (executable)
@@ -1181,6 +1181,13 @@ else
    target_libs=
 fi
 
+# Give the Makefile the names of the object files that will be
+# generated by compiling $qtmdc_c and $qtmds_s.
+qtmdc_o="`echo ${qtmdc_c} | sed -e 's:^.*/::' | sed -e 's:\.c$:\.o:'`"
+qtmds_o="`echo ${qtmds_s} | sed -e 's:^.*/::' | sed -e 's:\.s$:\.o:'`"
+
+
+
 
 
 
@@ -1348,7 +1355,9 @@ s%@host_os@%$host_os%g
 s%@target_libs@%$target_libs%g
 s%@qtmd_h@%$qtmd_h%g
 s%@qtmdc_c@%$qtmdc_c%g
+s%@qtmdc_o@%$qtmdc_o%g
 s%@qtmds_s@%$qtmds_s%g
+s%@qtmds_o@%$qtmds_o%g
 s%@qtmdb_s@%$qtmdb_s%g
 
 CEOF
index 7038e19..1a235db 100644 (file)
@@ -59,10 +59,17 @@ else
    target_libs=
 fi
 
+# Give the Makefile the names of the object files that will be
+# generated by compiling $qtmdc_c and $qtmds_s.
+qtmdc_o="`echo ${qtmdc_c} | sed -e 's:^.*/::' | sed -e 's:\.c$:\.o:'`"
+qtmds_o="`echo ${qtmds_s} | sed -e 's:^.*/::' | sed -e 's:\.s$:\.o:'`"
+
 AC_SUBST(target_libs)
 AC_SUBST(qtmd_h)
 AC_SUBST(qtmdc_c)
+AC_SUBST(qtmdc_o)
 AC_SUBST(qtmds_s)
+AC_SUBST(qtmds_o)
 AC_SUBST(qtmdb_s)
 
 AC_OUTPUT(Makefile qt.h md/Makefile time/Makefile)