mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-01 13:25:46 -04:00
make: use $(RM) for removing files
This is one of the built-in variables for Make and can increase portability on different operating systems (eg, on Windows, the built-in $(RM) may be defined as "del" instead of "rm -f").
This commit is contained in:
parent
fe7d6f864a
commit
eca25952ad
8 changed files with 32 additions and 29 deletions
34
Makefile
34
Makefile
|
@ -45,7 +45,7 @@ wadinfo_freedm.txt : buildcfg.txt subdirs lumps/freedoom.lmp lumps/freedm.lmp
|
||||||
|
|
||||||
$(FREEDM): wadinfo_freedm.txt subdirs
|
$(FREEDM): wadinfo_freedm.txt subdirs
|
||||||
@mkdir -p $(WADS)
|
@mkdir -p $(WADS)
|
||||||
rm -f $@
|
$(RM) $@
|
||||||
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_freedm.txt $@
|
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_freedm.txt $@
|
||||||
|
|
||||||
#---------------------------------------------------------
|
#---------------------------------------------------------
|
||||||
|
@ -56,7 +56,7 @@ wadinfo_phase1.txt: buildcfg.txt subdirs lumps/freedoom.lmp
|
||||||
|
|
||||||
$(FREEDOOM1): wadinfo_phase1.txt subdirs
|
$(FREEDOOM1): wadinfo_phase1.txt subdirs
|
||||||
@mkdir -p $(WADS)
|
@mkdir -p $(WADS)
|
||||||
rm -f $@
|
$(RM) $@
|
||||||
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_phase1.txt $@
|
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_phase1.txt $@
|
||||||
|
|
||||||
#---------------------------------------------------------
|
#---------------------------------------------------------
|
||||||
|
@ -67,7 +67,7 @@ wadinfo_phase2.txt: buildcfg.txt subdirs lumps/freedoom.lmp
|
||||||
|
|
||||||
$(FREEDOOM2): wadinfo_phase2.txt subdirs
|
$(FREEDOOM2): wadinfo_phase2.txt subdirs
|
||||||
@mkdir -p $(WADS)
|
@mkdir -p $(WADS)
|
||||||
rm -f $@
|
$(RM) $@
|
||||||
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_phase2.txt $@
|
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_phase2.txt $@
|
||||||
|
|
||||||
%.html: %.adoc
|
%.html: %.adoc
|
||||||
|
@ -99,13 +99,13 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
clean: wad-image-clean
|
clean: wad-image-clean
|
||||||
rm -f *.html deutex.log $(OBJS) \
|
$(RM) *.html deutex.log $(OBJS) \
|
||||||
./COPYING.txt ./CREDITS.txt \
|
./COPYING.txt ./CREDITS.txt \
|
||||||
./wadinfo_phase1.txt \
|
./wadinfo_phase1.txt \
|
||||||
./wadinfo_phase2.txt \
|
./wadinfo_phase2.txt \
|
||||||
./wadinfo_freedm.txt \
|
./wadinfo_freedm.txt \
|
||||||
./lumps/freedoom.lmp \
|
./lumps/freedoom.lmp \
|
||||||
./lumps/freedm.lmp
|
./lumps/freedm.lmp
|
||||||
-rmdir $(WADS)
|
-rmdir $(WADS)
|
||||||
|
|
||||||
$(MAKE) -C dist clean
|
$(MAKE) -C dist clean
|
||||||
|
@ -153,7 +153,7 @@ wad-image: wad-image-common
|
||||||
|
|
||||||
# Cleanup generated images. Structured this way for safety.
|
# Cleanup generated images. Structured this way for safety.
|
||||||
wad-image-clean: wad-image-common
|
wad-image-clean: wad-image-common
|
||||||
rm -f $(WI_IMAGES)/*.*
|
$(RM) $(WI_IMAGES)/*
|
||||||
-rmdir $(WI_IMAGES)
|
-rmdir $(WI_IMAGES)
|
||||||
|
|
||||||
# Diffing WADs in "levels" using git and show the diff."
|
# Diffing WADs in "levels" using git and show the diff."
|
||||||
|
@ -286,12 +286,12 @@ install-%: $(WADS)/%.wad %.6 %.png
|
||||||
install -Dm 644 dist/$*.png -t "$(target)/share/icons"
|
install -Dm 644 dist/$*.png -t "$(target)/share/icons"
|
||||||
|
|
||||||
uninstall-%:
|
uninstall-%:
|
||||||
rm "$(target)$(bindir)/$*"
|
$(RM) "$(target)$(bindir)/$*"
|
||||||
rm "$(target)$(mandir)/man6/$*.6"
|
$(RM) "$(target)$(mandir)/man6/$*.6"
|
||||||
rm "$(target)$(waddir)/$*.wad"
|
$(RM) "$(target)$(waddir)/$*.wad"
|
||||||
rm "$(target)/share/applications/$*.desktop"
|
$(RM) "$(target)/share/applications/$*.desktop"
|
||||||
rm "$(target)/share/appdata/$*.appdata.xml"
|
$(RM) "$(target)/share/appdata/$*.appdata.xml"
|
||||||
rm "$(target)/share/icons/$*.png"
|
$(RM) "$(target)/share/icons/$*.png"
|
||||||
-rmdir -p "$(target)$(bindir)"
|
-rmdir -p "$(target)$(bindir)"
|
||||||
-rmdir -p "$(target)$(mandir)/man6"
|
-rmdir -p "$(target)$(mandir)/man6"
|
||||||
-rmdir -p "$(target)$(waddir)"
|
-rmdir -p "$(target)$(waddir)"
|
||||||
|
|
|
@ -6,6 +6,6 @@ $(IWAD): ../lumps/playpal/playpal-base.lmp
|
||||||
./bootstrap.py < $< > $@
|
./bootstrap.py < $< > $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(IWAD)
|
$(RM) $(IWAD)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
|
@ -157,12 +157,13 @@ fdmtitle.png: ../titlepic/freedm_titlepic.png
|
||||||
cp $@ ../
|
cp $@ ../
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(TEXTGEN_GRAPHICS) helpbg.png help.png \
|
$(RM) $(TEXTGEN_GRAPHICS) helpbg.png help.png \
|
||||||
graphics.stamp *.pyc credtext.png \
|
graphics.stamp *.pyc credtext.png \
|
||||||
credtext.png credit.png dmwilv*.png wikilrs.png \
|
credtext.png credit.png dmwilv*.png wikilrs.png \
|
||||||
wivctms.png wikilrs_horiz.png ../credit.png ../help.png \
|
wivctms.png wikilrs_horiz.png ../credit.png ../help.png \
|
||||||
../wikilrs.png ../wivctms.png \
|
../wikilrs.png ../wivctms.png \
|
||||||
fd1title.png fd2title.png fdmtitle.png \
|
fd1title.png fd2title.png fdmtitle.png \
|
||||||
../fd1title.png ../fd2title.png ../fdmtitle.png
|
../fd1title.png ../fd2title.png ../fdmtitle.png
|
||||||
for graphic in $(TEXTGEN_GRAPHICS); do rm -f ../$$graphic; done
|
for graphic in $(TEXTGEN_GRAPHICS); do $(RM) ../$$graphic; done
|
||||||
rm -fr __pycache__
|
$(RM) __pycache__/*
|
||||||
|
-rmdir __pycache__
|
||||||
|
|
|
@ -9,6 +9,6 @@ colormap.lmp: $(PLAYPAL) colormap.py
|
||||||
./colormap.py $(PLAYPAL) > colormap.lmp
|
./colormap.py $(PLAYPAL) > colormap.lmp
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(COLORMAPS) ../$(COLORMAPS)
|
$(RM) $(COLORMAPS) ../$(COLORMAPS)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
|
@ -3,5 +3,6 @@ ultramid.ini : gen-ultramid config.py stats.py
|
||||||
cp $@ ../dmxgus.lmp
|
cp $@ ../dmxgus.lmp
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ultramid.ini ../dmxgus.lmp *.pyc
|
$(RM) ultramid.ini ../dmxgus.lmp *.pyc
|
||||||
rm -fr __pycache__
|
$(RM) __pycache__/*
|
||||||
|
-rmdir __pycache__
|
||||||
|
|
|
@ -3,5 +3,6 @@ genmidi.lmp: config.py instruments/*
|
||||||
cp $@ ../
|
cp $@ ../
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f genmidi.lmp ../genmidi.lmp *.pyc
|
$(RM) genmidi.lmp ../genmidi.lmp *.pyc
|
||||||
rm -fr __pycache__
|
$(RM) __pycache__/*
|
||||||
|
-rmdir __pycache__
|
||||||
|
|
|
@ -3,6 +3,6 @@ playpal.lmp: playpal-base.lmp playpal.py
|
||||||
cp playpal.lmp ../
|
cp playpal.lmp ../
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f playpal.lmp ../playpal.lmp
|
$(RM) playpal.lmp ../playpal.lmp
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
|
@ -40,11 +40,11 @@ freedm/texture1.lmp: textures.cfg
|
||||||
cp freedm/pnames.lmp ../fdmpname.lmp
|
cp freedm/pnames.lmp ../fdmpname.lmp
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f phase1/texture1.lmp phase2/texture1.lmp freedm/texture1.lmp \
|
$(RM) phase1/texture1.lmp phase2/texture1.lmp freedm/texture1.lmp \
|
||||||
phase1/texture2.lmp \
|
phase1/texture2.lmp \
|
||||||
phase1/pnames.lmp phase2/pnames.lmp freedm/pnames.lmp \
|
phase1/pnames.lmp phase2/pnames.lmp freedm/pnames.lmp \
|
||||||
phase1/pnames.txt phase2/pnames.txt freedm/pnames.txt
|
phase1/pnames.txt phase2/pnames.txt freedm/pnames.txt
|
||||||
rm -f ../fd1txtr1.lmp ../fd1txtr2.lmp ../fd1pname.lmp \
|
$(RM) ../fd1txtr1.lmp ../fd1txtr2.lmp ../fd1pname.lmp \
|
||||||
../fd2txtr1.lmp ../fd2pname.lmp \
|
../fd2txtr1.lmp ../fd2pname.lmp \
|
||||||
../fdmtxtr1.lmp ../fdmpname.lmp
|
../fdmtxtr1.lmp ../fdmpname.lmp
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue