@@ -98,10 +98,12 @@ ifeq ($(FORCE_PERL_PREFIX), 1)
9898 export PERL_MM_OPT
9999endif
100100
101- $(CILLYDIR ) /Makefile : Makefile $(CILLYDIR ) /Makefile.PL $(CILLYDIR ) /App/Cilly.pm
101+ CILLYMOD := Cilly
102+
103+ $(CILLYDIR ) /Makefile : Makefile $(CILLYDIR ) /Makefile.PL $(CILLYDIR ) /App/$(CILLYMOD ) .pm
102104 cd $(CILLYDIR ) ; $(PERL ) Makefile.PL
103105
104- .PHONY : cilly
106+ .PHONY : $( CILLY )
105107$(CILLY ) : $(BINDIR ) /$(CILLY )$(EXE ) $(CILLYDIR ) /Makefile
106108 $(MAKE ) -C $(CILLYDIR )
107109
@@ -169,17 +171,17 @@ $(OBJDIR)/machdep.ml : src/machdep-ml.c configure.ac Makefile.in
169171 ;fi
170172 @echo "let theMachine : mach ref = ref gcc" >>$@
171173
172- $(CILLYDIR ) /App/Cilly .pm : $(CILLYDIR ) /App/Cilly .pm.in src/machdep-ml.c configure.ac Makefile.in
173- cp $(CILLYDIR ) /App/Cilly .pm.in $(CILLYDIR ) /App/Cilly .pm
174- sed -e " s|CIL_VERSION|@CIL_VERSION@|" $(CILLYDIR ) /App/Cilly .pm > $(CILLYDIR ) /App/Cilly .pm.tmp; \
175- mv $(CILLYDIR ) /App/Cilly .pm.tmp $(CILLYDIR ) /App/Cilly .pm; \
174+ $(CILLYDIR ) /App/$( CILLYMOD ) .pm : $(CILLYDIR ) /App/$( CILLYMOD ) .pm.in src/machdep-ml.c configure.ac Makefile.in
175+ cp $(CILLYDIR ) /App/$( CILLYMOD ) .pm.in $(CILLYDIR ) /App/$( CILLYMOD ) .pm
176+ sed -e " s|CIL_VERSION|@CIL_VERSION@|" $(CILLYDIR ) /App/$( CILLYMOD ) .pm > $(CILLYDIR ) /App/$( CILLYMOD ) .pm.tmp; \
177+ mv $(CILLYDIR ) /App/$( CILLYMOD ) .pm.tmp $(CILLYDIR ) /App/$( CILLYMOD ) .pm; \
176178 if $( MACHDEPCC) -m32 src/machdep-ml.c -o $( OBJDIR) /machdep-ml32.exe ; then \
177- sed -e " s|nogcc32model|` $( EMUL) $( OBJDIR) /machdep-ml32.exe --env` |" $(CILLYDIR ) /App/Cilly .pm > $(CILLYDIR ) /App/Cilly .pm.tmp; \
178- mv $(CILLYDIR ) /App/Cilly .pm.tmp $(CILLYDIR ) /App/Cilly .pm; \
179+ sed -e " s|nogcc32model|` $( EMUL) $( OBJDIR) /machdep-ml32.exe --env` |" $(CILLYDIR ) /App/$( CILLYMOD ) .pm > $(CILLYDIR ) /App/$( CILLYMOD ) .pm.tmp; \
180+ mv $(CILLYDIR ) /App/$( CILLYMOD ) .pm.tmp $(CILLYDIR ) /App/$( CILLYMOD ) .pm; \
179181 fi
180182 if $( MACHDEPCC) -m64 src/machdep-ml.c -o $( OBJDIR) /machdep-ml64.exe ; then \
181- sed -e " s|nogcc64model|` $( EMUL) $( OBJDIR) /machdep-ml64.exe --env` |" $(CILLYDIR ) /App/Cilly .pm > $(CILLYDIR ) /App/Cilly .pm.tmp; \
182- mv $(CILLYDIR ) /App/Cilly .pm.tmp $(CILLYDIR ) /App/Cilly .pm; \
183+ sed -e " s|nogcc64model|` $( EMUL) $( OBJDIR) /machdep-ml64.exe --env` |" $(CILLYDIR ) /App/$( CILLYMOD ) .pm > $(CILLYDIR ) /App/$( CILLYMOD ) .pm.tmp; \
184+ mv $(CILLYDIR ) /App/$( CILLYMOD ) .pm.tmp $(CILLYDIR ) /App/$( CILLYMOD ) .pm; \
183185 fi
184186
185187.PHONY : cilversion
@@ -232,7 +234,7 @@ odoc: $(OBJDIR)/doc/cil.docdir/index.html
232234 -mkdir -p doc/html/cil/
233235 -cp -r $(dir $< ) doc/html/cil/api
234236
235- doc/cilpp.tex : doc/cilcode.pl doc/cil.tex $(CILLYDIR ) /App/Cilly .pm
237+ doc/cilpp.tex : doc/cilcode.pl doc/cil.tex $(CILLYDIR ) /App/$( CILLYMOD ) .pm
236238 -rm -rf doc/html/cil
237239 -mkdir -p doc/html/cil
238240 -mkdir -p doc/html/cil/examples
@@ -254,12 +256,12 @@ pdfdoc: doc/cilpp.tex
254256 cd doc; pdflatex cilpp.tex; pdflatex cilpp.tex
255257 cd doc; mv cilpp.pdf html/cil/CIL.pdf
256258
257- .PHONY : distclean cleandoc cleancilly clean
259+ .PHONY : distclean clean
258260distclean : clean
259261 $(MAKE ) -C test distclean
260262 rm -rf autom4te.cache/
261263 rm -f Makefile
262- rm -f $(CILLYDIR ) /App/Cilly /CilConfig.pm
264+ rm -f $(CILLYDIR ) /App/$( CILLYMOD ) /CilConfig.pm
263265 rm -f config.h
264266 rm -f config.log
265267 rm -f config.mk
@@ -269,11 +271,6 @@ distclean: clean
269271 rm -f src/machdep-ml.c
270272 rm -f stamp-h
271273
272-
273- cleandoc :
274-
275- cleancilly :
276-
277274clean : $(CILLYDIR ) /Makefile
278275 rm -rf $(OBJDIR )
279276 rm -f $(BINDIR ) /$(CILLY ) .*
@@ -282,7 +279,7 @@ clean: $(CILLYDIR)/Makefile
282279 rm -f doc/cil.version.*
283280 rm -f doc/cilpp.*
284281 $(MAKE ) -C $(CILLYDIR ) clean
285- rm -f $(CILLYDIR ) /App/Cilly .pm
282+ rm -f $(CILLYDIR ) /App/$( CILLYMOD ) .pm
286283 rm -f $(CILLYDIR ) /Makefile.old
287284 rm -f Makefile.features
288285
@@ -303,7 +300,6 @@ install: $(CILLY) install-findlib
303300 $(MAKE ) -C $(CILLYDIR ) pure_install
304301 $(INSTALL ) -m 0755 $(BINDIR ) /$(CILLY ) .* $(DESTDIR )$(bindir )
305302
306- # FIXME
307303uninstall : $(CILLYDIR ) /Makefile uninstall-findlib
308304 -rm -f $(DESTDIR )$(bindir ) /$(CILLY ) .*
309305 $(MAKE ) -C $(CILLYDIR ) force_uninstall
0 commit comments