changes to get a proper tar file
authorBoris Boesler <boesler@ipd.info.uni-karlsruhe.de>
Wed, 28 Mar 2001 16:33:37 +0000 (16:33 +0000)
committerBoris Boesler <boesler@ipd.info.uni-karlsruhe.de>
Wed, 28 Mar 2001 16:33:37 +0000 (16:33 +0000)
[r143]

MakeRules.in
MakeTargets
Makefile.in
configure
configure.in

index 9772e55..acda489 100644 (file)
@@ -7,6 +7,8 @@
 
 VPATH = $(srcdir)
 
+LIBFIRM_VERSION = 0.3.0
+
 CC = @CC@
 CFLAGS := @CFLAGS@
 CPPFLAGS := -I. -I$(topdir) -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@
@@ -21,6 +23,8 @@ LD := @LD@
 LDFLAGS := @LDFLAGS@
 LD_R := @libfirm_cv_prog_ld_r@
 
+LN_S := @LN_S@
+
 # profiling enabled?
 ifeq (@enable_profile_libfirm@,yes)
 LDFLAGS += -g -pg
@@ -30,7 +34,9 @@ AR := @AR@
 ARFLAGS := rc
 
 TAR := @TAR@
-TARFLAGS = -C $(top_srcdir) -uf $(topdir)/libfirm.tar
+TARDIRNAME := libfirm-$(LIBFIRM_VERSION)
+TARFILENAME := $(topdir)/$(TARDIRNAME).tar
+TARFLAGS = -uhf $(TARFILENAME)
 
 RANLIB := @RANLIB@
 
@@ -41,7 +47,7 @@ GLOBALXREFFILE := $(AUTODOCDIR)/libfirm.html.xrefs
 LOCALXREFSFILE := .xrefs
 
 DISTFILES += $(addprefix $(srcdir)/, $(SOURCES))
-ARCHIVEDISTFILES += $(addprefix $(subdir)/, $(SOURCES))
+ARCHIVEDISTFILES += $(addprefix $(TARDIRNAME)/$(subdir)/, $(SOURCES))
 CFILES = $(filter %.c,$(SOURCES) $(GENFILES))
 HFILES = $(filter %.h,$(SOURCES) $(GENFILES))
 OFILES = $(CFILES:.c=.o)
@@ -103,4 +109,4 @@ test -z "$$fail"
 endef
 endif
 
-targets = all clean depend realclean tags install autodoc autodoc_xref autodoc_html dist
+targets = all clean depend realclean tags install autodoc autodoc_xref autodoc_html dist distrib
index e5d3ced..f51c33a 100644 (file)
@@ -24,7 +24,7 @@ local_clean:
        $(RM) $(OFILES) subdir.o core
 
 realclean: subdir_realclean local_clean
-       $(RM) $(GENFILES) .depend TAGS
+       $(RM) $(GENFILES) .depend TAGS $(TARDIRNAME)
 
 depend:        subdir_depend local_depend
 .PHONY: local_depend
@@ -45,13 +45,18 @@ local_autodoc_html: $(HTMLFILES)
 
 
 # generate an archive for distribution
-dist:  subdir_dist local_dist
+distrib: dist
+       $(MAKE) -C testprograms dist
+
+dist:  subdir_dist local_dist $(TARDIRNAME)
 #      @echo create archive with $(DISTFILES)
 #      @echo tar -C $(top_srcdir) -uf libfirm.tar $(ARCHIVEDISTFILES)
        $(TAR) $(TARFLAGS) $(ARCHIVEDISTFILES)
 .PHONY:        local_dist
 local_dist:    $(DISTFILES)
 
+$(TARDIRNAME):
+       $(LN_S) $(top_srcdir) $@
 
 # dont know about this
 # Recurse into $(subdirs) for $(targets)
index 6e9b81b..4813d46 100644 (file)
@@ -26,33 +26,15 @@ subdirs := ir ir/adt ir/debug ir/tv ir/common ir/ident ir/ir ir/tr
 SOURCES := Makefile.in MakeRules.in MakeTargets\
           aclocal.m4 config.h.in\
           config.guess config.sub configure.in \
-          stamp-h.in install-sh README
+          stamp-h.in install-sh README configure
 
 INSTALL_LIBS = libfirm.a
 
 GENFILES := stamp-h config.log config.cache
