mlview-hacking
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mlview-hacking] DESTDIR patch


From: Rafał Kleger-Rudomin
Subject: [Mlview-hacking] DESTDIR patch
Date: 28 Mar 2002 20:54:49 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Bryce Canyon)

This patch supports standard DESTDIR variable that allows to do "make install"
to another directory than specified during configure (needed to 
build rpm from normal user)

diff -Nur --exclude '*~' mlview-0.0.1.9/Makefile.am 
mlview-0.0.1.9.new/Makefile.am
--- mlview-0.0.1.9/Makefile.am  Mon Mar 25 22:27:10 2002
+++ mlview-0.0.1.9.new/Makefile.am      Thu Mar 28 20:09:48 2002
@@ -21,22 +21,22 @@
 
 install-data-local:
 #Install xml catalog stuffs + stock DTDs
-       $(mkinstalldirs) $(datadir)/$(MLVIEW_DIR_NAME)
-       cp -rf entities-catalog $(datadir)/$(MLVIEW_DIR_NAME)
-       -find $(datadir)/$(MLVIEW_DIR_NAME) -name "Makefile*" -exec rm {} \;
-       -find $(datadir)/$(MLVIEW_DIR_NAME) -type d -name "CVS" -exec rm -rf {} 
\;
-       echo "dir is $(MLVIEW_DATA_DIR)"
+       $(mkinstalldirs) $(DESTDIR)$(datadir)/$(MLVIEW_DIR_NAME)
+       cp -rf entities-catalog $(DESTDIR)$(datadir)/$(MLVIEW_DIR_NAME)
+       -find $(DESTDIR)$(datadir)/$(MLVIEW_DIR_NAME) -name "Makefile*" -exec 
rm {} \;
+       -find $(DESTDIR)$(datadir)/$(MLVIEW_DIR_NAME) -type d -name "CVS" -exec 
rm -rf {} \;
+       echo "dir is $(DESTDIR)$(MLVIEW_DATA_DIR)"
        echo "s/@@mlview_data_dir@@/$(subst /,\/,$(MLVIEW_DATA_DIR))/g" > 
sed-script
        echo "s/@@mlview_dir_name@@/$(subst /,\/,$(MLVIEW_DIR_NAME))/g" >> 
sed-script
        echo "s/@@mlview_xml_catalog_dir_name@@/$(subst 
/,\/,$(MLVIEW_XML_CATALOG_DIR_NAME))/g" >> sed-script
-       cat $(datadir)/$(MLVIEW_DIR_NAME)/entities-catalog/catalog.xml | sed -f 
sed-script > $(datadir)/$(MLVIEW_DIR_NAME)/entities-catalog/catalog.xml.out
-       mv $(datadir)/$(MLVIEW_DIR_NAME)/entities-catalog/catalog.xml.out 
$(datadir)/$(MLVIEW_DIR_NAME)/entities-catalog/catalog.xml
+       cat 
$(DESTDIR)$(datadir)/$(MLVIEW_DIR_NAME)/entities-catalog/catalog.xml | sed -f 
sed-script > 
$(DESTDIR)$(datadir)/$(MLVIEW_DIR_NAME)/entities-catalog/catalog.xml.out
+       mv 
$(DESTDIR)$(datadir)/$(MLVIEW_DIR_NAME)/entities-catalog/catalog.xml.out 
$(DESTDIR)$(datadir)/$(MLVIEW_DIR_NAME)/entities-catalog/catalog.xml
        rm sed -f sed-script
 #Make some aliases on mlv binaries
-       -if test -x $(bindir)/mlv ; then \
-       ln -s $(bindir)/mlv $(bindir)/mlview ; \
-       ln -s $(bindir)/mlv $(bindir)/gnome-mlview ; \
-       ln -s $(bindir)/mlv $(bindir)/gmlview ;\
+       -if test -x $(DESTDIR)$(bindir)/mlv ; then \
+       ln -s $(bindir)/mlv $(DESTDIR)$(bindir)/mlview ; \
+       ln -s $(bindir)/mlv $(DESTDIR)$(bindir)/gnome-mlview ; \
+       ln -s $(bindir)/mlv $(DESTDIR)$(bindir)/gmlview ;\
        fi ;
 uninstall-local:
        rm -rf $(datadir)/$(MLVIEW_DIR_NAME)




-- 
Rafał Kleger-Rudomin (address@hidden)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]