* device/include/Makefile.in: fix install
[fw/sdcc] / device / include / Makefile.in
index bd65614a960333499204efb294309257434a1db2..ec5408fac01cb2cd52789c8d2041a55319981eb5 100644 (file)
@@ -19,7 +19,6 @@ exec_prefix     = @exec_prefix@
 bindir          = @bindir@
 libdir          = @libdir@
 datadir         = @datadir@
-sdcc_datadir    = @sdcc_datadir@
 includedir      = @includedir@
 mandir          = @mandir@
 man1dir         = $(mandir)/man1
@@ -27,6 +26,10 @@ man2dir         = $(mandir)/man2
 infodir         = @infodir@
 srcdir          = @srcdir@
 
+include_dir_suffix = @include_dir_suffix@
+
+sdcc_includedir    = $(datadir)/$(include_dir_suffix)
+
 CPPFLAGS        = @CPPFLAGS@ -I$(PRJDIR)
 
 
@@ -34,16 +37,17 @@ CPPFLAGS        = @CPPFLAGS@ -I$(PRJDIR)
 # ------------------------------------------
 all:
 
-# Compiling and installing everything and runing test
-# ---------------------------------------------------
+# Compiling and installing everything and running test
+# ----------------------------------------------------
 install: all installdirs
-       $(CP) -r asm *.h $(sdcc_datadir)/include/
+       $(CP) -r asm *.h $(sdcc_includedir)
+       find $(sdcc_includedir) -type d -name 'CVS' -exec rm {} \;
 
 
 # Deleting all the installed files
 # --------------------------------
 uninstall:
-       for hdr in *.h; do rm -f $(sdcc_datadir)/$$hdr; done
+       rm -rf $(sdcc_includedir)
 
 
 # Performing self-test
@@ -59,7 +63,7 @@ installcheck:
 # Creating installation directories
 # ---------------------------------
 installdirs:
-       [ -d $(sdcc_datadir)/include ] || mkdir -p $(sdcc_datadir)/include
+       [ -d $(sdcc_includedir) ] || mkdir -p $(sdcc_includedir)
 
 
 # Creating dependencies