-
-# init
-ARCHIVEDISTFILES := testprograms/Makefile.in                                   \
-       testprograms/array-heap_example.c   testprograms/if_example.c           \
-       testprograms/array-stack_example.c  testprograms/if_while_example.c     \
-       testprograms/call_str_example.c     testprograms/inheritance_example.c  \
-       testprograms/cond_example.c         testprograms/irr_cf_example.c       \
-       testprograms/const_eval_example.c   testprograms/irr_loop_example.c     \
-       testprograms/dead_block_example.c   testprograms/memory_example.c       \
-       testprograms/empty.c                testprograms/oo_program_example.c   \
-       testprograms/global_var_example.c   testprograms/three_cfpred_example.c \
-       testprograms/if_else_example.c      testprograms/while_example.c        \
-
-DISTFILES = $(addprefix ../, $(ARCHIVEDISTFILES))
-
 # config.status config.h.in $(srcdir)/stamp-h.in
 
 include $(topdir)/MakeRules
 
-DISTFILES += $(addprefix $(srcdir)/, configure)
-ARCHIVEDISTFILES += $(addprefix $(subdir)/, configure)
-
 XOFILES += $(addsuffix /subdir.o, $(subdirs))
 
 include $(top_srcdir)/MakeTargets
index 2f5be80..2db660e 100755 (executable)
--- a/configure
+++ b/configure
@@ -1190,11 +1190,33 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1195: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+  rm -f conftestdata
+  ac_cv_prog_LN_S="ln -s"
+else
+  ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
 if test "$enable_auto_documentation" = yes; then
   # Extract the first word of "robodoc", so it can be a program name with args.
 set dummy robodoc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1198: checking for $ac_word" >&5
+echo "configure:1220: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ROBODOC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1228,7 +1250,7 @@ fi
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1232: checking how to run the C preprocessor" >&5
+echo "configure:1254: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1243,13 +1265,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1247 "configure"
+#line 1269 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1260,13 +1282,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1264 "configure"
+#line 1286 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1277,13 +1299,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1281 "configure"
+#line 1303 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1308,12 +1330,12 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1312: checking for ANSI C header files" >&5
+echo "configure:1334: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1317 "configure"
+#line 1339 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1321,7 +1343,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1338,7 +1360,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1342 "configure"
+#line 1364 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1356,7 +1378,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1360 "configure"
+#line 1382 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1377,7 +1399,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1381 "configure"
+#line 1403 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1388,7 +1410,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1417,17 +1439,17 @@ for ac_hdr in math.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1421: checking for $ac_hdr" >&5
+echo "configure:1443: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1426 "configure"
+#line 1448 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1464,17 +1486,17 @@ for ac_hdr in gmp.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1468: checking for $ac_hdr" >&5
+echo "configure:1490: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1473 "configure"
+#line 1495 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1511,17 +1533,17 @@ for ac_hdr in obstack.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1515: checking for $ac_hdr" >&5
+echo "configure:1537: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1520 "configure"
+#line 1542 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1556,7 +1578,7 @@ fi
 
 
 echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
-echo "configure:1560: checking for main in -lgmp" >&5
+echo "configure:1582: checking for main in -lgmp" >&5
 ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1564,14 +1586,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1568 "configure"
+#line 1590 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1598,7 +1620,7 @@ fi
 
 
 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:1602: checking for main in -lm" >&5
+echo "configure:1624: checking for main in -lm" >&5
 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1606,14 +1628,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1610 "configure"
+#line 1632 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1644,12 +1666,12 @@ fi
 
 
 echo $ac_n "checking for strerror""... $ac_c" 1>&6
-echo "configure:1648: checking for strerror" >&5
+echo "configure:1670: checking for strerror" >&5
 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1653 "configure"
+#line 1675 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char strerror(); below.  */
@@ -1672,7 +1694,7 @@ strerror();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_strerror=yes"
 else
@@ -1853,6 +1875,7 @@ s%@RANLIB@%$RANLIB%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@LN_S@%$LN_S%g
 s%@ROBODOC@%$ROBODOC%g
 s%@CPP@%$CPP%g
 
index 026eb1b..895f7b7 100644 (file)
@@ -94,6 +94,8 @@ AC_PROG_RANLIB
 
 AC_PROG_INSTALL
 
+AC_PROG_LN_S
+
 dnl check for robodoc if enabled
 dnl ----------------------------
 if test "$enable_auto_documentation" = yes; then