aboutsummaryrefslogtreecommitdiffstats
path: root/lang/ats/files/patch-Makefile
blob: f6db4d0638ccc672a657deedfad6d0b0cca75c43 (plain) (blame)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
--- Makefile.orig   2013-01-24 10:49:41.547037509 +0800
+++ Makefile    2013-01-24 10:55:14.781718163 +0800
@@ -59,12 +59,6 @@
    autoheader $<
    touch $@
 
-configure: configure.ac $(SRC_CONFIG_FILES)
-   aclocal
-   automake --add-missing --foreign || true
-   autoconf
-   touch $(BUILT_CONFIG_FILES)
-
 -include config.mk
 
 ######
@@ -92,7 +86,7 @@
    cd $(abs_top_srcdir)
    [ -d $(DESTDIR)/$(bindir) ] || $(MKDIR_P) $(DESTDIR)/$(bindir)
    $(MKDIR_P) $(DESTDIR)$(ATSNEWHOME)/bin
-   find ccomp contrib doc libats libc prelude -type d \
+   find ccomp libats libatsdoc libc prelude -type d \
      -exec $(MKDIR_P) $(DESTDIR)$(ATSNEWHOME)/\{} \; \
      -print
 
@@ -100,7 +94,7 @@
 #
 # recursively install all files in the list except .svn control files.
 #
-   for d in ccomp/runtime contrib doc libats libc prelude; do \
+   for d in ccomp/runtime libats libatsdoc libc prelude; do \
      cd $(abs_top_srcdir) && \
      $(INSTALL) -d $(DESTDIR)$(ATSNEWHOME)/"$$d" && \
      find "$$d" -name .svn -prune -o -type f \
@@ -140,6 +134,8 @@
    done
 
 install:: install_files
+   find $(DESTDIR)$(ATSNEWHOME) -depth -type d -empty -delete
+   find $(DESTDIR)$(ATSNEWHOME) -type f -name '*.orig' -delete
 
 ######
 
@@ -155,8 +151,7 @@
   ccomp/runtime/GCATS/gc_mt.o \
   atsopt1_gc \
   bin/atslex \
-  bin/atsdoc \
-  contrib
+  bin/atsdoc
    @echo "ATS/Anairiats has been built up successfully!"
    @echo "The value of ATSHOME for this build is \"$(ATSHOME)\"."
    @echo "The value of ATSHOMERELOC for this build is \"$(ATSHOMERELOC)\"."
@@ -217,23 +212,23 @@
 
 .libfiles_local: .libfiles ; $(CC) -E -P -x c -o $@ $<
 libfiles: .libfiles_local
-   $(ATSLIB) $(ATS_PROOFCHECK) -O2 --libats
-   $(ATSLIB) $(ATS_PROOFCHECK) -O2 --libats_lex
-   $(ATSLIB) $(ATS_PROOFCHECK) -O2 --libats_smlbas
+   $(ATSLIB) $(ATS_PROOFCHECK) $(CFLAGS) --libats
+   $(ATSLIB) $(ATS_PROOFCHECK) $(CFLAGS) --libats_lex
+   $(ATSLIB) $(ATS_PROOFCHECK) $(CFLAGS) --libats_smlbas
 
 lib32files: .libfiles_local
-   $(ATSLIB) $(ATS_PROOFCHECK) -m32 -O2 --libats
-   $(ATSLIB) $(ATS_PROOFCHECK) -m32 -O2 --libats_lex
-   $(ATSLIB) $(ATS_PROOFCHECK) -m32 -O2 --libats_smlbas
+   $(ATSLIB) $(ATS_PROOFCHECK) -m32 $(CFLAGS) --libats
+   $(ATSLIB) $(ATS_PROOFCHECK) -m32 $(CFLAGS) --libats_lex
+   $(ATSLIB) $(ATS_PROOFCHECK) -m32 $(CFLAGS) --libats_smlbas
 
 lib64files: .libfiles_local
-   $(ATSLIB) $(ATS_PROOFCHECK) -m64 -O2 --libats
-   $(ATSLIB) $(ATS_PROOFCHECK) -m64 -O2 --libats_lex
-   $(ATSLIB) $(ATS_PROOFCHECK) -m64 -O2 --libats_smlbas
+   $(ATSLIB) $(ATS_PROOFCHECK) -m64 $(CFLAGS) --libats
+   $(ATSLIB) $(ATS_PROOFCHECK) -m64 $(CFLAGS) --libats_lex
+   $(ATSLIB) $(ATS_PROOFCHECK) -m64 $(CFLAGS) --libats_smlbas
 
 .libfiles_mt_local: .libfiles_mt ; $(CC) -E -P -x c -o $@ $<
 libfiles_mt: .libfiles_mt_local
-   $(ATSLIB) $(ATS_PROOFCHECK) -D_ATS_MULTITHREAD -O2 --libats_mt
+   $(ATSLIB) $(ATS_PROOFCHECK) -D_ATS_MULTITHREAD $(CFLAGS) --libats_mt
 
 libatsdoca: ; $(MAKE) -C libatsdoc