mirror of
https://github.com/freedoom/freedoom.git
synced 2025-08-30 17:16:55 -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
|
||||
@mkdir -p $(WADS)
|
||||
rm -f $@
|
||||
$(RM) $@
|
||||
$(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
|
||||
@mkdir -p $(WADS)
|
||||
rm -f $@
|
||||
$(RM) $@
|
||||
$(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
|
||||
@mkdir -p $(WADS)
|
||||
rm -f $@
|
||||
$(RM) $@
|
||||
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_phase2.txt $@
|
||||
|
||||
%.html: %.adoc
|
||||
|
@ -99,13 +99,13 @@ else
|
|||
endif
|
||||
|
||||
clean: wad-image-clean
|
||||
rm -f *.html deutex.log $(OBJS) \
|
||||
./COPYING.txt ./CREDITS.txt \
|
||||
./wadinfo_phase1.txt \
|
||||
./wadinfo_phase2.txt \
|
||||
./wadinfo_freedm.txt \
|
||||
./lumps/freedoom.lmp \
|
||||
./lumps/freedm.lmp
|
||||
$(RM) *.html deutex.log $(OBJS) \
|
||||
./COPYING.txt ./CREDITS.txt \
|
||||
./wadinfo_phase1.txt \
|
||||
./wadinfo_phase2.txt \
|
||||
./wadinfo_freedm.txt \
|
||||
./lumps/freedoom.lmp \
|
||||
./lumps/freedm.lmp
|
||||
-rmdir $(WADS)
|
||||
|
||||
$(MAKE) -C dist clean
|
||||
|
@ -153,7 +153,7 @@ wad-image: wad-image-common
|
|||
|
||||
# Cleanup generated images. Structured this way for safety.
|
||||
wad-image-clean: wad-image-common
|
||||
rm -f $(WI_IMAGES)/*.*
|
||||
$(RM) $(WI_IMAGES)/*
|
||||
-rmdir $(WI_IMAGES)
|
||||
|
||||
# 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"
|
||||
|
||||
uninstall-%:
|
||||
rm "$(target)$(bindir)/$*"
|
||||
rm "$(target)$(mandir)/man6/$*.6"
|
||||
rm "$(target)$(waddir)/$*.wad"
|
||||
rm "$(target)/share/applications/$*.desktop"
|
||||
rm "$(target)/share/appdata/$*.appdata.xml"
|
||||
rm "$(target)/share/icons/$*.png"
|
||||
$(RM) "$(target)$(bindir)/$*"
|
||||
$(RM) "$(target)$(mandir)/man6/$*.6"
|
||||
$(RM) "$(target)$(waddir)/$*.wad"
|
||||
$(RM) "$(target)/share/applications/$*.desktop"
|
||||
$(RM) "$(target)/share/appdata/$*.appdata.xml"
|
||||
$(RM) "$(target)/share/icons/$*.png"
|
||||
-rmdir -p "$(target)$(bindir)"
|
||||
-rmdir -p "$(target)$(mandir)/man6"
|
||||
-rmdir -p "$(target)$(waddir)"
|
||||
|
|
|
@ -6,6 +6,6 @@ $(IWAD): ../lumps/playpal/playpal-base.lmp
|
|||
./bootstrap.py < $< > $@
|
||||
|
||||
clean:
|
||||
rm -f $(IWAD)
|
||||
$(RM) $(IWAD)
|
||||
|
||||
.PHONY: clean
|
||||
|
|
|
@ -157,12 +157,13 @@ fdmtitle.png: ../titlepic/freedm_titlepic.png
|
|||
cp $@ ../
|
||||
|
||||
clean:
|
||||
rm -f $(TEXTGEN_GRAPHICS) helpbg.png help.png \
|
||||
$(RM) $(TEXTGEN_GRAPHICS) helpbg.png help.png \
|
||||
graphics.stamp *.pyc credtext.png \
|
||||
credtext.png credit.png dmwilv*.png wikilrs.png \
|
||||
wivctms.png wikilrs_horiz.png ../credit.png ../help.png \
|
||||
../wikilrs.png ../wivctms.png \
|
||||
fd1title.png fd2title.png fdmtitle.png \
|
||||
../fd1title.png ../fd2title.png ../fdmtitle.png
|
||||
for graphic in $(TEXTGEN_GRAPHICS); do rm -f ../$$graphic; done
|
||||
rm -fr __pycache__
|
||||
for graphic in $(TEXTGEN_GRAPHICS); do $(RM) ../$$graphic; done
|
||||
$(RM) __pycache__/*
|
||||
-rmdir __pycache__
|
||||
|
|
|
@ -9,6 +9,6 @@ colormap.lmp: $(PLAYPAL) colormap.py
|
|||
./colormap.py $(PLAYPAL) > colormap.lmp
|
||||
|
||||
clean:
|
||||
rm -f $(COLORMAPS) ../$(COLORMAPS)
|
||||
$(RM) $(COLORMAPS) ../$(COLORMAPS)
|
||||
|
||||
.PHONY: clean
|
||||
|
|
|
@ -3,5 +3,6 @@ ultramid.ini : gen-ultramid config.py stats.py
|
|||
cp $@ ../dmxgus.lmp
|
||||
|
||||
clean:
|
||||
rm -f ultramid.ini ../dmxgus.lmp *.pyc
|
||||
rm -fr __pycache__
|
||||
$(RM) ultramid.ini ../dmxgus.lmp *.pyc
|
||||
$(RM) __pycache__/*
|
||||
-rmdir __pycache__
|
||||
|
|
|
@ -3,5 +3,6 @@ genmidi.lmp: config.py instruments/*
|
|||
cp $@ ../
|
||||
|
||||
clean:
|
||||
rm -f genmidi.lmp ../genmidi.lmp *.pyc
|
||||
rm -fr __pycache__
|
||||
$(RM) genmidi.lmp ../genmidi.lmp *.pyc
|
||||
$(RM) __pycache__/*
|
||||
-rmdir __pycache__
|
||||
|
|
|
@ -3,6 +3,6 @@ playpal.lmp: playpal-base.lmp playpal.py
|
|||
cp playpal.lmp ../
|
||||
|
||||
clean:
|
||||
rm -f playpal.lmp ../playpal.lmp
|
||||
$(RM) playpal.lmp ../playpal.lmp
|
||||
|
||||
.PHONY: clean
|
||||
|
|
|
@ -40,11 +40,11 @@ freedm/texture1.lmp: textures.cfg
|
|||
cp freedm/pnames.lmp ../fdmpname.lmp
|
||||
|
||||
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/pnames.lmp phase2/pnames.lmp freedm/pnames.lmp \
|
||||
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 \
|
||||
../fdmtxtr1.lmp ../fdmpname.lmp
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue